An error occurred when using variables in html code. Thank you for your advice.

Source: Internet
Author: User
An error occurred when using variables in html code. Could you please kindly advise? could you tell me how the second input does not show the value? Thank you.

$ Urlfrom = $ _ SERVER ['http _ referer'];

?>





Reply to discussion (solution)

HTTP_REFERER does not always exist.

Just print it out.

I used other domain names for hyper-connection during the test. However
Urlfrom can get the value, while
Input is not displayed

HTTP Referer is a part of the header. when a browser sends a request to a web server, it usually carries a Referer to tell the server which page the link is from, the server obtains some information for processing.

We can see that:
1. if it is not a link, no
2. although it is generally carried, it can also be left blank

HTTP Referer is a part of the header. when a browser sends a request to a web server, it usually carries a Referer to tell the server which page the link is from, the server obtains some information for processing.

We can see that:
1. if it is not a link, no
2. although it is generally carried, it can also be left blank




Rising posture

Var_dump ($ urlfrom); check it out.

The idea above is correct.
I should simplify the problem to solve my problem: the input does not display the value of $ urlfrom. please advise.

$ Urlfrom = "bbbb ";

?>




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.