Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<?php
function something(){
do some stuff;
if ( condition ) return;
do some more stuff;
}
?>
HTML
HTML
HTML
HTML
<?php something(); ?>
MORE HTML
MORE HTML
MORE HTML
MORE HTML
MORE HTML
<?php
function something()
{
//do something;
if (! condition)
{
//do some more stuff;
}
return;
}
print 'HTML
HTML
HTML
HTML';
php something();
print 'MORE HTML
MORE HTML
MORE HTML
MORE HTML
MORE HTML';
?>
<?PHP
function checkAuthorized($authorizedGroup)
}
$userid = $_SESSION['userid'];
$get_user_groups = mysql_query("SELECT * FROM usersingroups WHERE userid = '$userid'");
while($user_groups = mysql_fetch_array($get_user_groups))
{
if($user_groups['groupid']==$authorizedGroup)
{
return;
}
}
Header("Location: [URL unfurl="true"]http://myserver/unauthorized.php");[/URL]
}
?>
include functions.php;
checkAuthorized("00");
<?php
function CheckAuthorized ($authorizedGroup)
{
$retval = FALSE;
if (isset ($_SESSION['userid']))
{
$get_group_count = mysql_query ("SELECT count(*) as group_count FROM usersingroups WHERE userid = '" . $_SESSION['userid'] . "' and groupid = '" . $authorizedGroup . "'");
if ($get_group_count != FALSE)
{
list($matching_group_count) = mysql_fetch_array ($get_user_groups);
if($matching_group_count != 0)
{
$retval = TRUE;
}
}
else
{
//provide mechanism for logging/displaying the connect error.
}
}
return $retval;
}
if (CheckAuthorized("00") == FALSE)
{
header("Location: [URL unfurl="true"]http://myserver/unauthorized.php");[/URL]
}
?>