i want to edit multiple fields.
from this code i am able to edit only that particular field.
can any one write the code for me.
<?php
$hostname = "localhost";
$username = "";
$password = "";
$database = "";
// Connect to the database
mysql_connect($hostname, $username, $password) OR DIE("Unable to connect");
mysql_select_db("$database") or die("Unable to select database");
if (isset($_POST['ud_date'])) {
$query = sprintf("UPDATE test_mysql SET content='%s' WHERE id=%d",
mysql_real_escape_string($_POST['ud_date']),
2);
if (mysql_query($query)) {
echo 'update query succeeded';
} else {
echo 'update query failed';
}
} else {
echo 'please submit the form';
}