Make me cry make me smile PHP access MySQL Database Example

Source: Internet
Author: User


Php+mysql Example


Please enter the data in the text area and determine



$c
if (Isset ($txt)) {
$dbtime =date ("y-m-d h:i:s");
Mysql_db_query ("Usernamedb", "INSERT into test values (0, ' $dbtime ', ' $txt ')");
}
?>







$result =mysql_db_query ("Usernamedb", "SELECT * from Test");
while ($userdb =mysql_fetch_row ($result))
{
echo "<". $userdb [0]. " : ". $userdb [1]." ". $userdb [2]."
n ";
}
Mysql_close ($connect _id);
?>




"The copyright of this article is owned by the author and house Orso near net, if need to reprint, please specify the author and source"

The above describes an example of make me cry made me smile PHP access to MySQL database, including the content of Do me cry do me smile, hoping to be helpful to a friend who is interested in PHP tutorials.

  • 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.