Ok, I'm back
Apparently their was nothing wrong with my computer...
and that it just needed to be shipped away and to be sent back to me 2 weeks later for it to work
Annyhows..
I'm still finding it hard to get this beast to work.
Heres the lowdown.
3 files are used.
message.add.php
message.php
fuctions.php
now, it's storing the message in the database fine. But not the persons username.
Messages.php is just a simple form that people fill out.
In fuctions.php the function that is called is
PHP Code:
function addMessage($message,$username) {
$this->sql->Insert("INSERT INTO ".$this->TABLES['message']." SET message = '".$message."', username = '".$username."' ");
return true;
}
message.add.php is
PHP Code:
<?php
session_start();
if ($functions->addMessage($message,$username)) {
header("Location: index.php");
} else {
echo $functions->ERROR_MSG;
}
?>
It stores the message that they typed in, but it doesn't store who wrote the message.
I can get it to display their usernames on pages, but not store it in the database. To print out their username, I have to have the code
PHP Code:
<?
echo($_SESSION['SESS_username']);
?>
on index.php or on a page which is included into index.php.. (index.php?act=magic)
Any help would be awesome, thanks
Lothop
Last edited by lothop; 08-15-2004 at 10:26 PM..
|