Ask how to store and read Birthday, gender, and address (select mode !) This post was last edited by okgef from 2015-01-21:50:11. for example, if the birthday is & nbsp; how to automatically restore the post to & lt; select & gt; & lt; option & nbsp; selected & gt; 1990 & lt; opti ask how to store and read Birthday, gender, and address (select mode !)
This post was last edited by okgef from 10:50:11
For example, how to automatically restore the data 1990Other years 01Other months 11Other days
Gender: 0 (Confidential ), Confidentiality, Male, Female
Address: gd755 (Shenzhen city, Guangdong province) restored GuangdongOther provinces ShenzhenOther cities
------ Solution ----------------------
1. retrieve records from the database
2. assign the record result set to the array
3. write all form items
4. assign values in the array to the form.
------ Solution ----------------------
Example:
$ Conn = mysql_connect ('localhost', 'root', 'flash') or die ('server connection failed ');
$ Select = mysql_select_db ('test', $ conn) or die ("database connection failed ");
$ Query = "select * from stu ";
Echo'';If ([email protected] _ query ($ query )){$ I = 0;While ([email protected] _ fetch_array ($ result )){Echo"$ Rows [name]";$ I ++;}Mysql_free_result ($ result );Echo'';
} Else echo "failed to execute SQL statement ($ query):". mysql_error ();
?>