grant09 Posted July 21, 2011 Share Posted July 21, 2011 hello php freaks am not sure y this is not working i want the textarea not to so my messages i want them hiding so that users can edit lines but when i reply the messages wont show here is the message i want to hide in the textarea but its not getting the old message that the user has sent and not showing the message i have just typed its just blank with lines ------------- like so any help would be great thanks <td width='13%'>Message:</td><td width='87%' align="center"><textarea name='msgtext' cols='70' rows='7' id='message' class="areatest"></textarea> <input type="hidden" name='msgtext' value='<? echo ($_GET['reply'] != "") ? " \n -------- \n ".$worked2['msgtext'] : ""; ?>'> </td> here the php file am using the now <? include 'header.php'; if ($_GET['delete'] != ""){ $deletemsg = $_GET['delete']; $result = mysql_query("DELETE FROM `pms` WHERE `id`='".$deletemsg."'"); echo Message("Message Deleted!"); } if ($_GET['deleteall'] == "true"){ $result = mysql_query("DELETE FROM `pms` WHERE `to`='".$user_class->username."'"); echo Message("Message Deleted!"); } if ($_POST['newmessage'] != ""){ $to = $_POST['to']; $from = $user_class->id; $timesent = time(); $subject = strip_tags($_POST['subject']); $msgtext = strip_tags($_POST['msgtext']); $checkuser = mysql_query("SELECT `username` FROM `grpgusers` WHERE `username`='".$to."'"); $username_exist = mysql_num_rows($checkuser); if($username_exist > 0){ $result= mysql_query("INSERT INTO `pms` (`to`, `from`, `timesent`, `subject`, `msgtext`)". "VALUES ('$to', '$from', '$timesent', '$subject', '$msgtext')"); echo Message("Message successfully sent to $to <meta HTTP-EQUIV='REFRESH' content='1; url=pms.php'>"); } else { echo Message('I am sorry but the Username you specified does not exist...'); } } function smilie($string) { global $dir; $smilie = array(") " => '<img src="smileys/21.gif">', ":-? " => '<img src="smileys/39.gif">', " " => '<img src="smileys/10.gif">', ":-> " => '<img src="smileys/15.gif">', " " => '<img src="smileys/4.gif">', ":f: " => '<img src="smileys/23.gif">', "=)) " => '<img src="smileys/24.gif">', ":| " => '<img src="smileys/22.gif">', ":-J " => '<img src="smileys/78.gif">', ":-O " => '<img src="smileys/13.gif">', ":-$ " => '<img src="smileys/32.gif">', "6543 " => '<img src="smileys/65.gif">', ":-: " => '<img src="smileys/46.gif">', ":__: " => '<img src="smileys/6.gif">', ":" => '<img src="smileys/112.gif">', ":12" => '<img src="smileys/77.gif">', ":65" => '<img src="smileys/68.gif">', "(" => '<img src="smileys/20.gif">', ":ang" => '<img src="smileys/14.gif">', ":ang" => '<img src="smileys/14.gif">', ":657" => '<img src="smileys/19.gif">', "xD" => '<img src="smileys/">' ); return strtr($string, $smilie); } function bbCode($string) { $bb = array("[b]" => "<b>", "[/b]" => "</b>", "[u]" => "<u>", "[/u]" => "</u>", "[s]" => "<s>", "[img]" => "[img]", "[/img]" => "[/img]", "[/s]" => "<s>", "[sup]" => "<sup>", "[/sup]" => "</sup>", "[sub]" => "<sub>", "[/sub]" => "</sub>", "[time]" => date('G:i (A)') ); return strtr($string, $bb); } ?> <? if ($_GET['reply'] != ""){ $result2 = mysql_query("SELECT * from `pms` WHERE `id`='".$_GET['reply']."'"); $worked2 = mysql_fetch_array($result2); $from_user_class = new User($worked2['from']); } ?> <link href="style.css" rel="stylesheet" type="text/css" /> <table width="100%" border="0" class="contenthead"> <tr> <td align="center">Reply</td> </tr> </table> <table width="100%" border="0" class="contentcontent"> <tr> <td height="16"> </td> </tr> <tr><td class="contentcontentnob"><table width='100%' class="contentcontent"> <form method='post'> <tr> <td width='13%'>Sending To:</td><td width='87%'><?php echo $_GET['to'] . $from_user_class->username; ?><input type='hidden' name='to' value='<?php echo $_GET['to'] . $from_user_class->username; ?>' size='20' maxlength='20'> </tr> <tr> <td width='13%'>Subject:</td><td width='87%' align="center"><input class="areatest" type='text' name='subject' style="width: 500px" maxlength='75' value="<? echo ($_GET['reply'] != "") ? "Re: ".$worked2['subject'] : ""; ?>"></td> </tr> <tr> <td width='13%'>Message:</td><td width='87%' align="center"><textarea name='msgtext' cols='70' rows='7' id='message' class="areatest"></textarea> <input type="hidden" name='msgtext' value='<? echo ($_GET['reply'] != "") ? " \n -------- \n ".$worked2['msgtext'] : ""; ?>'> </td> </tr> <tr><td width='13%'> </td><td width='87%' align="center"><img src="smileys/21.gif" alt="" onclick="insertSmiley(')')" /> <img src="smileys/39.gif" alt="" onclick="insertSmiley(':-?')" /> <img src="smileys/10.gif" alt="" onclick="insertSmiley('')" /> <img src="smileys/15.gif" alt="" onclick="insertSmiley(':->')" /> <img src="smileys/4.gif" alt="" onclick="insertSmiley('')" /> <img src="smileys/23.gif" alt="" onclick="insertSmiley(':f:')" /> <img src="smileys/24.gif" alt="" onclick="insertSmiley('=))')" /> <img src="smileys/22.gif" alt="" onclick="insertSmiley(':|')" /> <img src="smileys/78.gif" alt="" onclick="insertSmiley(':-J')" /> <img src="smileys/13.gif" alt="" onclick="insertSmiley(':-O')" /> <img src="smileys/32.gif" alt="" onclick="insertSmiley(':-$')" /> <img src="smileys/65.gif" alt="" onclick="insertSmiley('6543')" /> <img src="smileys/46.gif" alt="" onclick="insertSmiley(':-:')" /> <img src="smileys/6.gif" alt="" onclick="insertSmiley(':__:')" /> <img src="smileys/112.gif" alt="" onclick="insertSmiley(':')" /> <img src="smileys/20.gif" alt="" onclick="insertSmiley('(')" /> <img src="smileys/14.gif" alt="" onclick="insertSmiley(':ang')" /> <img src="smileys/19.gif" alt="" onclick="insertSmiley(':657')" /></td> </tr> <tr> <td width='13%'></td><td width='87%' align='left'><input name='newmessage' type='submit' class="buttong" value='Send'></td> </tr> </form> </table></td></tr> <tr><td class="contentcontent"><table width='100%' style='table-layout:fixed;WORD-BREAK:BREAK-ALL;'> <td width='100%' align="center"><br><br> <i>previous message</i> <pre><? echo ($_GET['reply'] != "") ? " ".$worked2['msgtext'] : ""; ?></pre></td> </tr> </table></td></tr> <? include 'footer.php'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/242582-mail/ Share on other sites More sharing options...
gristoi Posted July 22, 2011 Share Posted July 22, 2011 huh? Quote Link to comment https://forums.phpfreaks.com/topic/242582-mail/#findComment-1246091 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.