Hi Guys,

I am working on PHP MYSQL Update query, I am ended up with a Syntax error which I have tried but could not resolve. Can you please help me get it resolve with thanks in advance ! Code below:-


$con = mysql_connect("localhost", "root", "");
mysql_select_db("myDB") or die ("DB Error");

$sql = "select * from Students";
$run = mysql_query($sql);

echo "<table border=1>

<th> Member ID </th>
<th> SurName</th>
<th> ForeName</th>
<th> Address </th>
<th> Membership Type </th>
<th> Update </th>";

while($row =mysql_fetch_array($run)) { ?>


<td> <? echo $row[0];?> </td>
<td> <? echo $row[1];?> </td>
<td> <? echo $row[2];?> </td>
<td> <? echo $row[3];?> </td>
<td> <? echo $row[5];?> </td>
<td> <a href="updatemember.php?id=<? echo $row[0];?>"> Edit </a></td>

<? } ?>
Quote 0 0
Write a reply...