0

it doesn't have any error but also i doesn't update in my database?

<head>
</head>
<?php include('connect.php');?>
<body>
<?php
mysql_select_db("dbusers",$connection);

$result=mysql_query("UPDATE tblinfo SET idno='$idno', name='$name', address='$address', birthdate='$birthdate', contact='$contact', email='$email' WHERE 'index'='$id'");

$result = mysql_query($update)


?>

</body>
</html>

4
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by faroukmuhammad
1

check for the $id value , whether it is there(db table) or not.
And also remove single quotes for index here :

WHERE 'index'='$id'

if still eror:
print your query like :

echo $qry="UPDATE tblinfo SET idno='$idno', name='$name', address='$address', birthdate='$birthdate', contact='$contact', email='$email' WHERE 'index'='$id'";
$result=mysql_query($qry);

Try to excute the printed query in PHPMyAdmin,check what error comes.

0

Shanti Chepuru is 90% right but there is still a little modification. Line 2 shoul be:

$result=mysql_query($qry, $connection);
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.