Ask birthday, gender, address how to store and read (SELECT mode!) )

Source: Internet
Author: User
For example, the birthday is 1990-01-11, how to automatically restore the read 1990Other years 01Other months 11Other days
Sex is: 0 (confidential), Confidential Man Woman
Address is: gd755 (Shenzhen, Guangdong Province) reverted to Guangdong ProvinceOther Provinces ShenzhenOther cities


Reply to discussion (solution)

1. Take records from the database
2. Assigning a record result set to an array
3. Write all the form items
4. Assign values from the array to the form

Upstairs positive solution, these are the basic problems

Example:

 
  '; if ($result = @mysql_query ($query)) {$i =0; while ($rows = @mysql_fetch_array ($result)) {echo "$rows [name] "; $i + +; } mysql_free_result ($result); Echo '; The Else echo "Execute SQL statement ($query) failed:". Mysql_error ();?>
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.