php - Accessing a user input field name that contains a space -
i have situation; know can print data query string this;
<? $firstname = $_get['firstname']; echo $firstname; ?> issue is, have form firstname , lastname fields space in name, this;
<input type="text" class="text" name="name (awf_first)" value="" onfocus=" if (this.value == '') { this.value = ''; }" onblur="if (this.value == '') { this.value='';} " tabindex="500" /> <input id="awf_field-72073394-last" class="text" type="text" name="name (awf_last)" value="" onfocus=" if (this.value == '') { this.value = ''; }" onblur="if (this.value == '') { this.value='';} " tabindex="501" /> so in situation need print first name , last name on success page of form submit. approach should use?
i tired these 2 things didn't worked;
$firstname = $_get['name%20(awf_first)']; echo $firstname; and second approach
$firstname = urldecode($_get['name (awf_first)']); echo $firstname; please note, not possible remove space names of input on form.
thanks,
instead of %20 use _. code be
$firstname = urldecode($_get['name_(awf_first)']); echo $firstname;