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>

Recommended Answers

All 3 Replies

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.

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

$result=mysql_query($qry, $connection);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.