I was wondering where I might have gone wrong on adding information to a database, the country_id is an autonumber, so I don't have to add it. But when a user puts in a name of the country, it adds it to the database, once they click the submit button, and it returns them back to this page. It passes the variable through the url I think but I am not for sure about that one either? But any suggestions are helpful...
$db = mysql_connect("localhost", "tableName", "PW")or die(mysql_error());
$obj = mysql_query("SELECT * FROM country");
INSERT INTO COUNTRY (country_id, country_name) VALUES($country) ?>
<title><? echo $obj ?></title>
<FORM ACTION="index.php" METHOD=POST>
Please enter the name of the country to put into the database.
<p>TITLE:<INPUT TYPE="text" NAME="country" SIZE=25 MAXLENGTH=25>
<?php echo $country ?>