Hii

I want to design a contact form with multiple fields
like title, firstname, lastname,country,email,address,pincode on one page at the bottom with next button and on other page want to add some more fields with checkbox and radio buttons ....

please tell me how to design it and its coding in PHP?

Why not just do it all on one page? Anyways, contact forms are quite simple. (As in, if you put some effort into a Google search, you'd find hundreds of thousands of tutorials.)

We're not here to code for you, we're here to help you when you're stumped. Have you tried starting? Google "php contact form", and come back once you've attempted to code something.

The following is a sample of a very basic email form which you can try editing:

<?
if (isset($_POST['subject']) && $_POST['message']!=='')
    {
    $address = "your_real_email@domain.com"; //change this to the receiving address.
    $subject = "Website Email: ".$_POST['subject'];
    if ($_POST['name']!=='')
        {
        $body = "<table border=0 cellpadding=5 cellspacing=0 width=200><tr><td>".$_POST['message']."<br>
<br>
Yours Sincerely<br>
".$_POST['name']."</td></tr></table>";
        } else {
        $body = "<table border=0 cellpadding=5 cellspacing=0 width=200><tr><td>".$_POST['message'].
        "</td></tr></table>";
        }
    $headers  = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: do_not_reply@your_website_form' . "\r\n";
    
    mail($address,$subject,$body,$headers);
    }
//below displays the form while above processes it.
echo "<form method='post'>Subject: <input type=text value='' maxlength=100 name='subject' size=30><br>
<textarea cols=30 rows=20 name='message'></textarea><br>Name: <input type='text' value='' name='name'>
<input type='submit' value='submit'></form>";
?>
<?php
$body = "";
foreach($_POST as $key => $value) {
	$body .= "$key : $value \n";
} 
mail("your-email", "Web site comments", $body, "From: [email]webmaster@yahoo.co.uk[/email]");
?>

Thanks - Email Send - Done

my contact form consist 5 pages but the above code showing output only 5th page , can anyone tell me why it is nt showing other pages output...

<script language="javascript">
function funAgree(){
document.form1.action="";
}
function funDisagree(){
document.form1.action="2.php";
}
</script><img src="images/detail.jpg" alt="" /></td>
<td width="435"><form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Title(eg.Mr,Mrs,Dr)<br />
</span>
<input name="title" type="text" id="textfield" /> 
<br>
</label>
<br>
<span class="large">First name *<br />
</span>
<input name="name" type="text" id="textfield2" />
<span class="small">
</label>
(required)</span><br>
<br>
<span class="large">Last name<br />
</span>
<input name="lname" type="text" id="textfield3" />
<br>
<span class="large"> <br>
Address</span><br />
<label>
<textarea name="address" id="textarea" ></textarea>
</label>
<span class="large">
</label>
<br>
<br>
<span class="large">PIN / Post Code</span><br />
<input name="pin" type="text" id="textfield" />
<br>
<br>
<span class="large">Country</span><br />
<input name="country" type="text" id="textfield" />
<br>
<br>
<span class="large"></span> <span class="large"></span> Contact No *
<label> </label>
</span>
<label> <br />
<input name="contact" type="text" id="textfield5" />
</label>
<span class="small">(required)</span><span class="large"><br>
<br>
Email Address *<br />
<label> </label>
</span>
<label>
<input name="email" type="text" id="textfield" >
</label>
<span class="small">(required)</span><br>
<div align="right"><br>
<br>
<label>
<input name="button" type="submit" class="submitCopy" id="button" value="Next" onClick="funDisagree()" >
</label>
</label>
</div>
</form>
this is the first contact page 
<script language="javascript">
function funAgree(){
document.form1.action="requirements-form.php";
}
function funDisagree(){
document.form1.action="3.php";
}
</script> 
<form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Business name</span>
<input name="business" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<span class="large"> <br>
What is the nature of your business ?</span>
<label>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>
</label>
<br>
<span class="large">What age group are your products aimed towards?
(e.g. 25-35yrs)</span>
<input name="product" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<br>
<span class="large">Number of staff within your organisation </span>
<input name="staff" type="text" id="textfield" />
<br>
<br>
<span class="large">What are your objectives for a new website? </span> <br>
<br>
<label>
<input type="checkbox" name="checkbox" value="a">

<span class="large">provide information about the business </span><br>
<label>
<input type="checkbox" name="checkbox2" value="b">
</label>
<span class="large">online selling </span><br>
<label>
<input type="checkbox" name="checkbox3" value="c">
</label>
<span class="large">e-marketing for customers </span><br>
<label>
<input type="checkbox" name="checkbox4" value="d">
</label>
<span class="large">training for staff </span><br>
<label>
<input type="checkbox" name="checkbox5" value="e" checked="checked">


</label>
<span class="large">Other, please specify <br>
<input name="other" type="text" id="textfield" />
<br>
</span>

<span class="large"><br>
<br>
<label> </label>
</span>
<label>
<input name="Submit" type="submit" class="prev" id="button" value="Previous" onClick="funAgree()">
</label>
</label>
<input name="button" type="submit" class="submitCopy" id="button" value="Next" onClick="funDisagree()" >
</form>
this is second page..
<script language="javascript">
function funAgree(){
document.form1.action="2.php";
}
function funDisagree(){
document.form1.action="4.php";
}
</script> 
<form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Do you currently have a website?<br>
<br>

<input type="radio" name="radio" value="1">yes - If 'yes', please specify website address<br> 

<input name="website" type="text" id="textfield" />
<br>
<span class="large"></span>
</label>
<span class="large">
<label>
<input type="radio" name="radio" value="1"> no - If 'no', what web address would you like?<br> 

<span class="eg"><em>e.g www.limoservices.co.uk</em> </span><span class="large"><BR>
<input name="no" type="text" id="textfield" />
<br>
<br>
How webpages are required?<br>

<label><input type="radio" name="color" value="1" checked>1<br> 
<input type="radio" name="color" value="1">1-5<br> 
<input type="radio" name="color" value="1">5-25<br> 
<input type="radio" name="color" value="1"> large database site with 100's of pages<br> 
<input type="radio" name="color" value="1"> not sure <br> 


<br>
What webpages do you want on your website? <BR>
(e.g. galleries, about us, product, services , enquiry form, documents downloads, video etc.) <br>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>

<label><br>
</label>

<span class="large">Do you require web hosting?</span><br>
<input type="radio" name="hosting" value="1" checked>yes<br> 
<input type="radio" name="hosting" value="1">no<br> 
<input type="radio" name="hosting" value="1">not sure<br> 

<br>
<span class="large">Do you require an email account?</span><span class="eg"><br>
<em> e.g [email]info@limoservices.co.uk[/email]</em></span>

<input name="account" type="text" id="textfield" />
<br>
<br>
<span class="large">Please provide web address links to websites that you would like your website to be similar </span><br>
<br>
<span class="large">Web address 1</span><br>
<input name="web1" type="text" id="textfield" />
<br>
<br>
<span class="large">Explain why you like it </span><br>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea><br>
</span><br>
<hr> <br>

<span class="large">Web address 2</span><br>
<input name="web2" type="text" id="textfield" />
<br>
<br>

<span class="large">Explain why you like it </span><br>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea><br><br>
<span class="large">Do you have a logo or brand identity that you would like us to use?</span> <br>
<label>
<input type="radio" name="brand" value="1" checked>yes<br> 
<input type="radio" name="brand" value="1">no<br> 

<br>
<span class="large">Do you have your own digital images that you would like us to use?<br>
<label>
<input type="radio" name="images" value="1" checked>yes<br> 
<input type="radio" name="images" value="1">no<br> 
<input type="radio" name="images" value="1" checked>i would like help with images<br> <br>


<span class="large">Do you have the text that is to be used on the website?</span><br>
<label>
<input type="radio" name="text" value="1" checked>yes<br> 
<input type="radio" name="text" value="1">no<br> 
<input type="radio" name="text" value="1">I would like help with the text<br> 

<br>
<span class="large">Does your website need to be in any multi-ethnic languages such as Punjabi, Bangladeshi, Urdu, polish, French etc?</span><br>
<label>
<input type="radio" name="lang" value="1" checked>no<br> 
<input type="radio" name="lang" value="1">If 'yes', please specify<br> 

<input name="yes" type="text" id="textfield" />
<br>
<br>

<input name="Submit" type="submit" class="prev" id="button" value="Previous" onClick="funAgree()">
</label>
</label>
<input name="button" type="submit" class="submitCopy" id="button" value="Next" onClick="funDisagree()" >
</form>
this is 3rd page
<script language="javascript">
function funAgree(){
document.form1.action="3.php";
}
function funDisagree(){
document.form1.action="5.php";
}
</script> 
<form id="form1" name="form1" method="post" action="mail.php">
<span class="large">Please select which website features you would like?<br>

</span><span class="large">
<label>
<input type="checkbox" name="checkbox" id="checkbox">
</label>
Live video cameras <br>
<label>
<input type="checkbox" name="checkbox2" id="checkbox2">
</label>
Contact form <br>
<label>
<input type="checkbox" name="checkbox3" id="checkbox3">
</label>
Video clips <BR>

<label>
<input type="checkbox" name="checkbox4" id="checkbox4">
</label>
Guestbook<br>
<label>
<input type="checkbox" name="checkbox5" id="checkbox5">
</label>
News alerts <br>
<label>
<input type="checkbox" name="checkbox6" id="checkbox6">
</label>
Dynamic picture galleries <br>
<label>
<input type="checkbox" name="checkbox7" id="checkbox7">
</label>
Blog<br>
<label>
<input type="checkbox" name="checkbox8" id="checkbox8">
</label>
Website feedback form <br>
<label>
<input type="checkbox" name="checkbox9" id="checkbox9" checked="checked">
</label>
Virtual tours <br>
<br>
Enter additional website features you require <br>
<label></label><textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>
<br><hr>
<div align="center" class="large"></div>
<br>
Please select which Graphic and designs features you would like<br>
<label>
<input type="checkbox" name="checkbox10" id="checkbox10">
</label>
Brochures<br>
<label>
<input type="checkbox" name="checkbox11" id="checkbox11">
</label>
Business cards<br>
<label>
<input type="checkbox" name="checkbox12" id="checkbox12">
</label>
Flyers<br>
<label>
<input type="checkbox" name="checkbox13" id="checkbox13">
</label>
Pamphlet<br>
<label>
<input type="checkbox" name="checkbox14" id="checkbox14">
</label>
Catalogue<br>
<label>
<input type="checkbox" name="checkbox15" id="checkbox15">
</label>
Letterheads <br>
<label>
<input type="checkbox" name="checkbox16" id="checkbox16">
</label>
Logo designs <br>
<label>
<input type="checkbox" name="checkbox17" id="checkbox17">
</label>
posters<br>
<label>
<input type="checkbox" name="checkbox18" id="checkbox18">
</label>
Compliment slip <br>
<label>
<input type="checkbox" name="checkbox19" id="checkbox19">
</label>
Annual reports <br>
<label>
<input type="checkbox" name="checkbox20" id="checkbox20">
</label>
Newsletters<br>
<label>
<input type="checkbox" name="checkbox21" id="checkbox21" checked="checked">
</label>
Calendar<br>
<br>
Enter additional graphics and design requirements you require <br>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>
</span>
<label><br>
</label>


<input name="Submit" type="submit" class="prev" id="button" value="Previous" onClick="funAgree()">
</label>
</label>
<input name="button" type="submit" class="submitCopy" id="button" value="Next" onClick="funDisagree()" >
</form>
this is 4th page
<script language="javascript">
function funAgree(){
document.form1.action="4.php";
}
function funDisagree(){
document.form1.action="mail.php";
}
</script> 
<form id="form1" name="form1" method="post" action="mail.php">
<span class="large">How do you want your website updated?<br>

<input type="radio" name="website" value="1" checked> I would like help with updating my website <br> 
<input type="radio" name="website" value="1"> I will update the website my self<br> 
<input type="radio" name="website" value="1"> I would like training on how to update the website<br>
<input type="radio" name="website" value="1" > not sure<br> 

</span><span class="large">
<label></label>
<br>
How would you rate your computer literacy skills<br>
<label>
<input type="radio" name="skill" value="1" > poor<br> 
<input type="radio" name="skill" value="1"> medium<br> 
<input type="radio" name="skill" value="1"> good<br> 
<input type="radio" name="skill" value="1" checked> excellent<br> 

<br>
How often does your website need to be updated ?<br>
<label>
<input type="radio" name="update" value="1" checked> not very often<br> 
<input type="radio" name="update" value="1"> occasionally<br> 
<input type="radio" name="update" value="1"> frequently<br> 
<input type="radio" name="update" value="1"> not sure<br> 

<br>
What sections of your website do you need to update the most<br>
<label></label><textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>
<br><hr>
When do you wish to launch the website ?<br>

<label></label>
<label>
<input type="launch" name="launch" id="textfield">
<br>
</label>
<br>
Please enter reference code 10% for discount <br>
<input type="text" name="code" id="textfield">
<br>
<br>
Please enter any other information that you feel is relevant to the project here<br>
<textarea name="textarea" id="textarea" cols="45" rows="5"></textarea>
<br>
<br>
Enter verification image <br><input name="verif_box" type="text" id="verif_box" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;"/>
<img src="verificationimage.php?<?php echo rand(0,9999);?>" alt="verification image, type it in the box" width="50" height="24" align="absbottom" /><br />
<br />

<!-- if the variable "wrong_code" is sent from previous page then display the error field -->
<?php if(isset($_GET['wrong_code'])){?>
<div style="border:1px solid #990000; background-color:#D70000; color:#FFFFFF; padding:4px; padding-left:6px;width:295px;">Wrong verification code</div><br /> 
<?php ;}?>
</span>
<label><br>
</label>


<input name="Submit" type="submit" class="prev" id="button" value="Previous" onClick="funAgree()">
</label>
</label>
<input name="button" type="submit" class="submitCopy" id="button2" value="Submit" onClick="funDisagree()" >
</form>
this is 5th page
<?php
$body = "";
foreach($_POST as $key => $value) {
$body .= "$key : $value \n";
}
mail("your-email", "Web site comments", $body, "From: [email]webmaster@yahoo.co.uk[/email]");
?>

Thanks - Email Send - Done
this is php page...
can anyone tell me how it will show all page output..

It is because you are using multiple html forms and you can only submit the form which javascript specifies or the form the the submit button is inside. So you will need to either merge all the forms to one big form or submit the forms one at a time.

Then when one file posts to another, include the following code and will convert the $_POST to $_SESSION. But be sure to put session_start(); at the top of your pages.

foreach($_POST AS $keyzz => $valzz) {
$_SESSION[$keyzz]=$valzz;
}

So when you submit the last page, you can then refer to all the previous posts as sessions.

cwarn23 i did update u told me but nothing it only showing 5th page form output not others...

cwarn23 i did update u told me but nothing it only showing 5th page form output not others...

Hi rohnni...

if u take 5 forms..
than i can do like this way...after completion of first page, u can insert data into your table...if first submit form succefully submitted, than form action give to second page...

from second page onwards u need to update ur table untill u completed 5 pages...

after completion of all pages.at the last page u retrive complete data from ur table and send them to their mailid...

in this way u have to take ur own risk...

cwarn23 i did update u told me but nothing it only showing 5th page form output not others...

I just tested it and it works for me so your probably not retrieving the values properly. I shall draw a diagram for you and below is an example of 4 pages with 3 forms and the last page will display the results.
page1.php

<?
echo "<form method='post' action='page2.php'>
<input type='text' value='test' name='testvar'>
<input type='submit' value='continue'></form>";
?>

page2.php

<?
session_start();
foreach($_POST AS $keyzz => $valzz) {
$_SESSION[$keyzz]=$valzz;
}
echo "<form method='post' action='page3.php'>
<input type='text' value='100' name='number'>
<input type='submit' value='continue'></form>";
?>

page3.php

<?
session_start();
foreach($_POST AS $keyzz => $valzz) {
$_SESSION[$keyzz]=$valzz;
}
echo "<form method='post' action='page4.php'>
<input type='text' value='value' name='last'>
<input type='submit' value='continue'></form>";
?>

page4.php

<?
session_start();
foreach($_POST AS $keyzz => $valzz) {
$_SESSION[$keyzz]=$valzz;
}
foreach($_SESSION AS $key => $val) {
echo '<b>'.$key.'</b> = '.$val.'<br>';
}
?>

hi cwarn..

It looks very good...
here u used $keyzz ....can u give more explanation about $keyzz..
This having any predefined varible or u declre manually...plz explian me ur good logic...

Well $keyzz in the foreach loop contains the data between the post brackets [] which is then used to place between the session brackets.

Well $keyzz in the foreach loop contains the data between the post brackets [] which is then used to place between the session brackets.

Hi thank u...
i got it....i will try to get more from net...thank u...

<input type="checkbox" name="camera" id="checkbox" value="1">
  </label>
  Live video cameras <br>
  <label>
  <input type="checkbox" name="contact" id="checkbox2" value="2">
  </label>
  Contact form <br>
  <label>
  <input type="checkbox" name="video" id="checkbox3" value="3">
  </label>
  Video clips <BR>
   
    <label>
    <input type="checkbox" name="guestbook" id="checkbox4" value="4">
    </label>
      Guestbook<br>
      <label>
      <input type="checkbox" name="news" id="checkbox5" value="5">
      </label>
      News alerts <br>
      <label>
      <input type="checkbox" name="dynamic" id="checkbox6" value="6">
      </label>
      Dynamic picture galleries <br>
      <label>
      <input type="checkbox" name="blog" id="checkbox7" value="7">
      </label>
      Blog<br>
      <label>
      <input type="checkbox" name="feedback" id="checkbox8" value="8">
      </label>
      Website feedback form <br>
      <label>
      <input type="checkbox" name="viatualtours" id="checkbox9" checked="checked" value="9">
      </label>
      Virtual tours <br>

i want to put some checkboxes but we i get mail it showing that

<b>Notice</b>:  Undefined index:  camera in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>92</b><br />

video : <br />
<b>Notice</b>:  Undefined index:  video in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>94</b><br />

guestbook : <br />
<b>Notice</b>:  Undefined index:  guestbook in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>95</b><br />

news : <br />
<b>Notice</b>:  Undefined index:  news in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>96</b><br />

dynamic : <br />
<b>Notice</b>:  Undefined index:  dynamic in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>97</b><br />

blog : <br />
<b>Notice</b>:  Undefined index:  blog in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>98</b><br />

feedback : <br />
<b>Notice</b>:  Undefined index:  feedback in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>99</b><br />

virtualtours : <br />
<b>Notice</b>:  Undefined index:  virtualtours in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>100</b><br />

can anyone know about it?

hi carn, i add hideen input field and now it showing all page output
but it showing only names the text i fill in the fields nt not showing :-(

i want to put some checkboxes but we i get mail it showing that

<b>Notice</b>: Undefined index: camera in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>92</b><br />

video : <br />
<b>Notice</b>: Undefined index: video in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>94</b><br />

guestbook : <br />
<b>Notice</b>: Undefined index: guestbook in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>95</b><br />

news : <br />
<b>Notice</b>: Undefined index: news in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>96</b><br />

dynamic : <br />
<b>Notice</b>: Undefined index: dynamic in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>97</b><br />

blog : <br />
<b>Notice</b>: Undefined index: blog in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>98</b><br />

feedback : <br />
<b>Notice</b>: Undefined index: feedback in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>99</b><br />

virtualtours : <br />
<b>Notice</b>: Undefined index: virtualtours in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\5.php</b> on line <b>100</b><br />
can anyone know about it?

Those errors aren't that important and are just notices. They can be turned off by placing the following code at the top of your page.

error_reporting(E_ALL ^ E_NOTICE);

HI...
this ia not an error...but, if u can replace all the above notices..
you have to put some code at the top of ur php page....

<?php error_reporting(E_ALLL^E_NOTICE); ?>

yesterday somebody told about this one...try to do it..

HI...
this ia not an error...but, if u can replace all the above notices..
you have to put some code at the top of ur php page....

<?php error_reporting(E_ALLL^E_NOTICE); ?>

yesterday somebody told about this one...try to do it..

lol, I did it again. We both posted at the same time.

hey i did post <?php error_reporting(E_ALLL^E_NOTICE); ?>

this on my pages but i got these notice again on my email...

Mysql tables or html tables. Assuming mysql tables, you would do very much like post except you use $_SESSION abbreviation instead of $_POST. So below is an example:

mysql_query("INSERT INTO `table` SET `column1`='".mysql_real_escape_string($_SESSION['person'])."', `column2`='".mysql_real_escape_string($_SESSION['age'])."' `column3`='".mysql_real_escape_string($_SESSION['gender'])."'") or die(mysql_error());

But you will need to adjust the session array accordingly to what the names of your html input fields were.

thanks, please tell me why its not showing the output we fill in text boxes it only showing boxes name...

i add

<input type='hidden' name='title' value='<?php echo $_POST['title']?>' /> 
   <input type='hidden' name='name' value='<?php $_POST['name']?>' /> 
    <input type='hidden' name='lname' value='<?php $_POST['lname']?>' /> 
     <input type='hidden' name='address' value='<?php $_POST['address']?>' />
      <input type='hidden' name='pin' value='<?php $_POST['pin']?>' />  
      <input type='hidden' name='country' value='<?php $_POST['country']?>' /> 
       <input type='hidden' name='contact' value='<?php $_POST['contact']?>' /> 
        <input type='hidden' name='email' value='<?php $_POST['email']?>' /> 
        <input type='hidden' name='title' value='<?php echo $_POST['title']?>' />

on all form pages so that it can show the all forms output...

Try this:

<input type='hidden' name='title' value='<?php echo $_SESSION['title']; ?>' /> 
<input type='hidden' name='name' value='<?php echo $_SESSION['name']; ?>' /> 
<input type='hidden' name='lname' value='<?php echo $_SESSION['lname']; ?>' /> 
<input type='hidden' name='address' value='<?php echo $_SESSION['address']; ?>' />
<input type='hidden' name='pin' value='<?php echo $_SESSION['pin']; ?>' /> 
<input type='hidden' name='country' value='<?php echo $_SESSION['country']; ?>' /> 
<input type='hidden' name='contact' value='<?php echo $_SESSION['contact']; ?>' /> 
<input type='hidden' name='email' value='<?php echo $_SESSION['email']; ?>' /> 
<input type='hidden' name='title' value='<?php echo $_SESSION['title']; ?>' />

The reason why I used session is because in the foreach loop I gave you earlier it converts all posts to sessions when can be passed between multiple pages.

b>Notice</b>: Undefined index: checkbox2 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>76</b><br />

checkbox3 : <br />
<b>Notice</b>: Undefined index: checkbox3 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>77</b><br />

checkbox4 : <br />
<b>Notice</b>: Undefined index: checkbox4 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>78</b><br />


checkbox5 : <br />
<b>Notice</b>: Undefined index: checkbox5 in <b>E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\3.php</b> on line <b>79</b><br />

how to solve it?

I don't know how many times this has been posted on this topic but put at the top of all your pages the following code:

error_reporting(E_ALLL^E_NOTICE);

i did update it showing this

Notice: Use of undefined constant E_ALLL - assumed 'E_ALLL' in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\2.php on line 57

This article has been dead for over six months. Start a new discussion instead.