Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-07-2007, 07:31 AM #1
- Join Date
- Nov 2006
- Thanked 0 Times in 0 Posts
Problems with Accessing Variables from different pages
could some1 please help me, I am trying to show the user of my website the information they have entered into my database just after he/she has submitted the information. I am trying to do this by assigning the information they have entered to variables. I have tried the following and its noty working
$contactname = clean( $_POST['contact_name']);
<?php session_start(); ?>
<td><?php $_SESSION['contact_name']; ?></td
page 1 is suppossed to lead to page 2 and display something for the $_SESSION['contact_name'] variable but no text is showing.
could some1 please help me
03-07-2007, 07:40 AM #2
- Join Date
- Dec 2004
- In a place far, far away...
- Thanked 1,043 Times in 1,019 Posts
Is session_start() at the top of page 1? session_start() needs to be at the top of every page that you want to use sessions on. And this
should be thisPHP Code:
This also won't workPHP Code:
You need to either echo the $_SESSION or do something like thisPHP Code:
<?php $_SESSION['contact_name']; ?>