| |
PROGRAMMING COURSES
ADMIN VIDEO TUTORIALS
COMMUNITY RESOURCES
|
|
Please can adam or someone help. with pm read problem
|
|
|
|
| Please can adam or someone help. with pm read problem |
| by gagahalla12 - Sat Jul 31, 2010 08:30:41 AM |
Please ive been trying this for days, trying to array a message content to another page for the receiver to view the full message body and then be able to make a reply, but the content of message does not seems to appear in the readmessage page. please i nee help, here is the script, i even used the get variable and notting is happening.
<?php
if ($_GET['etalk_id']) { $mid = $_GET['etalk_id']; }
$sql_rdmsg = mysql_query("SELECT etalk_id, etalk_from, p_talk, p_etalk_date FROM personal_etalk WHERE send_to='$taget_name' AND etalk_id='mid'"); while($row = mysql_fetch_array($sql_rdmsg)) { $mid = $row['etalk_id']; $etalk_fromid = $row['etalk_from']; $send_to = $row['$taget_name']; $msg_sbj = $row['msg_sbj']; $p_etalk = $row['p_etalk']; $p_etalk_date = $row['p_etalk_date']; $receivedate = date('g:i:sA j/n/Y',strtotime($p_etalk_date)); $query_msgreadtypeupd = mysql_query("UPDATE personal_etalk SET msgstscod='1' WHERE etalk_id='$mid'");
$sql_memberdata = mysql_query("SELECT id, firstname, lastname FROM user WHERE id='$etalk_fromid' LIMIT 1");
while($row = mysql_fetch_array($sql_memberdata)) { $etalk_fromid = $row['id']; $mf_firstname = $row['firstname']; $mf_lastname = $row['lastname']; /////// Mechanism to Display Pic. See if they have uploaded a pic or not ////////////////////////// $mcheck_pic = "users/$etalk_fromid/img01.jpg"; $mdefault_pic = "users/00/default_pic.jpg"; if (file_exists($mcheck_pic)) { $msger_pic = "<img src=\"$mcheck_pic\" width=\"35px\" height=\"45px\" border=\"0\" />"; // forces picture to be 100px wide and no more } else { $msger_pic = "<img src=\"$mdefault_pic\" width=\"35px\" height=\"45px\" border=\"0\" />"; // forces default picture to be 100px wide and no more } $rdmsgoutput .= '<table style="width:644px;height:345px;" cellpadding="0" cellspacing="4" id="Table7"> <tr> <td align="left" valign="middle" style="width:78px;height:79px;"><a href="http://www.gag.com/myaccount/profile.php?id=' . $etalk_fromid . '"> ' . $msgerphoto . '</a></td> <td align="left" valign="bottom" style="height:79px;"> <font style="font-size:11px" color="#000000" face="Tahoma"><a href="http://www.gag.com/myaccount/profile.php?id=' . $etalk_fromid . '">' . $mf_firstname . ' ' . $mf_lastname . ' Wrote:</font></td> <td align="left" valign="bottom" style="height:80px;"> <font style="font-size:9.5px" color="#666666" face="Tahoma"><b>Date: ' . $receivedate . '</b></font></td> </tr> <tr> <td align="left" valign="middle" colspan="3" style="height:30px;"> <font style="font-size:12px" color="#666666" face="Tahoma"><b>' . $msg_sbj . '</b></font></td> </tr> <tr> <td align="left" valign="top" colspan="2" style="height:254px;"><br/> <font style="font-size:12px" color="#666666" face="Tahoma">' . $p_etalk . '</font></td> </tr> <tr> <td align="right" valign="middle" colspan="3" style="height:24px;"> <input type="submit" id="Button2" name="" value="Reply message" style="width:89px;height:24px;border:1px #C0C0C0 ridge;background-color:#E6E6FA;font-family:Tahoma;font-size:11px;" title="Write a reply message to ' . $mf_lastname . '"> </td> </tr> <tr> <td align="left" valign="top" colspan="3" style="height:49px;"> <div class="hiddenDiv"> <form name="replymsg" action="replymsg.php" method="POST"> <table style="width:641px;height:159px;" cellpadding="0" cellspacing="3" id="Table8"> <tr> <td align="right" valign="middle" style="width:90px;height:23px;"> <font style="font-size:11px" color="#000000" face="Tahoma">From:</font></td> <td align="left" valign="middle" style="height:23px;"> <input type="text" id="Editbox1" style="border:1px #C0C0C0 solid;font-family:Tahoma;font-size:12px;" name="msg_from" size="60" value="' . $firstname . ' ' . $target_name . '"></td> </tr> <tr> <td align="right" valign="middle" style="width:90px;height:23px;"> <font style="font-size:11px" color="#000000" face="Tahoma">To: </font></td> <td align="left" valign="middle" style="height:23px;"> <input type="text" id="Editbox1" style="border:1px #C0C0C0 solid;font-family:Tahoma;font-size:12px;" name="msg_to" size="60" value="' . $etalk_fromid . '"></td> </tr> <tr> <td align="right" valign="middle" style="width:90px;height:23px;"> <font style="font-size:11px" color="#000000" face="Tahoma">Subject: </font></td> <td align="left" valign="middle" style="height:23px;"> <input type="text" id="Editbox1" style="border:1px #C0C0C0 solid;font-family:Tahoma;font-size:12px;" name="Editbox1" size="60" value="Re:' . $etalk_sbj . '"></td> </tr> <tr> <td align="right" valign="middle" style="width:90px;height:23px;"> <font style="font-size:11px" color="#000000" face="Tahoma">Message: </font></td> <td align="left" valign="middle" style="height:23px;"> <font style="font-size:11px" color="#000000" face="Tahoma"><a href="#" class="style3" >Add an attachement</a></font></td> <input type="file" id="load" style="font-family:Courier New;font-size:13px; visibility:hidden;" name="load"></td> </tr> <tr> <td align="right" valign="middle" style="width:90px;height:23px;"> </td> <td align="left" valign="top" style="height:23px;"> <textarea name="TextArea1" id="TextArea1" rows="10" cols="62"></textarea></td> </tr> <tr> <td align="center" valign="middle" style="width:90px;height:23px;">
</td> <td align="center" valign="middle" style="height:23px;"> <input type="submit" id="Button2" name="" value="Send reply" style="width:89px;height:24px;border:1px #C0C0C0 ridge;background-color:#E6E6FA;font-family:Tahoma;font-size:11px;"> <input type="reset" name="" value="Reset" style="width:89px;height:24px;border:1px #C0C0C0 ridge;background-color:#E6E6FA;font-family:Tahoma;font-size:11px;" title="Reset the already typed in message"></td> </tr> </table></form> </div> </td> </tr> </table>';
}
} ?>
Please help me. urgently.
|
| |
|
gagahalla12
Forum & Site XP Level:

France
paris
paris
Leo
Posts: 51
Joined: 05/15/10
|
| RE: Please can adam or someone help. with pm read problem |
| by Danielvast - Sat Jul 31, 2010 08:44:05 AM |
Try changing
$sql_rdmsg = mysql_query("SELECT etalk_id, etalk_from, p_talk, p_etalk_date FROM personal_etalk WHERE send_to='$taget_name' AND etalk_id='mid'");
to
$sql_rdmsg = mysql_query("SELECT etalk_id, etalk_from, p_talk, p_etalk_date FROM personal_etalk WHERE send_to='$taget_name' AND etalk_id='$mid'");
|
| |
|
Danielvast
Forum & Site XP Level:

Bosnia and Herzegovina
HNZ
Mostar
Virgo
Posts: 45
Joined: 09/16/09
Website: URL
|
| RE: Please can adam or someone help. with pm read problem |
| by gagahalla12 - Sun Aug 01, 2010 03:02:33 AM |
i for i didn't put that, but i ve put that $ sign and notting seems to happen,
please check through again and tell me th problem.
|
| |
|
gagahalla12
Forum & Site XP Level:

France
paris
paris
Leo
Posts: 51
Joined: 05/15/10
|
| RE: Please can adam or someone help. with pm read problem |
| by Danielvast - Sun Aug 01, 2010 04:17:09 AM |
I know that it's a little stupid question but did you echo out $rdmsgoutput variable? I don't know what might be the problem the rest of the code seems ok!
|
| |
|
Danielvast
Forum & Site XP Level:

Bosnia and Herzegovina
HNZ
Mostar
Virgo
Posts: 45
Joined: 09/16/09
Website: URL
|
| RE: Please can adam or someone help. with pm read problem |
| by gagahalla12 - Sun Aug 01, 2010 06:29:07 PM |
yeah i echo out the $rdmsgoutput and i get nottin, n the problem is dat i ll be using this get variable in so many of pages in the future thts y i have to get it right, i check everything is find but i don't seems so get what the problem is.
|
| |
|
gagahalla12
Forum & Site XP Level:

France
paris
paris
Leo
Posts: 51
Joined: 05/15/10
|
| RE: Please can adam or someone help. with pm read problem |
| by Danielvast - Mon Aug 02, 2010 02:45:26 AM |
Check your database if you don't have any parse errors, try puting or die(mysql_error()); after every mysql query see if that gives you any errors, see if you actually get etalk_id from url and btw where is $taget_name valiable I can't seem to find it is this the whole code or just an include?
|
| |
|
Danielvast
Forum & Site XP Level:

Bosnia and Herzegovina
HNZ
Mostar
Virgo
Posts: 45
Joined: 09/16/09
Website: URL
|
|
 |
|
|
|
|
|
|