$url = "show.php catid=". ($row [' catid ']); please advise

Source: Internet
Author: User
$url = "show.php catid=". ($row [' catid ']);

When this code executes, does it automatically invoke the contents of show.php??? The middle of this? Catid= can be written casually, such as written $url = "show.php?topic=". ($row [' catid ']);


Reply to discussion (solution)

This just generates a string for the link only, the user clicks to run Shop.php...catid casually, but the variable names in the shop.php file are consistent

? id= ". row[' catid ']";

The ID can be arbitrarily defined, but row[' catid ' should be the only
When passing a value, it depends on the parameter.

$url = "show.php catid=". ($row [' catid ']);
This code is the $url assignment, the value is a string, the content is show.php?catid= $row [' catid '] content

There is no content to invoke show.php.
CATID is a parameter name that can be written casually, but the page that gets the parameter is modified accordingly.
For example show.php?catid=1 so show.php need to get $_get[' catid ']
If show.php?id=1 so show.php need to get $_get[' ID ']

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