Jump to content

If variable ...


01hanstu

Recommended Posts

We have a booking system and we are trying to get it so that if you select the room then you will be able to see information about the room. the following is from the booking system

 

if (isset($_POST['selectroom']))

{$_SESSION['room'] = $_POST['selectroom'];}

if (!isset($_SESSION['room']))

$room = "C08";

else

$room = $_SESSION['room'];

 

Then my new bit of code is:

 

if ($room='C08')

print "ICT Suite with 29 RM One Computers.";

else

print "No details are available for this room yet.";

 

But it keeps using the variable at the top (in bold).

 

Please Help

Link to comment
https://forums.phpfreaks.com/topic/181250-if-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.