I'm having an issue using INCLUDE.
On the first page, I have the following code:
<?php
require_once('config.php');
session_start();
$uid=$_SESSION['uid']; // UserID variable
$tdate=$_SESSION['tdate']; // Current Date variable
$tdate1=$_SESSION['tdate1'];
$connect=mysql_connect($host, $user1, $pw) or die ("Unable to Connect to Database!");
$dbselect=mysql_select_db($db) or die ("Database does not exist!");
include 'gensysmess.php';
...
On the gensysmess.php page, I have the following code:
<?php
$a1query="INSERT into umessages (fromuser, umessage) values ('SYSTEM', 'First Notice') ";
$a1result=mysql_query($a1query) or die ("Error in Query".mysql_error());
?>
It doesn't work.
If I put the code from gensysmess.php in place of the INCLUDE statement...it works.
If I copy the code above the INCLUDE statement to the gensysmess.php page.....it doesn't work.
I'm at a loss. Can someone help?
thx
On the first page, I have the following code:
<?php
require_once('config.php');
session_start();
$uid=$_SESSION['uid']; // UserID variable
$tdate=$_SESSION['tdate']; // Current Date variable
$tdate1=$_SESSION['tdate1'];
$connect=mysql_connect($host, $user1, $pw) or die ("Unable to Connect to Database!");
$dbselect=mysql_select_db($db) or die ("Database does not exist!");
include 'gensysmess.php';
...
On the gensysmess.php page, I have the following code:
<?php
$a1query="INSERT into umessages (fromuser, umessage) values ('SYSTEM', 'First Notice') ";
$a1result=mysql_query($a1query) or die ("Error in Query".mysql_error());
?>
It doesn't work.
If I put the code from gensysmess.php in place of the INCLUDE statement...it works.
If I copy the code above the INCLUDE statement to the gensysmess.php page.....it doesn't work.
I'm at a loss. Can someone help?
thx