$_GET

Spartak

Member
Sep 24, 2011
225
33
Hello,

i have alittle probleme im making a home page for RevCMS im almost done all i need is a how to use $_GET because when i code it it won't work but if i try on another cms its work fine :/

Because Kryptos used one on Core to unban.........Can someone explain me? or tel me where should i put it?

for ex:
Code:
if(@$_GET['user'])
{
$username = $_GET['user'];
}
else
{
$username = $_SESSION['username'];
}
don't worry about security i will secue it after .
 

Spartak

Member
Sep 24, 2011
225
33
PHP:
<?php
if(@$_GET['user'])
{
$username = $_GET['user'];
}
else
{
$username = $_SESSION['user']['username'];
}
$userq = mysql_query("SELECT * FROM users WHERE username = '".$username."' LIMIT 1");
?>
----------------------------------------------------------------------------------------------------------------
<?php
if(mysql_num_rows($userq) > 0)
{
$user = mysql_fetch_array($userq);
?>
<div class="OnlineStatus">
<?php
if($user['online'] == 1)
{
?>
<div class="Online"><?php echo '<strong>Etat:</strong> <font color="green">Connect鼯font>'; ?></div>
<?php
}
else
{
?>
<div class="Offline"><?php echo '<strong>Etat:</strong> <font color="red">Hors-Ligne</font>'; ?></div>
<?php
}
?>

then

<?php } else {?>

The user doesn't exist

<?PHP }?>

if i visit myhotel.us/home?user=Spartak its doesn't get the user :/

still doesn't work :/
 

Users who are viewing this thread

Top