View previous topic :: View next topic |
Author |
Message |
noamkrief -
Joined: 12 Nov 2003 Posts: 40
|
Posted: Mon Dec 29, 2003 4:36 am Post subject: simple php script question |
|
|
I have a simple form page called session.php.
It starts with
<?php session_start();
This form then calles onto another file called addentry.php. This file connects and inserts the data from the form into the mysql database.
In the end of my addendtry.php i have:
echo "Thank you ". $_SESSION['F_NAME'] .", your entry was successfully added to the database.";
include 'session.php';
?>
This tells the user that the data was entered and it takes the user back to the original form to log more data...
The only problem is that session.php's first line: session_start(); shouldn't be there since it already exists in addentry.php and this is why i'm getting this error at the top of the page:
Notice: A session had already been started - ignoring session_start()
Any ideas on an a way to fix this?
thanks
Noam |
|
Back to top |
|
 |
whackaxe -
Joined: 28 Jun 2003 Posts: 90
|
Posted: Mon Dec 29, 2003 9:49 pm Post subject: |
|
|
wll if it shouldnt be there, then why is it? :?
anways, try
Code: |
if (!isset($_SESSION['F_NAME']))
{
session_start()
}
|
|
|
Back to top |
|
 |
|