简体   繁体   中英

Use of & in query strings

I am following this tutorial about integrating Paypal in one's website.
Many times in the page, at line 20 of step 3 for example, I find this:

if (!isset($_POST["txn_id"]) && !isset($_POST["txn_type"])){  

I really don't understand the use of &in the query strings.
The language used is PHP/HTML

That's not intentionally kept by the developer. The & characters are converted into the & by some kind of plugin/scripts while formatting the code.

Looking at the code you should have this:

if (!isset($_POST["txn_id"]) && !isset($_POST["txn_type"])){ 

It's a problem in whatever software they're using to encode the text of the article. It's a good reason to preserve input text and encode for different contexts.

It should simply be && .

I don't know if you found a real solution but this chain is written in Wordpress documentation, here : https://developer.wordpress.org/themes/basics/including-css-javascript/

++ Nicolas.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM