Originally posted by jeff_lawik
Hello,
I don't know how to call a function using a form.
Example:
function update ();
{
query update msyql database w/ variables of the form.
}
form
What exactly are you trying to do? Submit data through a form and then use the function to handle that data?
If that is the case, once you submit the data pass it to the function like this:
function testfunction($id, $name, $city, $db_connection)
{
$query = "update MYTABLE set name=\"" . $name . "\", city=\"" . $city . "\" where id=" . $id . "";
if(!(mysql_query($query, $db_connection)))
{
/ error /
}
}
You pass the $id, $name, $city, $db_connection variables in with the call to the function. ($db_connection would be your link to the databse.)
Is this at all what you are trying to do?
-- Jason