Tools, FAQ, Tutorials:
Using isset($_REQUEST('name')) in PHP
How To Avoid the Undefined Index Error in PHP?
✍: FYIcenter.com
If you don't want your PHP page to give out errors as shown in the previous exercise, you should consider checking all expected input fields in $_REQUEST with the isset() function as shown in the example script below:
<?php
if (isset($_REQUEST['name'])) {
$name = $_REQUEST['name'];
} else {
$name = "";
}
if (isset($_REQUEST['comment'])) {
$comment = $_REQUEST['comment'];
} else {
$comment = "";
}
print("<html><pre>");
print("You have submitted the following information:\n");
print(" Name = $name\n");
print(" Comments = $comment\n");
print("Thank you!\n");
print("</pre></html>\n");
?>
⇒ Listing All Values of Submitted Fields in PHP
2016-11-15, ∼5436🔥, 0💬
Popular Posts:
How to access URL template parameters from "context.Request.Matched Parameters"object in Azure API P...
How to use the "@(...)" expression in Azure API Policy? The "@(...)" expression in Azure API Policy ...
How to add request URL Template Parameters to my Azure API operation 2017 version to make it more us...
How to create a "Sign-up or Sign-in" user flow policy in my Azure AD B2C directory? If you want to b...
How to use the JSON to XML Conversion Tool at utilities-online.info? If you want to try the JSON to ...