Jump to content

[SOLVED] Trying to process form, getting parse error


xited1

Recommended Posts

Of course I'm new!  In the first part of my code, when I check the syntax I get "unexpected T-String error on line 4.  Here is the code:

<?
session_start();

if  ( ($_SESSION[ 'userid' ])
header('location:wicked.php'); 
{
else	{  
$_SESSION[ 'logged' ] = 0;
header ("location:register.php");
}
}

 

I cannot figure it out.  Can anyone point it out for me?  Appreciate any help.

 

This should be:

if   ($_SESSION[ 'userid' ]){
header('location:wicked.php'); 
} else 
{

Whole code:

<?php
session_start();

if ($_SESSION[ 'userid' ]){
header('location:wicked.php'); 
}
else	{  
$_SESSION[ 'logged' ] = 0;
header ("location:register.php");
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.