PDA

View Full Version : setting session variables as a recordset


emerald511
04-25-2008, 02:33 AM
I want the session variable to be equal to the ID number of the record and reset each page. On the insert information page I am not starting the session variable in attempt to have the hidden field for the session variable spit out the previous ID number.

Here is what I set up for the session variable on the recordset page:

<?php session_start();
$_SESSION['pastID'] = $_Recordset1['chooseID']; ?>

Though I am getting this error:

Warning: main(Connections/newMediaConn.php) [function.main]: failed to open stream: No such file or directory on line 2

Fatal error: main() [function.require]: Failed opening required 'Connections/newMediaConn.php' (include_path='.:') on line 2

How do I go about correctly setting up this session variable so I get the ID information?

nikos101
04-25-2008, 11:33 AM
Your path to your file is wrong, thats all

emerald511
04-27-2008, 06:07 PM
Oh I thought I had fixed that. Awesome! Though now on the insert form I have

<input type="hidden" name="pastID" value="<?php $_SESSION['pastID'] ?>" />

And when you insert the page it says "pastID" can't be null.