Jump to content

help with form action


Darkmatter5

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.