I've added more echo statements to get an output this is what my php scrpt looks like now:
PHP Code:
<?php
$con = mysql_connect("localhost","Username","Password");
echo "con = ";
echo $con;
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
else
{
$db = mysql_select_db("MyDb", $con);
echo "<P>";
echo "db = ";
echo $db;
$mysql_query = ("INSERT INTO `MyDb`.`Users` (Email, UserName, Password, DateJoined) VALUES (g, g, g, 2010-08-31)");
echo "<P>";
echo "mysql = ";
echo $mysql_query;
}
mysql_close($con);
echo "connection closed";
?>
This is the output I get on the php page:
con = Resource id #1
db =
mysql = INSERT INTO `MyDb`.`Users` (Email, UserName, Password, DateJoined) VALUES (g, g, g, 2010-08-31)connection closed
When I use my php admin theres an option to create php code that gives
$sql = "INSERT INTO MyDb`.`Users` (`Email`, `UserName`, `Password`, `DateJoined`) VALUES (\'sd\', \'sd\', \'sd\', \'2010-09-22\');";
putting that into my php script doesn't work though.