Sort: Rank

How To Retrieve Input Values for Checkboxes Properly
How To Retrieve Input Values for Checkboxes Properly? - PHP Script Tips - Processing Web Forms 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...
2016-06-26, 12792👍, 1💬

💬 2016-06-26 Donald: Thanks.

How To Create a Web Form
How To Create a Web Form? - PHP Script Tips - Processing Web Forms If you take input data from visitors on your Web site, you can create a Web form with input fields to allow visitors to fill in data and submit the data to your server for processing. A Web form can be created with the <FORM> ...
2007-04-23, 4949👍, 0💬

What Are Form Input HTML Tags
What Are Form Input HTML Tags? - PHP Script Tips - Processing Web Forms HTML tags that can be used in a form to collect input data are: <SUBMIT ...> - Displayed as a button allow users to submit the form. <INPUT TYPE=TEXT ...> - Displayed as an input field to take an input string. &...
2007-04-23, 5200👍, 0💬

How To Generate a Form
How To Generate a Form? - PHP Script Tips - Processing Web Forms Generating a form seems to be easy. You can use PHP output statements to generate the required <FORM> tag and other input tags. But you should consider to organized your input fields in a table to make your form looks good on th...
2007-04-23, 5028👍, 0💬

Where Is the Submitted Form Data Stored
Where Is the Submitted Form Data Stored? - PHP Script Tips - Processing Web Forms 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 as...
2007-04-23, 6874👍, 0💬

How To Retrieve the Submitted Form Data
How To Retrieve the Submitted Form Data? - PHP Script Tips - Processing Web Forms 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 you...
2007-04-23, 4965👍, 0💬

What Happens If an Expected Input Field Was Not Submitted
What Happens If an Expected Input Field Was Not Submitted? - PHP Script Tips - Processing Web Forms Obviously, if an expected input field was not submitted, there will no entry in the $_REQUEST array for that field. You may get an execution error, if you are not checking the existence of the expecte...
2007-04-23, 5154👍, 0💬

How To Avoid the Undefined Index Error
How To Avoid the Undefined Index Error? - PHP Script Tips - Processing Web Forms 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: &...
2007-04-23, 11780👍, 0💬

What Are the Input Values of SELECT Tags
What Are the Input Values of SELECT Tags? - PHP Script Tips - Processing Web Forms SELECT tags are used in forms to provide dropdown lists. Entris in a dropdown list are defined by OPTION tags, which can provide input values in two ways: Implicit value - Provided as <OPTION>input_value& ;lt...
2007-04-23, 4947👍, 0💬

How To List All Values of Submitted Fields
How To List All Values of Submitted Fields? - PHP Script Tips - Processing Web Forms 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 submited input values: &a...
2007-04-23, 6512👍, 0💬

How To Specify Input Values for Radio Buttons
How To Specify Input Values for Radio Buttons? - PHP Script Tips - Processing Web Forms Radio buttons can be used in a form for two situations: As a single switch - One <INPUT TYPE=RADIO ...> tag, with no input value specified. When submitted with button pushed down, you will receive a value ...
2007-04-23, 4926👍, 0💬

How To Specify Input Values for Checkboxes
How To Specify Input Values for Checkboxes? - PHP Script Tips - Processing Web Forms Checkboxes can be used in a form for two situations: As a single switch - One <INPUT TYPE=CHECKBOX ...> tag, with no input value specified. When submitted with button pushed down, you will receive a value of ...
2007-04-23, 4753👍, 0💬

How To Supply Default Values for Text Fields
How To Supply Default Values for Text Fields? - PHP Script Tips - Processing Web Forms 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 &ltINPUT TY...
2007-04-22, 5257👍, 0💬

How To Remove Slashes on Submitted Input Values
How To Remove Slashes on Submitted Input Values? - PHP Script Tips - Processing Web Forms By default, when input values are submitted to the PHP engine, it will add slashes to protect single quotes and double quotes. You should remove those slashes to get the original values by applying the stripsla...
2007-04-22, 5316👍, 0💬

How To Support Multiple Submit Buttons
How To Support Multiple Submit Buttons? - PHP Script Tips - Processing Web Forms 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...
2007-04-22, 4798👍, 0💬

How To Generate and Process a Form with the Same Script
How To Generate and Process a Form with the Same Script? - PHP Script Tips - Processing Web Forms 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 f...
2007-04-22, 4957👍, 0💬

How To Support Hidden Form Fields
How To Support Hidden Form Fields? - PHP Script Tips - Processing Web Forms 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 ...
2007-04-22, 4708👍, 0💬

How To Retrieve the Original Query String
How To Retrieve the Original Query String? - PHP Script Tips - Processing Web Forms 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...
2007-04-22, 4603👍, 0💬

How To Submit Values without a Form
How To Submit Values without a Form? - PHP Script Tips - Processing Web Forms 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 q...
2007-04-22, 4993👍, 0💬

How To Protect Special Characters in Query String
How To Protect Special Characters in Query String? - PHP Script Tips - Processing Web Forms If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode(): <?ph...
2007-04-22, 5480👍, 0💬

How To Support Multiple-Page Forms
How To Support Multiple-Page Forms? - PHP Script Tips - Processing Web Forms 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, ...
2007-04-22, 4728👍, 0💬

  Sort: Rank