When a name is entered and the submit button pressed the following output is genereted by our subscribe.php script:
+
When a name is entered and the submit button pressed the following output is generated by our subscribe.php script:
<tt>Data submitted:<br></tt>
<tt>Data submitted:<br></tt>
<tt>Array ( [customerName] => Neil [submit_button] => Press to Submit )</tt>
<tt>Array ( [customerName] => Neil [submit_button] => Press to Submit )</tt>
−
You will recall we mentioned this is an associative array so each element is accessible by a named index key. You may also have noticed that we gave our text input a name value of 'customerName' when we defined it in our form:
+
You will recall we mentioned this is an associative array, so each element is accessible by a named index key. You may also have noticed that we gave our text input a name value of 'customerName' when we defined it in our form:
<input type="text" ''name="customerName"'' value="Enter your name here" />
<input type="text" ''name="customerName"'' value="Enter your name here" />