I don't understand, when I run this command in mySql directly it works but when I try to do it in a form it does not. I think the mistake is in the UPDATE somewhere:
This is how I do it in mySql, and it works fine:
UPDATE `myTable` SET `sourceId` = `1021` WHERE `source` = `University Of Toronto` ;
This is how I am trying to do in a form but nothing happens:
<?php
$hostname="someserver.net";
$username="someusername";
$password="somepassword";
$dbname="someusername";
$usertable="sometable";
$sourceId=$_POST['sourceId'];
$source=$_POST['source'];
mysql_connect($hostname,$username,$password) or die(mysql_error());
mysql_select_db("$dbname") or die(mysql_error());
mysql_query("UPDATE `$usertable` SET `sourceId` = `$sourceId` WHERE `source` = `$source`");
Print "Your information has been successfully added to the database.";
?>