is this code correct??? Topic is solved

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
chilldreamz

is this code correct???

Post by chilldreamz » Sun Mar 16, 2008 6:59 pm

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!!!!!!

Post Reply