Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.