liamloveslearning Posted May 18, 2008 Share Posted May 18, 2008 Hey; Im building a messaging system and whenever a user replies to a message they recieve it removes it from there inbox, yet updates it on my table; Ive tried posting this topic before yet with little feedback/help so im just wondering does anybody have any idea? Ive echo'ed the data in each field only its not working as i assumed, thanks Quote Link to comment https://forums.phpfreaks.com/topic/106153-debug-mysql/ Share on other sites More sharing options...
MadTechie Posted May 18, 2008 Share Posted May 18, 2008 Not sure what your asking here, are message are being removed when they shouldn't be removed ? or the other way around ? EDIT: as a side note if your question is unclear many members will just ignore it.. as its going to be a pain to resolved Quote Link to comment https://forums.phpfreaks.com/topic/106153-debug-mysql/#findComment-544100 Share on other sites More sharing options...
liamloveslearning Posted May 18, 2008 Author Share Posted May 18, 2008 hi, okay thanks for the advice Yeah say a user goes to there inbox and sees new messages, they then click reply and the message data is echo'd in my reply form. They then add there reply to that and click send which in return then redirects the user back to there inbox; however only this time round the message is no longer visible in the inbox? Sorry if Im still making no sense :-X Quote Link to comment https://forums.phpfreaks.com/topic/106153-debug-mysql/#findComment-544230 Share on other sites More sharing options...
runnerjp Posted May 18, 2008 Share Posted May 18, 2008 so you mean if they reply to a message there last massage gets deleted.... can you post some code Quote Link to comment https://forums.phpfreaks.com/topic/106153-debug-mysql/#findComment-544232 Share on other sites More sharing options...
liamloveslearning Posted May 18, 2008 Author Share Posted May 18, 2008 yeah, if they reply the message dissapears from there inbox, rather than being marked as read; heres my code for my inbox <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="80" align="left" class="message_header">Date</td> <td width="220" align="left" class="message_header">From</td> <td width="70" align="left" class="message_header">Status</td> <td width="220" align="left" class="message_header">Subject</td> </tr> <?php do { ?> <tr> <td rowspan="2" valign="middle" class="message_rows"><?php echo date('d/m/Y',strtotime($row_message_inbox['message_datetime'])); ?><br /> <?php echo date('g:i A',strtotime($row_message_inbox['message_datetime'])); ?></td> <td rowspan="2" valign="middle" class="message_rows"><?php echo $row_read_message['member_email']; ?><br /> (<?php echo $row_read_message['member_firstname']; ?> <?php echo $row_read_message['member_lastname']; ?>)</td> <td rowspan="2" valign="middle" class="message_rows"><?php echo $row_message_inbox['message_read']; ?></td> <td valign="middle" class="message_rows_subject"><?php echo $row_message_inbox['message_subject']; ?> </td> </tr> <tr> <td align="right" valign="middle" class="message_rows_subject"><form id="form1" name="form1" method="post" action="message_read2.php"> <input name="message_id" type="hidden" id="message_id" value="<?php echo $row_message_inbox['message_id']; ?>" /> <label> <input name="Read_message" type="submit" class="reg_button" id="Read_message" value="Read" /> </label> </form></td> </tr> <?php } while ($row_message_inbox = mysql_fetch_assoc($message_inbox)); ?> </table> then my "read message page" <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="84" class="message_header">From</td> <td colspan="3" class="message_rows"><?php echo $row_read_message['member_email']; ?> (<?php echo $row_read_message['member_firstname']; ?> <?php echo $row_read_message['member_lastname']; ?>)</td> </tr> <?php do { ?> <tr> <td width="84"> </td> <td colspan="3"> </td> </tr> <tr> <td width="84" class="message_header">Date</td> <td colspan="3" class="message_rows"><?php echo date('l, F d, Y',strtotime($row_read_message['message_datetime'])); ?>, <?php echo date('g:i A',strtotime($row_read_message['message_datetime'])); ?></td> </tr> <tr> <td width="84"> </td> <td colspan="3"> </td> </tr> <tr> <td width="84" class="message_header">Subject</td> <td colspan="3" class="message_rows"><?php echo $row_read_message['message_subject']; ?></td> </tr> <tr> <td width="84"> </td> <td colspan="3"> </td> </tr> <tr> <td width="84" valign="top" class="message_header">Message</td> <td height="212" colspan="3" valign="top" class="message_body"><?php echo $row_read_message['message_message']; ?></td> </tr> <tr> <td width="84" valign="top"> </td> <td width="412" align="right" valign="top"><form id="reply_msg" name="reply_msg" method="post" action="message_compose_reply.php"> <input name="message_id" type="hidden" id="message_id" value="<?php echo $row_message_reply['message_id']; ?>"> <input name="Reply" type="submit" class="reg_button" id="Reply" value="Reply" /> <label></label> </form> </td> <td width="111" align="right" valign="top"><form id="form1" name="form1" method="post" action="message_reply.php"> <input name="button" type="submit" class="reg_button" id="button" value="Return to Inbox" /> </form></td> </tr> <tr></tr> <?php } while ($row_read_message = mysql_fetch_assoc($read_message)); ?> </table> and then my "compse reply message" page <form action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>" method="post" name="form1" id="form1"> <table cellpadding="2" cellspacing="0" class="KT_tngtable"> <tr> <td class="KT_th"><label for="message_reciever">Message_reciever:</label></td> <td><input type="text" name="message_reciever" id="message_reciever" value="<?php echo KT_escapeAttribute($row_message_inbox['message_reciever']); ?>" size="32" /> <?php echo $tNGs->displayFieldHint("message_reciever");?> <?php echo $tNGs->displayFieldError("messages", "message_reciever"); ?> </td> </tr> <tr> <td class="KT_th"><label for="message_subject">Message_subject:</label></td> <td><input type="text" name="message_subject" id="message_subject" value="<?php echo KT_escapeAttribute($row_message_inbox['message_subject']); ?>" size="32" /> <?php echo $tNGs->displayFieldHint("message_subject");?> <?php echo $tNGs->displayFieldError("messages", "message_subject"); ?> </td> </tr> <tr> <td class="KT_th"><label for="message_message">Message:</label></td> <td><input type="text" name="message_message" id="message_message" value="<?php echo KT_escapeAttribute($row_message_inbox['message_message']); ?>" size="32" /> <?php echo $tNGs->displayFieldHint("message_message");?> <?php echo $tNGs->displayFieldError("messages", "message_message"); ?> </td> </tr> <tr class="KT_buttons"> <td colspan="2"><input type="submit" name="KT_Update1" id="KT_Update1" value="Update record" /> </td> </tr> </table> <input type="hidden" name="message_id" id="message_id" value="<?php echo KT_escapeAttribute($row_message_inbox['message_id']); ?>" /> <input type="hidden" name="message_read" id="message_read" value="2" /> <input type="hidden" name="message_sender" id="message_sender" value="<?php echo KT_escapeAttribute($_SESSION['kt_login_id']); ?>" /> <input type="hidden" name="message_sent" id="message_sent" value="<?php echo KT_escapeAttribute($row_message_inbox['message_sent']); ?>" /> <input type="hidden" name="message_datetime" id="message_datetime" value="<?php echo KT_formatDate($row_message_inbox['message_datetime']); ?>" /> </form> Quote Link to comment https://forums.phpfreaks.com/topic/106153-debug-mysql/#findComment-544243 Share on other sites More sharing options...
runnerjp Posted May 18, 2008 Share Posted May 18, 2008 ok abit off topio but what does KT_escapeAttribute havent come accross this before Quote Link to comment https://forums.phpfreaks.com/topic/106153-debug-mysql/#findComment-544247 Share on other sites More sharing options...
liamloveslearning Posted May 18, 2008 Author Share Posted May 18, 2008 to be honest im not sure; as im currently learning the language im still using adobe developer toolbox to create most of the functions within my website; ill have a look into it tho now, thanks : ) Quote Link to comment https://forums.phpfreaks.com/topic/106153-debug-mysql/#findComment-544251 Share on other sites More sharing options...
liamloveslearning Posted May 18, 2008 Author Share Posted May 18, 2008 if just read this.. "<?php echo KT_escapeAttribute(KT_getFullUri()); ?>"> is important because basically ADDT forms work by having the forms submit back to themselves. Günter was explaining that that code returns the current page's URL. In order for all the error checking to work(client side and server side) and for the custom triggers to work, an ADDT form calls back to itself for the form action. This is why you cannot pass variables via POST with ADDT forms. As Günter said, I don't recommend changing the action. " on the adobe forums (http://www.adobeforums.com/webx?14@@.3c05fe4d/1) and im just wondering if because im using ADDT and manually working on forms could this be my problem? in realising "ADDT forms work by having the forms submit back to themselves" Or am i completely lost? Thanks for the help anyway guys Quote Link to comment https://forums.phpfreaks.com/topic/106153-debug-mysql/#findComment-544253 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.