hansman Posted June 24, 2008 Share Posted June 24, 2008 hi, i currently have all my mysql data displayed in a tabe. I would like to add a button to delete all the data in the row. Can some please assit me in doing this. Thank you in advance <html> <head> <title>Displaying MySQL Data</title> </head> <body> <p> <?php $db_host="xxxxxxt"; // Host name $db_user="xxxxxxxx"; // Mysql username $db_pwd="xxxxxxxx"; // Mysql password $db_name="xxxxxxxx"; // Database name mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($db_name); $query="select * from test_mysql"; $result=mysql_query($query); echo "<table border=1>"; echo "<tr>"; for($i=0;$i<mysql_num_fields($result);$i++) { echo "<th>"; echo mysql_field_name($result, $i); echo "</th>"; } while($row=mysql_fetch_row($result)) { echo "<tr>"; for($j=0;$j<$i;$j++) { echo "<td>"; echo $row[$j]; echo "</td>"; } echo "</tr>"; } echo "</tr>"; echo "</table>"; ?> </p> <p><a href="http://www.xxxxx.com/insert.php">Click Here to Enter More data!</a></p> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/111666-deleting-a-mysql-row/ Share on other sites More sharing options...
.josh Posted June 24, 2008 Share Posted June 24, 2008 Basic Database Handling Quote Link to comment https://forums.phpfreaks.com/topic/111666-deleting-a-mysql-row/#findComment-573193 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.