I am a beginner php guy but I can figure out most things. I created this Form and when I submit data the result I get doesn’t coincide with the data chosen in the form.
I get
1 - 0 - - 0 - 0 - 0 - 0 - 0 - 0 - 0
2 - 0 - - 0 - 0 - 0 - 0 - 0 - 0 - 0
3 - 0 - - 0 - 0 - 0 - 0 - 0 - 0 - 0
4 - 0 - - 0 - 0 - 0 - 0 - 0 - 0 - 0
and so on
Can anybody help me figure out how to enter the correct data? What am I missing??? I am about 1 cup of coffee short from dropping my computer from the Sears Tower. Anybody ever see the movie Office Space where they went postal on the Copier/printer??? That’s how I feel right about now…AHHHHHH!H!!!H!H!H!H!H
[code]<?php
####################################################################
################ DATABASE CONFIGURE ##############################
####################################################################
$hostname = “localhost”;
$db_user = “";
$db_password = "”;
$db_table = “submit”;
STOP HERE
####################################################################
THIS CODE IS USED TO CONNECT TO THE MYSQL DATABASE
$db = mysql_connect($hostname, $db_user, $db_password);
mysql_select_db ("********") or die (mysql_error());
?>
<?php if (isset($_REQUEST['Submit'])) { # THIS CODE TELLS MYSQL TO INSERT THE DATA FROM THE FORM INTO YOUR MYSQL TABLE $sql = "INSERT INTO $db_table(submit_id, team, angler, species, quantity, kayak, yyyy, mm, dd, water) values ('$submit_id', '$team', '$angler', '$species', '$quantity', '$kayak', '$yyyy', '$mm', '$dd', '$water')"; if($result = mysql_query($sql ,$db)) { echo "Thank you, Your information has been entered into the database"; } else { echo "ERROR: ".mysql_error(); }
}
else
{
?>