get form element's value in same page using php
Posted: Fri Feb 13, 2009 12:42 pm
hello again, normally we used to post values of form elements to other page or in database, but here i want to collect its value in the same page without submitting the form, like happens in java script, by using getElementById() method..
Same thing i want to do in php ..
suppose i hve below form say test1.php...
now i want to get the values of textfield & combo box in the same page i.e. test1.php, without submitting the form...
Same thing i want to do in php ..
suppose i hve below form say test1.php...
Code: Select all
<form name="test" method="post" action="">
<input type="text" name"t1" id="t1" value="">
<select name="s1">
<option value="cricket">Cricket</option>
<option value="football">Football</option>
</select>
<input type="submit" name"sub1">
</form>
now i want to get the values of textfield & combo box in the same page i.e. test1.php, without submitting the form...