• (2 Pages)
  • +
  • 1
  • 2

Creating a simple PM system MySQL and PHP Required Rate Topic: ***-- 2 Votes

#16 pokayber  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-August 12

Posted 15 August 2012 - 09:03 AM

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
Was This Post Helpful? 0
  • +
  • -

#17 will181  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 28-August 12

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!
Was This Post Helpful? 0
  • +
  • -

#18 Groudon  Icon User is offline

  • New D.I.C Head

Reputation: -18
  • View blog
  • Posts: 33
  • Joined: 01-December 12

Posted 02 December 2012 - 02:52 AM

This script is good working.
Was This Post Helpful? -1
  • +
  • -

#19 phpandme  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-April 13

Posted 20 April 2013 - 12:34 PM

View Postmulson, 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 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)
?>

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2