i have form, user can fill in name, email, address, phone, age , can order product.
after submitting form, information stored in database & phpmail
send email information.
but after submit, want user see :
this details: http://example.com/order.php?unique=21434612
on clicking link, see page information had filled in form. :
``` name : $name
your age is: $age
etc. ```
so how can generate auto html pages after submit?
write code on page want detail.configure details. dbname , row details etc. yes data printed in table format. if dont remove it.
.
if(isset($_post['submit'])) { $con=mysqli_connect("localhost", "root", " ") or die (mysqli_error ()); // select database mysqli_select_db($con,"rdb") or die(mysqli_error()); // sql query $strsql = "select * tablename"; // execute query (the recordset $rs contains result) $rs = mysqli_query($con,$strsql); print " <table border=\"5\" cellpadding=\"5\" cellspacing=\"0\" style=\"border- collapse: collapse\" bordercolor=\"#808080\" width=\"100%\" id=\"autonumber2\" bgcolor=\"#c0c0c0\"> <tr> <td width=100>id:</td> <td width=100>first name</td> <td width=100>last name</td> <td width=100>email</td> <td width=100>user name</td> <td width=100>password</td> <td width=100>date of birth</td> <td width=100>gender</td> </tr>"; while($row = mysqli_fetch_array($rs)) { print "<tr>"; print "<td>" . $row['id'] . "</td>"; print "<td>" . $row['fname'] . "</td>"; print "<td>" . $row['lname'] . "</td>"; print "<td>" . $row['email'] . "</td>"; print "<td>" . $row['uname'] . "</td>"; print "<td>" . $row['password'] . "</td>"; print "<td>" . $row['dob'] . "</td>"; print "<td>" . $row['gender'] . "</td>"; print "</tr>"; } print "</table>"; } }
Comments
Post a Comment