ok i have this script that i created.. but there is one thing that i cant do .. and have been tring to do.. hehe.. and that is to make the reply part of the script echo in the user name text box on the next page.. what i have coded is a memo script.. anyways.. here
is the code
Part of
memo_read.php
if($_GET['delete'] == 'memo'){
if($username == $cookie['username']){
mysql_query("DELETE FROM gl_memo WHERE id = '$_GET[id]' ");
}else if($_GET['to'] == $row['sender']){
$row['sender'] = $username;
echo "<FORM METHOD=\"post\" ACTION=\"memo_send.php\">" .
$username .
"</FROM>";
}else{
echo "<center><br><br>Sorry but you cant do that!";
}
}
now when the user clicks on reply the url will turn in to..
memo_send.php?to=xlordt .. now i posted part of the script cause
everything else works perfect.. exept for that reply part..
anyways here is the other script
(memo_send.php?to=xlordt)
memo_send.php
if($submit){
if(($_POST['username'] == "") OR ($_POST['memo'] == "")){
echo "You forgot to fillin on one of the fields";
exit;
}
//Now insert in to db and with inputs
$sender = $_USER['username'];
$date = date("D dS M,Y h:i a");
$sql = "INSERT INTO gl_memo(id, sender, username, memo, date) VALUES ('$id','$sender', '$username',
'$_POST[memo]', '$date')";
$result = mysql_query($sql) or die(mysql_error());
echo '<CENTER><br><Br> Memo has been sent ' . $username;
echo '<meta http-equiv=\"refresh\" content=\"2;url=http://www.h4ckerx.net\">';
}else{
echo "
<FORM METHOD=\"GET\" ACTION=\"$PHP_SELF\">
<TABLE WIDTH=\"75%\" align=center border=0><TR ><TD ><br>
<br>
From: <b>" . $_USER[username] . "
</b><br>
</td></tr>
<tr>
<td>Send Memo to :
<INPUT TYPE=\"text\" NAME=\"username\" VALUE=\"" . $username . "\">" . $username . "</td></tr>
<BR><tr><td>
Messege: <br></td></tr>
<tr><td colsspan=\"2\">
<TEXTAREA ROWS=10 COLS=65 NAME=\"memo\"></TEXTAREA><br>
<INPUT TYPE=\"submit\" NAME=\"submit\" ALT=\"submit\" value=\"submit\">
</FORM></TD></TR></TABLE>
";
echo $_POST['username'];
}
echo COM_sitefooter(true);
?>
all i want is to get the reply part working =( so any help will do .. thanx