PDA

View Full Version : add 1 to text field value


jay
10-15-2009, 11:46 AM
Hi

How can I add 1 to the value entered into a text field

the bold part is the field I want to add 1 to

<input name="pageNum_seller" type="text" id="pageNum_seller" size="4" />
<label>
<input type="hidden" name="totalRows_seller" id="totalRows_seller" value="<?php echo $totalRows_seller ?>" />
<input name="submit2" type="submit" id="submit2" value="GO" />

Corrosive
10-15-2009, 12:48 PM
value="1"?

edbr
10-16-2009, 01:42 AM
you mean if someone put s3 you want that value to read 4?
i would guess oit could be done in javascript but if you want it serverside ie at the action page maybe $_POST['pageNum_seller']=$_POST['pageNum_seller']+1;

jay
10-17-2009, 09:08 AM
yes, thanks will try