The new PHP has encountered problems,

Source: Internet
Author: User
I have encountered a problem when I was learning PHP... I just learned PHP and want to create a message board to implement the reply function. Both the reply content and the message content are in the same table. the reply content is the content of UPDATEreply & lt; ahref = & quot; list. php? Id2 = & lt ;? Phpech encountered a problem when learning PHP. Ask the experts...
I just learned PHP and want to make a message board to implement the reply function. Both the reply content and the message content are in the same table, and the reply content is the UPDATE reply content.

"> Reply

When you click "reply", the ID number of the reply message is passed to id2.
The table id is of the int type.
However, the primary problem with the update statement is the WHERE id = $ id...

Echo $ _ GET [id2];
If (isset ($ _ POST ['submit ']) {
$ Id = $ _ GET ['id2'];
Echo $ id;
$ Reply = $ _ POST [reply];
// Echo $ reply;
// $ Replytime = data ();
$ Update = "UPDATE message SET reply = '$ reply' WHERE id = $ id ";
$ Result = mysql_query ($ update );
If ($ result ){
// Echo $ _ POST [reply];
Echo"

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.