$sql="UPDATE detail SET 'user_name'='".$_POST['user_name']."','password'='".$_POST['password']."' WHERE 'id'='".$_GET['id']."'";



<form method="post" action="index.php?id=<?php $_GET['id']; ?>">
id:<input type="text" name="id" value="<?php echo $_POST['id']; ?>" /><br/>
user_name:<input type="text" name="user_name" value="<?php echo $_POST['user_name']; ?>" /><br/>
password:<input type="password" name="password" value="<?php echo $_POST['password']; ?>"/><br/>
<input type="submit" value="submit" />

Recommended Answers

All 2 Replies

Error? Reason for posting? Although the $sql looks like it wont work is that correct?

Member Avatar for diafol


Unless you supply a question, how can you expect an answer?

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.