Look at your phpMyAdmin header in the image.
localhost->stormban_Guestbook->lastname
Your database is named stormban_Guestbook, and your table is named lastname.
Next, when you insert into anything but an integer type field - date/datetime, varchar, char, text, etc - it must be quoted.
So the first query should be like this. Make it a habit to store your queries in a variable, far easier to manage and debug.
// Note the empty single quotes - see next examples
$query = "INSERT INTO lastname (lastname) values('')";
mysql_query("$query") or die(mysql_error());
Next, you won't have to do four queries for the four columns. Do them all at once.
$query = "INSERT INTO lastname (lastname,name,Sex,electronicmailaddress,Commentaries) values('Doe','John Doe','this@examples.com','This is a comment. I love comments.')";
For your reference (shouldn't be necessary, but might help you understand your database structure), the "full table syntax" would be
$query = "INSERT INTO stormban_Guestbook`.`lastname` (
stormban_Guestbook`.`lastname`.`lastname`,
stormban_Guestbook`.`lastname`.`name`,
stormban_Guestbook`.`lastname`.`Sex`,
stormban_Guestbook`.`lastname`.`electronicmailaddress`,
stormban_Guestbook`.`lastname`.`Commentaries`
) values(
'Doe',
'John Doe',
'this@examples.com',
'This is a comment. I love comments.'
)";
The other advantages of storing selects in strings, you can put them on multiple lines to sort out any errors you might encounter.
The backticks are only necessary if you use table or field names that conflict with internal functions or reserved words such as time, date, etc . . .