jgurgen Posted February 23, 2007 Share Posted February 23, 2007 i have a simple form that when the user clicks submit it goes to Form_Submit.php. In there i have it redirect back to the index but onclick of the submit button nothing happens. Please help. Edit_District.php <form name="form1" method="Post" action="Form_Submit.php"> <input type="hidden" name="PageName" value="EditDistrict" /> <table> <tr><td>District Name: </td><td><input type="text" name="DistrictName" value="<?php echo $DName ?>"></td></tr> <tr><td>District ShortName:</td><td><input type="text" name="DistrictShort" value="<?php echo $DShort ?>"></td></tr> <tr><td>District Website:</td><td><input type="text" name="DistrictWebSite" value="<?php echo $DWeb ?>"></td></tr> <tr bgcolor="#FFFF00"><td>Primary Contact Information</td></tr> <tr><td>First Name: </td><td><input type="text" name="P_First" value="<?php echo $PFirst ?>"></td></tr> <tr><td>Last Name: </td><td><input type="text" name="P_Last" value="<?php echo $PLast ?>"></td></tr> <tr><td>Phone Number: </td><td><input type="text" name="P_Phone" value="<?php echo $PPhone ?>"></td></tr> <tr><td>Email: </td><td><input type="text" name="P_Email" value="<?php echo $PEmail ?>"></td></tr> <tr bgcolor="#FFFF00"><td>Secondary Contact Information</td></tr> <tr><td>First Name: </td><td><input type="text" name="S_First" value="<?php echo $SFirst ?>"></td></tr> <tr><td>Last Name: </td><td><input type="text" name="S_Last" value="<?php echo $SLast ?>"></td></tr> <tr><td>Phone Number: </td><td><input type="text" name="S_Phone" value="<?php echo $SPhone ?>"></td></tr> <tr><td>Email: </td><td><input type="text" name="S_Email" value="<?php echo $SEmail ?>"></td></tr> <tr><td><input name="Confirm" type="button" value="Submit"></td></tr> </table> </form> Form_Submit.php <?php // PHP processes all form submitions // Get page that submitted data $PageName = $_REQUEST['PageName']; ////////////// // District // ////////////// if($PageName = 'EditDistrict') { header("Location: http://www.hsrhlofli.com/index.php"); } ?> Link to comment https://forums.phpfreaks.com/topic/39730-form-sumbit-not-working/ Share on other sites More sharing options...
kenrbnsn Posted February 23, 2007 Share Posted February 23, 2007 This is a HTML problem not PHP. The type of the submit button is wrong. It needs to be of type "submit", not type "button": <input name="Confirm" type="submit" value="Submit"> Ken Link to comment https://forums.phpfreaks.com/topic/39730-form-sumbit-not-working/#findComment-191835 Share on other sites More sharing options...
jgurgen Posted February 23, 2007 Author Share Posted February 23, 2007 wow thanks Link to comment https://forums.phpfreaks.com/topic/39730-form-sumbit-not-working/#findComment-191839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.