Forum Moderators: coopster
what i am doing is as follows:
i am making a database using mysql + php + apache
and i have a table in mysql that stores information like this:
Name + date_of_birth + Gender + Country + ... and so on
this table as i told u stores information about persons information who subscribe with my site and i want them to select Country and Gender from a combo box instead of writing this information in a text field
this is like hotmail or yahoo Registration form
thank you again
your html form:
<form action="process.php" method="POST">
Name: <input type="text" name="name" /><br />
DOB : <input type="text" name="dob" /><br />
Gender : <select name="gender">
<option value="M">Male</option>
<option value="F">Female</option>
</select><br />
Country : <select name="country">
<option value="US">United States of America</option>
<option value="AU">Australia</option>
<option value="CA">Canada</option>
<option value="XX">XXXXX</option>
</select><br />
<input type="submit" value="Submit Info" />
</form>
echo $_POST['name'];
echo $_POST['dob'];
echo $_POST['gender'];
echo $_POST['country'];
mysql_connect(mysql_server, username, password);
mysql_select_db(db_name);
mysql_query("INSERT INTO table_name (name, dob, gender, country) VALUES ('$_POST[name]', '$_POST[dob]', '$_POST[gender]', '$_POST[country]')");