$ _ GET [] usage

Source: Internet
Author: User
$ _ GET [] has the following PHP code: & lt; ahref = & quot; example. php? Zhonglei = shipin & quot; & gt; food & lt;/a & gt; link to example. php. if $ _ GET [zhonglei] is not used in $ _ GET [],
There is such a PHP code: linking food to example. php,
If $ _ GET [zhonglei] is not used on the example. php page, but is used in another php file (this file is associated with example. php), is it okay? If not, what method can be referenced ??
I 've been struggling for a whole day! Please enlighten me !!

------ Solution --------------------
Ajax works, and parameters can be passed through asynchronous GET.
------ Solution --------------------
If another file (such as search. php) is included or require in example. php, you can use $ _ GET ['zhonglei'] to obtain the value in search. php.
Of course, you can also create a function in search. php, then call this function in example. php and pass the parameter.
------ Solution --------------------
Well, divide all the functions into different files, include them, and write a few lines of code for test.
------ Solution --------------------
After uploading the value to the example. php file, save the required value to the session or cookie.

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.