Darkmatter5 Posted March 18, 2009 Share Posted March 18, 2009 This code is generated by PHP, so that's why I'm posting this PHP/HTML post in the PHP forum. if($_GET['n']=='new') { echo "<form method='post' action='mess_send.php'> <tr><td colspan='2'></td></tr> <tr><td width='60' align='right'><b>From:</b></td><td>" .$vein->getusername($_SESSION['member_id']). "</td></tr> <tr><td align='right'><b>To:</b></td><td><input type='text' size='30' name='to'> <i>Type in recipients handle</i></td></tr> <tr><td align='right'><b>Subject:</b></td><td><input type='text' size='50' maxlength='50' name='subject'></td></tr> <tr><td align='right' valign='top'><b>Message:</b></td><td><textarea rows='10' cols='80' name='content'></textarea></td></tr> <tr><td colspan='2'> </td></tr> <tr><td colspan='2'><input type='submit' name='send' id='send' value='Send message'> <input type='reset' name='clear' id='clear' value='Clear message'></td></tr> </form>"; } This form generates fine, but when the send button is clicked it doesn't send this data to mess_send.php it sends it to the current file. Why? Link to comment https://forums.phpfreaks.com/topic/150041-help-with-form-action/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 18, 2009 Share Posted March 18, 2009 What does a "view source" in your browser show and do you have any other <form tags on the page? Link to comment https://forums.phpfreaks.com/topic/150041-help-with-form-action/#findComment-787997 Share on other sites More sharing options...
WolfRage Posted March 18, 2009 Share Posted March 18, 2009 What is the name of the file in which it is stored? Link to comment https://forums.phpfreaks.com/topic/150041-help-with-form-action/#findComment-787998 Share on other sites More sharing options...
samshel Posted March 18, 2009 Share Posted March 18, 2009 u sure this is the form which is displayed? this form should post the info to mess_send.php. try to view source your page in browser and check form action. Link to comment https://forums.phpfreaks.com/topic/150041-help-with-form-action/#findComment-787999 Share on other sites More sharing options...
Darkmatter5 Posted March 18, 2009 Author Share Posted March 18, 2009 AH HA it is embedded in another form that's action is "<?php echo $_SERVER['PHP_SELF']; ?>" thanks! Link to comment https://forums.phpfreaks.com/topic/150041-help-with-form-action/#findComment-788010 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.