galvin Posted May 3, 2009 Share Posted May 3, 2009 Is there anyway to have a form submitted when a user hits "ENTER" using ONLY PHP (i.e. not using any Javascript)? I think Javascript is necessary, but if there is a way to do it using only PHP, I would love to hear it. Thanks, Greg Link to comment https://forums.phpfreaks.com/topic/156676-submit-form-on-enter-using-only-php/ Share on other sites More sharing options...
gevans Posted May 3, 2009 Share Posted May 3, 2009 No, php only works server side. You need javascript. EDIT Though most browsers will send a form when a user hits enter in a text input (not textarea) Link to comment https://forums.phpfreaks.com/topic/156676-submit-form-on-enter-using-only-php/#findComment-824960 Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 Use HTML. <input type="submit" name="submit" value="Submit" /> Link to comment https://forums.phpfreaks.com/topic/156676-submit-form-on-enter-using-only-php/#findComment-824973 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.