Hi Mac
Below is the code. When the user presses the update button the variables are assigned and should be sent to the database but it doesn't seem to work?
Looked through text book, online and pdf files but cant figure it out.
Thanks
Language: PHP
// checks to see if update button pressed
if ($_SERVER[';REQUEST_METHOD';] == ';POST';)
{
//assigns values in textareas to variables
$type_id = $_GET[';type_id';];
$name = $_POST[';name';];
$origin = $_POST[';origin';];
$strength = $_POST[';strength';];
$price = $_POST[';price';];
//updates the database with name, origin, strength and price based on id variable
$update = "UPDATE info SET name = $name, origin = $origin, strength = $strength, price = $price WHERE type_id = $type_id";
$result = mysql_query($update);
print "<br>The coffee $name from $origin was succesfully updated.<br>Price: $price and Strength: $strength .";
}