Jump to content

In Game PM Error


Hooo

Recommended Posts

Basically, the code I will paste is the read message link. What happens is the message sends perfectly, however when clicking on the actual title the page (Below) doesn't actually show what it is supposed to, this being the message title, message contents etc.

 

<html>
<body>

<?php

include 'config.php';
include 'opendb.php';

session_start();

$userfinal=$_SESSION['usname'];
$messageid = $_GET['message'];
$message = mysql_query("SELECT * FROM `messages` WHERE `message_id` = '{$messageid}' 

AND `to_user` = '{$userfinal}'") or die(mysql_error());
$message=mysql_fetch_assoc($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>';

?>

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/172288-in-game-pm-error/
Share on other sites

<html>
<body>

<?php

include 'config.php';
include 'opendb.php';

session_start();

$userfinal=$_SESSION['usname'];
$messageid = $_GET['message'];
$message = mysql_query("SELECT * FROM `messages` WHERE `message_id` = '{$messageid}' AND `to_user` = '{$userfinal}'") or die(mysql_error());
$MessageRecieved=mysql_fetch_assoc($message);

echo "<h1>Title: ".$MessageRecieved['message_title']."</h1><br><br>";
echo "<h3>From: ".$MessageRecieved['from_user']."<br><br></h3>";
echo "<h3>Message: <br>".$MessageRecieved['message_contents']."<br></h3>";

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

?>

</body>
</html>

 

No luck, did I miss something? :/

Link to comment
https://forums.phpfreaks.com/topic/172288-in-game-pm-error/#findComment-908418
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.