php-the newly learned PHP, but still do not connect the database, there is a small problem

Source: Internet
Author: User
Keywords PHP Database
Tags php database
PHP Database

Ask how to build a database? Landing can already be completed, is the message function can not be achieved

 
   
    
   <title>Message boards</title>Return
   connected!
"; $selected = mysql_select_db ("center");//if ($selected)//echo "selected!
"; mysql_query (" Set names ' UTF8 ' "); $insert _account = $_session[' account ']; $insert _pwd = $_session[' password '];echo $ Insert_account;//echo $_post[comment];if ($_session[' check '] ==1) {if (!empty ($_post[comment])) {$sql = "INSERT into Comment (account,comment,time) VALUES (' $insert _account ', ' $_post[comment] ', ' $printtime '); mysql_query ($sql) or Die (Mysql_error ()); $_session[' check '] = 0;} else echo ' Welcome to the message board ';} $insert _account?> "> Please leave a message <textarea name="comment" rows="5" cols="40"><?php//echo ReadFile ("Webdictionary.txt");? ></textarea>

You have submitted a message:




  • !--? php Do {$i + +,?--> !--? php} while ($myrow = Mysql_fetch_array ($rs)); echo ""; } echo "Shared". $pages. " Page (". $page." /". $pages.") "; for ($i =1; $i < $page; $i + +) echo "[". $i. "]"; echo "[". $page. "]"; for ($i = $page +1; $i <= $pages; $i + +) echo "[". $i. "]"; echo ""; ?>!---->

    message

    release time

    Message user

    !--? php echo $myrow ["Time"]?--> !--? php echo $myrow ["Accou NT "]?-->
    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.