_POST check then _POST same info

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kenno69
    New Member
    • Jun 2007
    • 9

    _POST check then _POST same info

    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
    [code=php]
    <? echo <<<EOF
    Is this you're correct information?<br >
    Name: $_POST[name]<br>
    Email: $_POST[email]<br>
    Password length: strlen($_POST[password]);
    EOF;
    ?>[/code]

    [Please use CODE tags when posting source code. Thanks! --pbmods]
    Last edited by pbmods; Jun 3 '07, 03:00 PM. Reason: Added code tags.
  • adamalton
    New Member
    • Feb 2007
    • 93

    #2
    You could either say:
    [code=html]
    Is this your correct information?
    <form action="whateve r.php" method="POST">
    <input type="text" name="name" value="<?php print stripslashes(tr im($_POST['name'])); ?>"><br>
    <input type="text" name="email" value="<?php print stripslashes(tr im($_POST['email'])); ?>">
    etc....
    </form>
    [/code]

    [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.

    [code=html]
    <form action="whateve r.php" method="POST">
    <input type="hidden" name="name" value="<?php print stripslashes(tr im($_POST['name'])): ?>"> etc...[/code]

    Comment

    • kenno69
      New Member
      • Jun 2007
      • 9

      #3
      Originally posted by adamalton
      You could either say:
      Is this your correct information?
      <form action="whateve r.php" method="POST">
      <input type="text" name="name" value="<?php print stripslashes(tr im($_POST['name'])); ?>"><br>
      <input type="text" name="email" value="<?php print stripslashes(tr im($_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="whateve r.php" method="POST">
      <input type="hidden" name="name" value="<?php print stripslashes(tr im($_POST['name'])): ?>"> etc...
      Wow thanks, your a star :) its working thanks alot

      Comment

      Working...