PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Dec 20, 2014 2:59 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Jul 15, 2012 12:30 pm 
Offline
Forum Newbie

Joined: Sun Jul 15, 2012 12:25 pm
Posts: 1
I am having problems with this code. It worked until I made it into a session, now I dont know how to change it to make it work.
Syntax: [ Download ] [ Hide ]
<?php
//let's start the session
session_start();
//now, let's register our session variables
session_register('username');

//finally, let's store our posted values in the session variables
$_SESSION['name'] = $_POST['name'];

if(isset($_POST['username']))
{
$users['admin'] = array('password' => 'admin', 'redirect' => 'admin.php');
$users[$username] = array('password' => $password, 'redirect' => 'form3.php');


?>

Can you help me find out why this code wont redirect me to the right pages. Right now I get a blank screen.


Top
 Profile  
 
PostPosted: Sun Jul 15, 2012 4:23 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 5701
Location: WA, USA
Besides the obvious syntax error, there's nothing in there that actually redirects.

Did you post all of the code? You need to post all of the code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group