Could you tell me what I added here?

Source: Internet
Author: User
Is it correct for me to add it here? (Intval (base64_decode ($ _ GET [id]) & quot;); is nearby .. Thank you. PHPcode & lt ;? Phpif ($ _ GET [id]) {$ SQL _1 = mysql_query (& quot; select * from Is it correct here?
(Intval (base64_decode ($ _ GET [id]) "); is nearby .. Thank you.

PHP code
  
  


------ Solution --------------------
The variables contained in the string are parsed, and the function name and constant are not parsed.
PHP code
$ Id = intval (base64_decode ($ _ GET [id]); $ SQL _1 = mysql_query ("select * from $ tbname_jihua where id = {$ id }"); // or $ SQL _1 = mysql_query ("select * from $ tbname_jihua where id = ". intval (base64_decode ($ _ GET [id]);
------ Solution --------------------
Intval
Base64_decode
They are all php functions. It cannot be parsed in the string.
------ Solution --------------------
Code similar to intval (base64_decode ($ _ GET [id ])
Why should I write it in SQL? Because it saves some time?

$ Id = intval (base64_decode ($ _ GET [id]);
$ SQL _1 = mysql_query ("select * from $ tbname_jihua where id = {$ id }");

This is unclear, and your problem has been solved...

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.