i am having a errors on sendpm.php
1.[Undefined index: message in C:\wamp\www\pm\sendpm.php on line 5]
2.[Undefined index: username in C:\wamp\www\pm\sendpm.php on line 23]
i need help
Creating a simple PM system MySQL and PHP Required
#17
Posted 28 August 2012 - 11:51 AM
The inbox isn't showing anything even though the sent page is.
I cannot figure out why this is happening
I am getting no error messages it is displaying with all the basic stuff of my page but nothing new!
Please help me!
I cannot figure out why this is happening
I am getting no error messages it is displaying with all the basic stuff of my page but nothing new!
Please help me!
#19
Posted 20 April 2013 - 12:34 PM
mulson, on 11 October 2009 - 05:20 PM, said:
This tutorial is wonderful.I just encouter this error an error with the inbox. mysql_query("UPDATE users SET read_yet = 'yes' WHERE to_user = '$user' AND id ='$row_id'")or die(mysql_error());
The error is:
Unknown column 'read_yet' in 'field list'.
The error is:
Unknown column 'read_yet' in 'field list'.
The problem occurs because there was never a field set up for "read-yet" at the beginning of this tutorial.
To fix the error you need to add the field "read_yet"
try this:
SQL:
ALTER TABLE `messages` ADD `read_yet` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no'
or create a new script to run once to fix it (patch.php):
<?php
function doDB() {
global $mysqli;
//db conn and select
$mysqli = mysqli_connect('host', 'username', 'password', 'dbname');
//if con fails, stop exe
if (mysqli_connect_errno()) {
printf("Connect failed: $s\n", mysqli_connect_error());
exit();
}
}
doDB();
$patch_table_sql = "ALTER TABLE `messages` ADD `read_yet` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no'";
$patch_table_res = mysqli_query($mysqli, $patch_table_sql) or die(mysqli_error($mysqli));
echo "Patched!!";
//free results
mysqli_free_results($patch_table_res);
//close_conex
mysqli_close($mysqi)
?>
|
|







MultiQuote


|