xited1 Posted July 15, 2008 Share Posted July 15, 2008 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. Link to comment https://forums.phpfreaks.com/topic/114786-solved-trying-to-process-form-getting-parse-error/ Share on other sites More sharing options...
mmarif4u Posted July 15, 2008 Share Posted July 15, 2008 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"); } ?> Link to comment https://forums.phpfreaks.com/topic/114786-solved-trying-to-process-form-getting-parse-error/#findComment-590189 Share on other sites More sharing options...
xited1 Posted July 15, 2008 Author Share Posted July 15, 2008 Thanks so much! I thought I had tried every placement of those curly braces and rearranging stuff. Now on to more puzzles. Link to comment https://forums.phpfreaks.com/topic/114786-solved-trying-to-process-form-getting-parse-error/#findComment-590888 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.