Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7713341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:51:06+00:00 2026-06-01T01:51:06+00:00

So, i have this form in a php file and i want it to

  • 0

So, i have this form in a php file and i want it to show in this sliding div but it doesn’t show any of the php file with my include file. ANy suggestions?

I think im trying to inlcude the php file incorrectly

Here is the doc:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script src="js/jquery-1.7.1.js" type="text/javascript"></script>
        <style type="text/css">
            #wrap {

            }
            #box1 {
                background: red;
                width: 800px;
                height: 100px;
            }
            #box2 {
                background: blue;
                width: 800px;
                height: 200px;
                display: none;
            }
            #box3 {
                background: green;
                width: 800px;
                height: 100px;
            }
            .expand {

            }

        </style>
        <script type="text/javascript">
            $(function() {

                $("#wrap a.expand").click(function() {
                    $('#box2').slideToggle('900');

                });
            });

        </script>
    </head>

    <body>
        <div id="wrap">
            <p>
                <a href="#" class="expand">Expanding/Collapse</a>
            </p>
            <p>
                <a href="www.google.com">Google</a>
            </p>

            <div id="box1" alt="box"></div>
            <div id="box2" alt="box">
                <?php include("test.php"); ?>
            </div>
            <div id="box3" alt="box"></div>
        </div>
    </body>
</html>

And here is the php file

<?php 
if ($_POST["email"]<>'') { 
    $ToEmail = 'email@email.site'; 
    $EmailSubject = 'Portfolio Contact .com'; 
    $mailheader = "From: ".$_POST["email"]."\r\n"; 
    $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; 
    $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
    $MESSAGE_BODY = "Name: ".$_POST["name"].""; 
    $MESSAGE_BODY .= "Email: ".$_POST["email"].""; 
    $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"]).""; 
    mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); 
?> 
Your message was sent
<?php 
} else { 
?> 
<form action="test.php" method="post">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="29%" class="bodytext">Your name:</td>
<td width="71%"><input name="name" type="text" id="name" size="32"></td>
</tr>
<tr>
<td class="bodytext">Email address:</td>
<td><input name="email" type="text" id="email" size="32"></td>
</tr>
<tr>
<td class="bodytext">Comment:</td>
<td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td>
</tr>
<tr>
<td class="bodytext"> </td>
<td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>
</tr>
</table>
</form> 
<?php 
}; 
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:51:08+00:00Added an answer on June 1, 2026 at 1:51 am

    enter image description hereremove include file and use this jQuery Load, so your form will be load within div id box2

    <script type="text/javascript">
                $(function() {
                    $("#wrap a.expand").click(function() {
                        $('#box2').slideToggle('900').load("test.php");
    
                    });
                });
    
    </script>
    

    and change this if to @$_POST["email"]<>'' with at sign and your error will be hide

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to php. I want to have a form such as this:
i have done something like this: <form action=validate.php method=get> Id :<input type=text name=pID/><br/><br/> Name
I have the following form <form name=myForm id=myForm method=post enctype=multipart/form-data action=script.php> and this jQuery
I have set the form decorators in this way: <?php $this->setElementDecorators(array( 'Label', array(array('labelTd' =>
I have this form: <form name=customize> Only show results within <select name=distance id=slct_distance> <option>25</option>
I have this form. Basically what I want is to send a auto-response with
I have this form for inputting the birthday in html. But I only have
I have successfully setup an HTML form in PHP File #1, and it is
I´ve got this code inside a php file. It should show and hide a
I have the following working form: <div id=player_won> <form action=insert.php method=post> Firstname: <input type=text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.