Page 1 of 1

is this code correct???

Posted: Sun Mar 16, 2008 6:59 pm
by chilldreamz
can anyone tell me wat is wrong in this???

Code: Select all

	if(!session_is_registered(userid))
        {

if (!$_POST['submit'])

  {

	







?>



<center><b>Please confirm that your joining this event - <?php echo "$eventname"; ?></b>

<br><br>

<form method="POST" action="singlereg.php?eventname=<?php echo $eventname; ?>">



<input type="submit" name="submit" value="Confirm">

</form

><?php

}

else

{

	

	//stored in the session



	

$query="INSERT INTO singleevents(userid,eventname,email)VALUES('$userid','$eventname','$email')";                     

$result=mysql_query($query) or die('unable to process');



echo "Registration Successful";



}
}
  else
  {
     echo "You must be logged in to do that!!!!";
     }


will session_is_registered() work??
i tried this code without loggin in.... it must display "You must be logged in to do that" .... but it is not doin that... it displays the form!!!!!!