0
<?php 
                                $id=$_GET['memberID'];
                                $result = mysql_query("SELECT * FROM members WHERE memberID='$id'");
                                while($row=mysql_fetch_array($result)){

                                $user=$row['userlevel'];

                                if ($user==3){
                                ?>
                                <font size="2" style="postion:relative; top:0px; left:30px; "> Hi <?php echo $row['username'];  ?>!  
                                <a href="logout.php" style="text-decoration: none">Logout</a>
                                <font style="position:relative; top:0px; right:-500px;" size="2" color="#1491C6 ">

                                <?php }else{?>

                                <font size="2" style="postion:relative; top:0px; left:30px; "> Hi Guest!  
                                <a href="login" style="text-decoration: none">Login</a> or 
                                <a href="register" style="text-decoration: none">Register</a></font>
                                <font style="position:relative; top:0px; right:-500px;" size="2" color="#1491C6 ">

                                <?php }?>
                                <?php }?>

Edited by Ana_2

2
Contributors
1
Reply
22
Views
3 Years
Discussion Span
Last Post by diafol
0

Have you tried echoing $_GET['id'] ?

Also don't run this code on a remote server as you're vulnerable to SQL injection. Clean your inputs or use PDO or mysqli and parameterized queries.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.