PHP: MySql Update Statement by displaying information first -
i want update info mysql database through displaying first. used textarea display information updated database.
viewupdate.php
<?php $host="localhost"; $user_name="root"; $database_name="5r"; $db=mysql_connect($host, $user_name,''); if (mysql_error() > "") echo mysql_error() . "<br>"; mysql_select_db($database_name, $db); if (mysql_error() > "") echo mysql_error() . "<br>"; $query = "select * tblmain no=1"; $result = mysql_query($query); while($row = mysql_fetch_array($result,mysql_assoc)) { echo '<form method="post" action="updatemain.php"> <table border=0> <tr> <td><font face="times new roman" color="463d01" size=3> title: <br> <textarea rows=2 cols=30 name="s1" id="s1">'.$row["title"].'</textarea></font><br> <font face="times new roman" color="463d01" size=3> information: <br> <textarea rows=5 cols=30 name="s2" id="s2">'.$row["info"].'</textarea></font><br><br> </tr> <tr> <td><input name="update" type="submit" id="update" value="save changes" class="btn btn-primary">     </form><a href="admin1.php"><button type="button" class="btn btn-primary">cancel</button></a> </tr> </table>';
aside <textarea>
, how can used <input type="text">
display short detail updated?
Comments
Post a Comment