psquillace Posted March 21, 2008 Share Posted March 21, 2008 Hello All: I have 2 forms on my website and basicaly what it does it pass the info in the form fields from one page to the other where people actually sign up for our newsletter. What I did was put value="<?php echo $_POST['Postal_Code']; ?>" in every form field on the landing php page so it would grab all the info from the front page. However, now if you just GO to that page with out filling anything in on the front page, the page opens with all the forms filled in with <BR /> tags in them. Is there something I am missing on this? Thanks for any help or advice, Paul Link to comment https://forums.phpfreaks.com/topic/97224-passing-form-data/ Share on other sites More sharing options...
cooldude832 Posted March 21, 2008 Share Posted March 21, 2008 well considering your POST data would be empty if no post data is sent, and I don't see you putting a <br /> in the value portion of the inputs I'd say that we'd need to see more to help u Link to comment https://forums.phpfreaks.com/topic/97224-passing-form-data/#findComment-497470 Share on other sites More sharing options...
psquillace Posted March 21, 2008 Author Share Posted March 21, 2008 Well, Here are a couple of rows of the landing page form: <tr> <td width="175" align="left" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">First Name: <font color="#FF0000">*</font><br /> <input name="First_Name" type="text" id="First_Name" size="25" value="<?php echo $_POST['First_Name']; ?>" /></font> </td> </tr> <tr> <td width="100" align="left" valign="top"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Last Name: <font color="#FF0000">*</font><br /> <input name="Last_Name" type="text" id="Last_Name" size="25" value="<?php echo $_POST['Last_Name']; ?>" /></font> </td> </tr> Let me know what more you need to see or if this is enough... thanks for your help, PM Link to comment https://forums.phpfreaks.com/topic/97224-passing-form-data/#findComment-497478 Share on other sites More sharing options...
craygo Posted March 21, 2008 Share Posted March 21, 2008 The <BR> is the start of the error code that php is sending out saying it cannot find the variable for the POST data. It is doing what it is suppose to do. If you have not sent any POST data you will get the error for every variable you are trying to echo out. The actual full error code would be something like this <br /> <b>Notice</b>: Undefined index: data in <b>c:\Inetpub\wwwroot\phpforum\prev7~.php</b> on line <b>13</b><br /> That's why you see the <br /> Ray Link to comment https://forums.phpfreaks.com/topic/97224-passing-form-data/#findComment-497482 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.