Jump to content

Recommended Posts

I have two html pages the first one has email, and name input s. the second page should have amoung other things these two info.

 

I want to display this name and email into the apropriate inputs of the second page while it is being loaded

 

I already assigned those values to variables in php file but my concern is mainly how to use them.

 

any ideas.

 

thanks

<input type="text" name="fieldname" value="<?php echo $_POST['fieldname']; ?>" />

 

You may need to stripslashes on the post fields, you can do them all at once like so, but be cautious if you are entering this data into a DB

 

<?php
foreach ($_POST as $key => $val) {
     $_POST[$key] = stripslashes($val);
}
?>

if you want to display the email address somewhere, you would just use the "$_POST" global variable to retrieve that info. you said you changed it into a variable, but i don't know what that variable was, so i'll make one up...

 

   $email = $_POST['s'];

 

if you wanted to display it anywhere on the page, you could say

 

<p>The email you supplied is <?php echo "".$email.""; ?></p>

 

if you didn't need to display it, but just pass it along from the second page of the form to, say, a database insert, you would need to turn it into a hidden input field of the form, thusly:

 

<input type="hidden" name="s" value="<?php echo "".$email.""; ?>" />

 

something like that.

can you guys elaborate a little. to make sure we are in the same frequency this is where am blocked.

 

in the first page:

<input type "text" name "email">

let's the user inputs qqqqqq@qqqq.net

and hit next

 

The second page is loaded

this page has (amoung other ethings) a field reserved for the e-mail. this field's value should be qqqqqq@qqqq.net.

 

thanks

 

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.