Click here to Skip to main content
15,887,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
MY database name = loginapp
table name = users

rather that updating the data it is adding a row to my sql



include "functions.php";
?>
if(isset($_POST['submit'])){

UpdateTable();
}

?>



<html>

<head>

<title> THis is the login page </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" >
</head>


<body>






<form action="login_update.php" method="post">


<label for="username">Username</label>
<input type="text" name="username" class="form-control">




<label for="password">Password</label>
<input type="password" name="password" class="form-control">




<select name="id" id="">


showAllData();
?>





</select>



<input class="btn btn-primary" type="submit" name="register" value="UPDATE">

</form>





</body>

</html>

What I have tried:

i have tried all the procedures along with UPDATING but looks like it is working like a INSERT command.
Posted
Updated 14-Mar-16 2:56am

1 solution

Where is the code for the UpdateTable() method?

This is very, very, easy solution. Write an UPDATE statement instead of an INSERT statement.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900