hi is there anyway to have a check box add text to a text box when the check box is checked without clicking a submit button? this is what i got and i am almost sure im no where need the right track. <?php if($_POST['checkbox'] == '1') { add text box code here } else { echo "please select a check box"; } ?> <input type="checkbox" value="1" name="checkbox"> PHP:
.......without clicking the submit button? Seems like you'll be needing to use JavaScript there boy. It's impossible to do that with PHP alone, else you'd need to click the submit button.
There are two possibilites if this code is after the submitting form it will work with value tag of the input type =text otherwise without submitting form you should use javascript