Jump to content

Passing Form Data


psquillace

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.