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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.