01hanstu Posted November 17, 2008 Share Posted November 17, 2008 Is there a way of having a script perform the following : If room is booked then print who booked it and who for i.e. Mr Jones Y7 " If Bkd = yes then [print name/Year]" else " If Bkd = no then [print picture that is linkable to the booking form]" ; Please Advise Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 17, 2008 Share Posted November 17, 2008 Something like this: // Connections to Database go here. $sql = mysql_query("SELECT * from table_name WHERE id = '23'"); $row = mysql_fetch_array($sql); if($row['Bkd'] == 'yes'){ echo $row['name'].' / '.$row['year']; }else{ echo '<a href="/someLink.php">No</a>'; } Quote Link to comment Share on other sites More sharing options...
01hanstu Posted November 18, 2008 Author Share Posted November 18, 2008 Thanks for your reply, my booking system actually looks better with the pictures. Once again Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.