HI, I am passing the variable $user in a hyperlink to the page Welcome.php
Welcome.php needs to collect $user and perform accordingly.
This is my code
The only problem is that it will only show the main2.php page, even if the $user var is set to 2. Could someone tell me where I'm going wrong please. I know for certain the the var is being passed correctly and what it is set to each time, I just can't get my if statement to perform properly.
I'm sure this is something really small and silly, but I've been looking at it most of the day and I'm really lost.
Any help/advice would be honourable.
Thank you.
Tony
Welcome.php needs to collect $user and perform accordingly.
This is my code
Code:
<?php
session_start();
$user=$_REQUEST['user'];
echo '<html>';
echo '<head><title>The Welcome Page</title></head><framset cols="160,*" framespacing="2" frameborder="5">';
if($user=1){
echo '<frame src="main2.php" name="main" noresize>';
} else {
echo '<frame src="main.php" name="main" noresize>';
}
echo '<frame src="logo.php" scrolling="auto" noresize>';
echo '</frameset></html>';
?>
I'm sure this is something really small and silly, but I've been looking at it most of the day and I'm really lost.
Any help/advice would be honourable.
Thank you.
Tony