Hi
I am just stucked. Would be great if someone can help me.
I have created form in page1.html. User fill the form and can view it in page2.php where there is also an edit button.
If they need to edit any details, page3.php comes and they they can edit it. There is a confirm button on page3.php.
I have created another page4.php with commands to save the data in mysql.
Where I am stucked is, when user hit submit on page1.html, I need to page2.php to come and at the same time save those details to database using page4.php.
ANd
If user choose to edit, the data will be edited in mysql when confirmed button is pressed on page3.php.
I am giving a short coding for 3 pages:
Page 1: (HTML- FORM)
<html>
<body>
<form action="page2.php" method="post">
Name : <input type="text" name="name"/>
<input type="submit" value="Submit"/>
</form>
</body>
</html>
PAGE 2 (Displaying Input Values)
<html>
<?php session_start();?>
<body>
<form action="page3.php" method="post">
Name :<?php
$name=$_POST;
$_SESSION=$name;
echo $_SESSION; ?>
<input type="Submit" value="Edit">
</form>
</body>
</html>
Page 3 (editing field with prefilled fields)
<html>
<?php session_start();?>
<head>
<?php
$name=$_SESSION;
$discount=$_SESSION;
echo
"<form action=\"page4.php\" method=\"POST\">
Name :<input type=\"text\" name=\"name\" value=\"$name\"/> </br>
<input type=\"submit\" value=\"Confirmed\"/>";
?>
</body>
</html>
THank you ver very much.......