A forum for imitating Oso (iv) _php tutorial

Source: Internet
Author: User
reply.php (used to reply to topics)
<title>Difficult issues</title>

if (! $cook _user)
{echo "";}
else {include ("connect.inc.php");
$query = "SELECT * from My_user where user= '". $cook _user. "' and password= '". $cook _password. "'";
$res = mysql_query ($query);
if (! $res)
{echo "";}
Include "connect.inc.php";
if ($content) {$content = Str_replace ("'", "mysinglequotes", $content);
$content =htmlspecialchars ($content);
$content =nl2br ($content);
$query = "INSERT into guestbook (name,type,content,icon,time_open,time_close,answer_count,answer_name,main_id) VALUES (' ". $cook _user." ', 0, ' ". $content." ', ". $icon.", now (), now (), 1, ' ". $cook _user." ', ". $theme _id.") ";
$res = mysql_query ($query);
if ($res)
{$query = "Update guestbook set Time_close=now (), Answer_count=answer_count+1,answer_name= '". $cook _user. "' Where id= '. $theme _id;
$res = mysql_query ($query);
if ($res)
{echo "";}}}
?>







  • Last 5 posts in this topic (in reverse order of posting time)




























  • Width=100%> $query = "SELECT * from Guestbook where main_id=". $theme _id. "or id=". $theme _id. "ORDER by Time_open DESC limit 5"; $res = mysql_query ($query); function Tdbackcolor () {static $ColorStr; if ($ColorStr = = "#ededed") {$ColorStr = "#dedede"; } else {$ColorStr = "#ededed"; } return ($COLORSTR); } for ($i =1; $i <=5; $i + +) {$row = @mysql_fetch_array ($res), if (! $row) break; $ColorStr =tdbackcolor (); echo " "; echo " "; $content = Str_replace ("Mysinglequotes", "'", $row [' content ']); echo " "; } ? >
    Author Content
    ". $row [' name ']."". $content."





    "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"

    http://www.bkjia.com/PHPjc/316586.html www.bkjia.com true http://www.bkjia.com/PHPjc/316586.html techarticle reply.php (used to reply to topics) Htmlheadtitle difficult problem/title LINK href=mypic/style.css rel=stylesheet type=text/css/head? php if (!$ Cook_user) {echo script language= ' JavaScript '; E ...

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