Jump to content

[SOLVED] php script not posting to database


geebo

Recommended Posts

Well, thanks to Daukan I no longer get an error message with my php script, but unfortunately, no data gets posted  to the database  :-[

 

So, I am guessing that the connection to the database is successful, but something is not working after that.  Here is my script again:

<?php

$name=$HTTP_POST_VARS['Name'];

$date=$HTTP_POST_VARS['Date_'];

$comments=$HTTP_POST_VARS['Comments'];

$username="garyboha_*******";

$password="*******";

$database="garyboha_eortutorial";

mysql_connect(localhost,$username,$password);

@mysql_select_db($database) or die( "Unable to select database");

mysql_query($query);

$query = "INSERT INTO eorresults (name, date, comments) VALUES ('$name', '$date', '$comments')";

mysql_close();

?>

 

Here is my php admin panel for the database:

 

screenshot2.JPG

 

This should be simple.  Thanks in advance for helping a total noob (and I mean noob on this one).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.