Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to generate a datalist with edit option after giving submit button in the form in php and html?
    text
    copied!<p>I have created a login form using php and html in which if i give the wrong user and password it shows error. There is also a signup link to create a new user and password. If the user and password are correct, it will be redirected to a form page which has name, work area, mobile, Email, Comments.</p> <p>If user enter the details and click submit, data will be added to database and a page will be displayed with the data entered.</p> <p>Now, i need to edit the data that is shown in the last page. And the data page that is shown must have all the details entered in that id.</p> <p>Thanks in advance![This is the form image and the php coding that work on page generation![</p> <pre><code>&lt;?php $connect=mysql_connect("localhost","root","user"); if(!$connect) { die('Could not connect: ' .mysql_error()); } mysql_select_db("form",$connect); $name=$_POST["name"]; $email=$_POST["email"]; $number=$_POST["number"]; $org=$_POST["org"]; $message=$_POST["message"]; $sql="INSERT INTO cath values('$name','$email','$number','$org','$message')"; if(!mysql_query($sql,$connect)) { die('error:'.mysql_error()); } echo "One record added"; mysql_close($connect); ?&gt; &lt;?php echo "&lt;br&gt;"; $connect=mysql_connect("localhost","root","user"); mysql_selectdb("form"); $result=mysql_query("SELECT * FROM cath"); echo "The details are...."; while($rows=mysql_fetch_array($result)) { echo "&lt;br&gt;"; echo $name; echo "&lt;br&gt;"; echo $email; echo "&lt;br&gt;"; echo $number; echo "&lt;br&gt;"; echo $org; echo "&lt;br&gt;"; echo $message; } ?&gt;] </code></pre> <p><a href="http://i.stack.imgur.com/1lJAg.png" rel="nofollow">1</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload