Jump to content

private message system help


conan318

Recommended Posts

im trying to make a private message system now when i send a message it works fine but when i open the message at the other end i get a blank message. now i think the problem is with $messageid = $_GET['messages'] when i echo $messageid i get nothing, if i use the print_r($_GET) it returns Array ( [messageid] => 12 ).  thanks

 

 

<?php
session_start();
$myusername=$_SESSION['myusername'];
require "database.php";

$messageid = $_GET['messages'];
$message = mysql_query("SELECT * FROM messages WHERE message_id = '$messageid' AND to_user = '$myusername'");
$message=mysql_fetch_assoc($message);
echo "$message";
echo "<h1>Title: ".$message['message_title']."</h1><br><br>";
echo "<h3>From: ".$message['from_user']."<br><br></h3>";
echo "<h3>Message: <br>".$message['message_contents']."<br></h3>";

echo '<form name="backfrm" method="post" action="inbox.php">';
echo '<input type="submit" value="Back to Inbox">';
echo '</form>';
?>

Link to comment
https://forums.phpfreaks.com/topic/233746-private-message-system-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.