Tools, FAQ, Tutorials:
Retrieving the Original Query String in PHP
How To Retrieve the Original Query String in PHP?
✍: FYIcenter.com
If you have coded some values in the URL without using the standard form GET format, you need to retrieve those values in the original query string in $_SERVER['QUERY_STRING']. The script below is an enhanced version of processing_forms.php which print the original query string:
<?php print("<html><pre>"); print(" query_string = {$_SERVER['QUERY_STRING']}\n"); $count = count($_REQUEST); print("Number of values: $count\n"); foreach ($_REQUEST as $key=>$value) { if (is_array($value)) { print(" $key is an array\n"); for ($i = 0; $i < count($value); $i++) { $sub_value = $value[$i]; if (get_magic_quotes_gpc()) { $sub_value = stripslashes($sub_value); } print(" ".$key."[".$i."] = ".$sub_value."\n"); } } else { if (get_magic_quotes_gpc()) { $value = stripslashes($value); } print(" $key = $value\n"); } } print("</pre></html>\n"); ?>
⇒ Protecting Special Characters in Query String in PHP
2016-11-05, 1475🔥, 0💬
Popular Posts:
Can Two Forms Be Nested? Can two forms be nested? The answer is no and yes: No. You can not nest two...
How To Control Vertical Alignment? By default, text in all table cells are aligned to the top vertic...
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
How to create the Hello-3.0.epub package? I have all required files to create Hello-3.0.epub. To cre...
How to use the XML to JSON Conversion Tool at freeformatter.com? If you want to try the XML to JSON ...