No. I do not agree with going back to REQUEST_METHOD. I agreed with the isset check.
Once inside the IF statement, that is using an isset check, you can use filter_value to get the data passed in via the URL instead of mis-using mysql_real_escape_string
Oops! I made a mistake on my previous post. Post: 20.
It was supposed to read like this:
"So, I should stick to my old code, like another is suggesting:
if(isset($_GET[“url_to_proxify”]) === TRUE)
He says I should change my new code, which was the following and my Undefined Index error would be gone:
if ($SERVER[‘REQUESTMETHOD’] == “GET”)
Seems like you are agreeing with him. But correct me if I am wrong.
Anyway, I have reverted back to the following like he and you have suggested and I believe my problems would be over as the problems really started when I switched to:
The first thing I come across is “mixed filter input”. Why couldn’t it show examples of a “plain/simple filter input” ? Confusing!
Anyway, moved-onto the next link or so:
You mean a reference guide is not a tutorial.
I agree. That is why I had to argue with some programmers in some forums that I won’t learn from the php.net manual (like they suggest) and would try finding other tutorial sites tailored for complete newbies. many programmers suggested I do this also and not try using the manual site as a tutorial but use it as a reference only. I am doing this from time to time. Using it as a reference to check things out. And, only using it when others show me a link to it when replying to my threads. Else, I avoid it like the plague and don’t check up on it. It puts me off from php. Their code samples are complicated.