473,320 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

_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
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
2 1375
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
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

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

Similar topics

10
by: arun.kumar.varma | last post by:
Hi, I'm learning PHP and prepared a simple login form. validate.php does the validation and it was behaving erratically. So, I did var_dump of $_POST variable and it's NULL. Did I miss anything...
14
by: billy.becker | last post by:
I need to save a wav file that is HTTP POSTed to a php page. What does PHP5 do automatically to a POSTed variable when it puts it in the $_POST superglobal array? I haven't been able to find any...
9
by: lovinlazio9 | last post by:
I've just started messing around with PHP and believe it or not its extremely frustrating haha. Anyway, I wanted to make a simple input form that would display the info after submitting it... The...
2
by: pm1ccc | last post by:
Hi, I have written following code and not getting back values in the same form ( i have used phpself) <?php $Fname = $_POST; $Lname = $_POST; $gender = $_POST; $food = $_POST; $quote =...
12
by: Todd Michels | last post by:
Hi all, I am trying to send data from a form and insert it into a MSSQL DB. When I submit the data I get: Warning: mssql_query() : message: The name "Todd" is not permitted in this context....
2
by: keeps21 | last post by:
I have a script that recieves an id number via the address bar when a link is clicked. ie . index.php?id=1 if the link was for the story whose ID is 1. My script checks if a user is logged in,...
5
Tarantulus
by: Tarantulus | last post by:
Hi, ok, quick description of the problem, I'm trying to reference the postdata from some checkboxes. Unfortunately the checkboxes are dynamically generated therefore I don't know how many there...
4
by: mtuller | last post by:
I have a page that submits data to a database, and I want to make it so that if the page is refreshed, it doesn't submit the information again. I am trying to use unset the variables so that if the...
16
luckysanj
by: luckysanj | last post by:
For example i have two files one in index.php & another is check.php. index.php <body> <form id="form1" name="form1" method="post" action="check.php?id=tbl1"> <table width="200" border="1"> ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.