By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,369 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,369 IT Pros & Developers. It's quick & easy.

_POST check then _POST same info

P: 9
Well its a registry form and i want them post there info then when they press submit it will show them there name, email and all that stuff, then i wanted to know if it is possible to submit the same info again if they press yes, without then typing out, help would be appreciated
here is a sample of my check page
Expand|Select|Wrap|Line Numbers
  1. <? echo <<<EOF
  2. Is this you're correct information?<br>
  3. Name: $_POST[name]<br>
  4. Email: $_POST[email]<br>
  5. Password length: strlen($_POST[password]);
  6. EOF;
  7. ?>
[Please use CODE tags when posting source code. Thanks! --pbmods]
Jun 3 '07 #1
Share this Question
Share on Google+
2 Replies


P: 93
You could either say:
Expand|Select|Wrap|Line Numbers
  1. Is this your correct information?
  2. <form action="whatever.php" method="POST">
  3. <input type="text" name="name" value="<?php print stripslashes(trim($_POST['name'])); ?>"><br>
  4. <input type="text" name="email" value="<?php print stripslashes(trim($_POST['email'])); ?>">
  5. etc....
  6. </form>
  7.  
[Please use CODE tags when posting source code. Thanks! --pbmods]


That would allow them to edit it if it's not correct.
Or, you could do what you've done, and then have all the info again in hidden form fields, but this wouldn't allow them to edit it, they'd have to go back or somthing.

Expand|Select|Wrap|Line Numbers
  1. <form action="whatever.php" method="POST">
  2. <input type="hidden" name="name" value="<?php print stripslashes(trim($_POST['name'])): ?>"> etc...
Jun 3 '07 #2

P: 9
You could either say:
Is this your correct information?
<form action="whatever.php" method="POST">
<input type="text" name="name" value="<?php print stripslashes(trim($_POST['name'])); ?>"><br>
<input type="text" name="email" value="<?php print stripslashes(trim($_POST['email'])); ?>">
etc....
</form>


That would allow them to edit it if it's not correct.
Or, you could do what you've done, and then have all the info again in hidden form fields, but this wouldn't allow them to edit it, they'd have to go back or somthing.

<form action="whatever.php" method="POST">
<input type="hidden" name="name" value="<?php print stripslashes(trim($_POST['name'])): ?>"> etc...
Wow thanks, your a star :) its working thanks alot
Jun 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.