Zer0Cam Posted September 9, 2007 Share Posted September 9, 2007 Ok, I designed a ticket system and I want to add a field for How would I add this so there required to put in the name and room number *Teacher Name: [ Box here] *Room Number: [H11] URL: http://test.geekinc.info/index.php?page=ticket_submit Link to comment https://forums.phpfreaks.com/topic/68627-adding-required-imputs-to-this-page/ Share on other sites More sharing options...
marcus Posted September 9, 2007 Share Posted September 9, 2007 if(!$_POST['submit']){ echo "<form method=post action=thispage.php>\n"; echo "Teacher Name: <input type=text name=tname><br>\n"; echo "Room #: <input type=text name=room><br>\n"; echo "<input type=submit name=submit value=go>\n"; echo "</form>\n"; }else { $teacher = $_POST['tname']; $room = $_POST['room']; if($teacher && $room){ //do this }else { //not supplied } } Link to comment https://forums.phpfreaks.com/topic/68627-adding-required-imputs-to-this-page/#findComment-344928 Share on other sites More sharing options...
Zer0Cam Posted September 9, 2007 Author Share Posted September 9, 2007 Were would I put this? In the file that that page is in? And were? Link to comment https://forums.phpfreaks.com/topic/68627-adding-required-imputs-to-this-page/#findComment-344933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.