Im trying to make a message system and when the receiver is reading a message theres a link to reply the message, as follow:
<a href=mail.php?action=compose&toid='".urlencode($viewrow['sender'])."'&subject='RE:+".urlencode($viewrow['subject'])."'&message=".urlencode($viewrow['message']).">Reply</a>
The sender, subject and message are being retrieved from mysql.
The user is seeing something like:
http://www.somesite.com/author/mail.php?action=compose&toid='8'&subject='RE:+test+subject'&message=test+message
What i need to know is if theres a way to hide the subject and the message from reply url, so the user will see on address bar only:
http://www.somesite.com/author/mail.php?action=compose&toid='8'
This is how the subject, message and id is being retrieved from db.
//view message
if (isset($_GET['action']) && $_GET['action'] == inbox) {
if(isset($_GET['viewid'])) {
$viewid = $_GET['viewid'];
/* $viewsql = "select * from mail where reciever='".$userid."' and mail_id=".$viewid; */
$viewsql = "select * from mail, authors where (mail.sender = authors.id) and (mail.reciever = '".$userid."') and (mail.reciever_deleted ='0') and mail.mail_id = ".$viewid;
$viewquery = mysql_query($viewsql,$connection) or die(mysql_error());
$viewrow = mysql_fetch_assoc($viewquery);
if ($viewrow['reciever'] == $userid) { //check if user is the reciever
} else {
header('Location: mail.php?action=inbox');
exit;
}
echo "<h3>Lendo mensagem particular da Caixa de Entrada</h3>";
echo "<table align=\"center\" width=\"75%\" class=\"sortable\">
<tr>
<td colspan='2' style=\"text-align:center;font-weight:normal;\">Mensagem particular enviada por ".$viewrow['displayname']." em ".date('d/m/y',strtotime($viewrow['created_at'])).".</td>
</tr>
<tr>
<td colspan='2'>
<img style=\"float:left;padding: 5px 15px 5px 2px;width: 65px;\" src=\"".$viewrow['gravatar']."\" alt=\"".$viewrow['displayname']."\" title=\"".$viewrow['displayname']."\" />
<div style=\"padding: 8px 5px 2px;\"><span style=\"font-size:1.6em;\">→ </span><b>".$viewrow['subject']."</b></div>
<div style=\"padding: 8px 30px 8px 85px;\">".nl2br($viewrow['message'])."<br /></div>
<span style=\"float:right;\">
<a href=mail.php?action=compose&toid='".urlencode($viewrow['sender'])."'&subject='RE:+".urlencode($viewrow['subject'])."'&message=".urlencode($viewrow['message']).">Responder</a> | <a href=javascript:confirmDelete('mail.php?action=inbox&deleteid=".$viewid."')>Apagar</a>
</span>
</td>
</tr>
</table>";
// mark as read by reciever
$query="update mail set mail_status='read' where reciever = '$userid' and mail_id = '$viewid'";
mysql_query($query,$connection) or die(mysql_error());
}
}elseif (isset($_GET['action']) && $_GET['action'] == outbox) { ...
I know i need to use post, but how?
I tried but could not make it work.
Sorry for my stupidity..
POST
instead ofGET
. – Danny Beckett Mar 24 at 8:18