here is my code for read message but error display in my page
Notice: Undefined index: message in C:\wamp\www\.....m\Mailbox\read_message.php on line 6
anyone help me for this problem.how to solve it.
CREATE TABLE `messages` (
`message_id` int(11) NOT NULL auto_increment,
`from_user` varchar(65) character set latin1 collate latin1_general_ci NOT NULL,
`to_user` varchar(65) character set latin1 collate latin1_general_ci NOT NULL,
`message_title` varchar(65) NOT NULL,
`message_contents` longtext NOT NULL,
`message_read` int(11) NOT NULL default '0',
PRIMARY KEY (`message_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=21;
<?php
session_start();
$userfinal=$_SESSION['MM_Username'];
require "database.php";
$message_id = $_GET['message'];
$message = mysql_query("SELECT * FROM messages WHERE message_id = '$message_id' AND to_user = '$userfinal'");
$message_id=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>';
?>