I just want to insert a new row, taking things one at a time
i can logon to my phpAdmin on web and insert new rows and i am copying the code they give me there even, but still, this code will not insert new rows...i can even create tables within html no problem...what gives?
btw, it doesn't give me a failed to query message...it just doesn't put the data in the db...
<?php
$connection = mysql_connect("localhost","myUsername","myPassword") or die("Couldn't connect to server.");
$db = mysql_select_db("myDB", $connection) or die("Couldn't connect to server.");
$whatever = "workdammit";
$sql = "INSERT INTO $workdammit ( ID , firstName , lastName , age ) VALUES ( \'003\', \'Zeus\', \'McKenny\', \'23\' ); ";
mysql_query( $sql, $connection );
$sql = "SELECT * FROM $whatever;";
$sql_result = mysql_query($sql, $connection) or die("Couldn't execute query.");
?>