help me with update records in mysql database

[COLOR=#5A5A5A]

Look, my update.php is like this now
[COLOR=#FF0000]<?php
$servername = “localhost”;
$username = “root”;
$password = “…”;
$dbname = “webtest”;

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

$sql = “UPDATE users SET password=‘cotton candy’ WHERE id=10”;

if ($conn->query($sql) === TRUE) {
echo “Record updated successfully”;
} else {
echo "Error updating record: " . $conn->error;
}

$conn->close();
?>
but now i have still have to go into the php file to change the valeu or the id
but i looked on site and youtube how to put it in a simple html form
but it still does not work.

i want it in a html from.
I want that when I enter the ID that the data of the user appears and that I can change any valeu separately.[/INDENT]

Hi tyrone99;

I would recommend reading through some basic PHP/HTML tutorials. It looks like you have the PHP/MySQL portion working, so you just need to learn how to pass information from an HTML form into your PHP script:

[url]http://www.w3schools.com/php/php_forms.asp[/url]

-Scott