Jump to content

html form - > confirmation page - > send data


grk101

Recommended Posts

Okay, i tried search this form, and have provide a screen shot to show that i keep getting errors when searching.. anyway

 

this is what i want to do... fill out form (html ) goes to a confirmation page and then the data is submitted.

 

so i started with something small.

HTML FORM PAGE

<form id="form1" name="form1" method="post" action="confirm.php">
  Name: 
  <label>
  <input type="text" name="name" />
  </label>
  <p>
    <label>
    <input type="submit" name="button" id="button" value="Submit" />
    </label>
  </p>
</form>

 

Confirm page:

 

<form id="form1" name="form1" method="post" action="submit.php">
  Name: 
  <label>
  <input type="hidden" name="name" value="<? echo $_POST['name']?>" 

  </label>
  <p>
    <label>
    <input type="submit" name="button" id="button" value="Submit" />
    </label>
  </p>
</form>

 

 

 

When hit submit on the htmlform so i can see verify the data, i get nothing, an empty name saying : NAME:

 

am i doing something wrong?  will the values on the cofirm.php than pass to the submit.php?

 

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/166284-html-form-confirmation-page-send-data/
Share on other sites

hey mate, you forgot a ";"

i'd recommend going to http://w3schools.com/php/default.asp - got a lot of great information on the website

 

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

 

<form id="form1" name="form1" method="post" action="submit.php">
  Name:
  <label>
  <input type="hidden" name="name" value="<?php echo $_POST['name']; ?>"

  </label>
  <p>
    <label>
    <input type="submit" name="button" id="button" value="Submit" />
    </label>
  </p>
</form>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.