<< < 52 53 54 55 56 57 58 59 60 61 62 > >>   Sort: Rank

Form Input HTML Tags in PHP
What Are Form Input HTML Tags in PHP? HTML tags that can be used in a form to collect input data are: &lt;SUBMIT ...&gt; - Displayed as a button allow users to submit the form. &lt;INPUT TYPE=TEXT ...&gt; - Displayed as an input field to take an input string. &lt;INPUT TYPE=RADIO...
2016-11-17, 1649🔥, 0💬

Generating a Form in PHP
How To Generate a Form in PHP? Generating a form seems to be easy. You can use PHP output statements to generate the required &lt;FORM&gt; tag and other input tags. But you should consider to organized your input fields in a table to make your form looks good on the screen. The PHP script be...
2016-11-17, 1515🔥, 0💬

$_GET, $_POST and $_REQUEST in PHP
Where Is the Submitted Form Data Stored in PHP? When a user submit a form on your Web server, user entered data will be transferred to the PHP engine, which will make the submitted data available to your PHP script for processing in pre-defined arrays: $_GET - An associate array that store form data...
2016-11-15, 3706🔥, 0💬

Using isset($_REQUEST('name')) in PHP
How To Avoid the Undefined Index Error in PHP? 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: &lt;?php if (isset($_REQUEST['n...
2016-11-15, 3487🔥, 0💬

Retrieving Submitted Form Data in PHP
How To Retrieve the Submitted Form Data in PHP? The best way to retrieve the form data submitted by your visitor is to use the $_REQUEST array. The keys in this array will be the field names defined in form. The values in this array will be the values entered by your visitor in the input fields. The...
2016-11-15, 1773🔥, 0💬

Expected Input Field Not Submitted in PHP
What Happens If an Expected Input Field Was Not Submitted in PHP? Obviously, if an expected input field was not submitted, there will be no entry in the $_REQUEST array for that field. You may get an execution error, if you are not checking the existence of the expected entries in $_REQUEST. For exa...
2016-11-15, 1510🔥, 0💬

Listing All Values of Submitted Fields in PHP
How To List All Values of Submitted Fields in PHP? If you want list all values of submitted fields, you can write a simple loop to retrieve all entries in the $_REQUEST array. Below is an improved version of processing_forms.php to list all submitted input values: &lt;?php print("&lt;html&am...
2016-11-15, 1412🔥, 0💬

Input Values of SELECT Tags in PHP
What Are Input Values of SELECT Tags in PHP? SELECT tags are used in forms to provide dropdown lists. Entries in a dropdown list are defined by OPTION tags, which can provide input values in two ways: Implicit value - Provided as &lt;OPTION&gt;input_va lue&lt;/OPTION&gt;,where input_...
2016-11-13, 1541🔥, 0💬

Specifying Input Values for Checkboxes in PHP
How To Specify Input Values for Checkboxes in PHP? Checkboxes can be used in a form for two situations: As a single switch - One &lt;INPUT TYPE=CHECKBOX ...&gt; tag, with no input value specified. When submitted with button pushed down, you will receive a value of "on". When submitted with b...
2016-11-13, 1529🔥, 0💬

Providing Default Values for Text Fields in PHP
How To Supply Default Values for Text Fields in PHP? If you want to provide a default value to a text field in your form, you need to pay attention to following notes: The default value should be provided in the 'VALUE=default_value' attribute in the &lt;INPUT TYPE=TEXT ...&gt; tag. The leng...
2016-11-13, 1508🔥, 0💬

Retrieving Input Values from Checkboxes in PHP
How To Retrieve Input Values for Checkboxes Properly in PHP? If multiple input values are submitted with the same field name, like the case of a group of checkboxes, you should add ([]) to the end of the field name. This tells the PHP engine that multiple values are expected for this field. The engi...
2016-11-13, 1469🔥, 0💬

Specifying Input Values for Radio Buttons in PHP
How To Specify Input Values for Radio Buttons in PHP? Radio buttons can be used in a form for two situations: As a single switch - One &lt;INPUT TYPE=RADIO ...&gt; tag, with no input value specified. When submitted with button pushed down, you will receive a value of "on". When submitted wit...
2016-11-13, 1468🔥, 0💬

Submitting Values without Using a Form in PHP
How To Submit Values without Using a Form in PHP? 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 value...
2016-11-08, 3062🔥, 0💬

Supporting Hidden Form Fields in PHP
How To Support Hidden Form Fields in PHP? Hidden fields are special fields in a form that are not shown on the Web page. But when the form is submitted, values specified in the hidden fields are also submitted to the Web server. A hidden field can be specified with the &lt;INPUT TYPE=HIDDEN ...&...
2016-11-08, 2398🔥, 0💬

Generating and Processing Form with the Same Script in PHP
How To Generate and Process a Form with the Same Script in PHP? In previous exercises, a Web form is generated by one script, and processed by another script. But you could write a single script to do both. You just need to remember to: Use same script name as the form generation script in the "acti...
2016-11-08, 2006🔥, 0💬

Supporting Multiple Submit Buttons in PHP
How To Support Multiple Submit Buttons in PHP? Sometimes, you may need to give visitors multiple submit buttons on a single form to allow them to submit the form for different purposes. For example, when you show your customer a purchase order in a Web form, you may give your customer 3 submit butto...
2016-11-08, 1599🔥, 0💬

Supporting a Multiple-Page Form in PHP
How To Support Multiple-Page Forms in PHP? If you have a long form with a lots of fields, you may want to divide the fields into multiple groups and present multiple pages with one group of fields on one page. This makes the a long form more user-friendly. However, this requires you to write good sc...
2016-11-05, 2088🔥, 0💬

Understanding and Managing Cookies in PHP
Where to find tutorials on how to manage Cookies in PHP? A collection of tutorials to answer many frequently asked questions how to manage Cookies in PHP. Clear explanations and tutorial exercises are provided on setting and receiving cookies, creating and removing persistent cookies, specifying dom...
2016-11-05, 1733🔥, 0💬

Retrieving the Original Query String in PHP
How To Retrieve the Original Query String in PHP? 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 pri...
2016-11-05, 1496🔥, 0💬

What Is a Cookie in PHP
What Is a Cookie in PHP? A cookie is a small amount of information sent by a Web server to a web browser and then sent back unchanged by the browser each time it accesses that server. HTTP cookies are used for authenticating, tracking, and maintaining specific information about users, such as site p...
2016-11-05, 1455🔥, 0💬

What Is a Persistent Cookie in PHP
What Is a Persistent Cookie in PHP? A persistent cookie is a cookie which is stored in a cookie file permanently on the browser's computer. By default, cookies are created as temporary cookies which stored only in the browser's memory. When the browser is closed, temporary cookies will be erased. Yo...
2016-11-04, 2417🔥, 0💬

Setting a Persistent Cookie in PHP
How To Set a Persistent Cookie in PHP? If you want to set a persistent cookie, you can use the setcookie() function with an extra parameter to specify its expiration time. To follow sample script sets 2 persistent cookies to be expired within 7 days: setcookie("LoginName","FYICent er");setcookie("Pr...
2016-11-04, 2164🔥, 0💬

Testing Cookies on a Web Server in PHP
How To Test Cookies on a Web Server in PHP? If you want to test cookies with a browser, you need to run a Web server locally, or have access to a Web server remotely. Then you can copy the following PHP cookie test page, setting_receiving_cookies.php, to the Web server: &lt;?php setcookie("Login...
2016-11-04, 1595🔥, 0💬

Sending a Cookie to the Browser in PHP
How To Send a Cookie to the Browser in PHP? If you want to sent a cookie to the browser when it comes to request your PHP page, you can use the setcookie( ) function. Note that you should call setcookie() function before any output statements. The following script shows you how to set cookies: &...
2016-11-04, 1435🔥, 0💬

<< < 52 53 54 55 56 57 58 59 60 61 62 > >>   Sort: Rank