Tools, FAQ, Tutorials:
Submitting Values without Using a Form in PHP
How To Submit Values without Using a Form in PHP?
✍: FYIcenter.com
If you know the values you want to submit, you can code the values in a hyper link at the end of the URL. The additional values provided at the end of a URL is called query string. There are two suggestions on how to use query strings to submit values to the receiving script page:
Here is a simple script page that shows you two hyper links with query strings in different formats:
<?php
print("<html>");
print("<p>Please click the links below"
." to submit comments about FYICenter.com:</p>");
print("<p>"
.'<a href="/processing_forms.php?name=Guest&comment=Excellent">'
."It's an excellent site!</a></p>");
print("<p>"
.'<a href="/processing_forms.php?Visitor,Average">'
."It's an average site.</a></p>");
print("</html>");
?>
If you copy this script as submit_comments.php to your Web server, and click the first link, you will get:
Number of values: 2 name = Guest comment = Excellent
If you click the second link, the current processing_forms.php will not pick up input values from $_REQUEST properly as shown below:
Number of values: 1 Visitor,Average =
⇒ Retrieving the Original Query String in PHP
⇐ Generating and Processing Form with the Same Script in PHP
2016-11-08, ∼3687🔥, 0💬
Popular Posts:
How to use the XML to JSON Conversion Tool at freeformatter.com? If you want to try the XML to JSON ...
How To Truncate an Array in PHP? If you want to remove a chunk of values from an array, you can use ...
FYIcenter.com Online Tools: FYIcenter JSON Validator and Formatter FYIcenter JSON to XML Converter F...
Tools, FAQ, Tutorials: JSON Validator JSON-XML Converter XML-JSON Converter JSON FAQ/Tutorials Pytho...
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...