Jump to content

message


Recommended Posts

ive spent far too ong on this joke of a messaging system and its starting to bug the hell out of me, so does anyone know why this wont insert?!

 

<form action="" method="post" name="form1" id="form1">
        <table cellpadding="2" cellspacing="0">
          <tr>
            <td width="89" valign="top" class="message_rows_subject">To</td>
            <td class="message_to"><?php echo KT_escapeAttribute($row_reply_msg_id['sender']); ?> </td>
          </tr>
          <tr>
            <td width="89" valign="top" class="message_rows_subject">Subject</td>
      <td><input type="text" name="subject" id="subject" value="RE: <?php echo KT_escapeAttribute($row_reply_msg_id['subject']); ?>" size="32" />
                <?php echo $tNGs->displayFieldHint("subject");?> <?php echo $tNGs->displayFieldError("messages_test", "subject"); ?> </td>
          </tr>
          <tr>
            <td width="89" valign="top" class="message_rows_subject">Message</td>
            <td valign="top"><textarea name="message" type="text" id="message" value="" cols="20" rows="20"style="width:470px;resize:none;">----------------- Original Message -----------------<?php print "\n";echo $row_reply_msg_id['message']; ?></textarea>
              <br />
              <?php echo $tNGs->displayFieldHint("message");?> <?php echo $tNGs->displayFieldError("messages_test", "message"); ?> </td>
          </tr>
          <tr class="KT_buttons">
            <td width="89"><div align="left">
              <input type="submit" name="KT_Insert1" id="KT_Insert1" value="Send" />            
            </div></td>
            <td align="left"> </td>
          </tr>
        </table>
        <input type="hidden" name="datetime" id="datetime" value="<?php echo KT_formatDate($row_rsmessages_test['datetime']); ?>" />
        <input type="hidden" name="trash" id="trash" value="<?php echo KT_escapeAttribute($row_rsmessages_test['trash']); ?>" />
        <input type="hidden" name="sender_has" id="sender_has" value="<?php echo KT_escapeAttribute($row_rsmessages_test['sender_has']); ?>" />
        <input type="hidden" name="reciever_has" id="reciever_has" value="<?php echo KT_escapeAttribute($row_rsmessages_test['reciever_has']); ?>" />
        <input type="hidden" name="replied" id="replied" value="<?php echo KT_escapeAttribute($row_reply_msg_id['replied']); ?>" />
      </form>

 

is it something to do with the form action? or  <input type="submit" name="KT_Insert1" id="KT_Insert1" value="Send" />    ?  >:(

Link to comment
https://forums.phpfreaks.com/topic/108733-message/
Share on other sites

A blank action will post to itself, according to standards.

 

Doing this, you'd have to make a check to see if the form's been submitted

 

if ( count($_POST) > 0 ) {

}
# or
if ( isset($_POST['subject']) && isset($_POST['message']) && ... ) {

}

 

Then insert within the check, making sure to sanitize all POST data

Link to comment
https://forums.phpfreaks.com/topic/108733-message/#findComment-557599
Share on other sites

its meant to post the data to my table then redirect to my mail centre homepage where a url message is displayed on the page "message sent etc";

 

i might just wipe my page and start from scratch, ive been using ADDT to produce my insert forms but as this shows its not working correctly

Link to comment
https://forums.phpfreaks.com/topic/108733-message/#findComment-557651
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.