Im trying to create an if statement based on the value in my database.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>E Movies :: Rent A Movie</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div id="container">


<div id="header">
</div>

<div id="menu">
<a href="index.php">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="browse.php">Browse</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="rent.php">Rent</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="contact.php">Contact</a>
</div>

<div id="feature" align="center">
<?php
    include 'php/featureFilm.php';
?>
</div>

<div class="Titles" id="main">
  <p>Rent A Movie</p>
  
<?php  $film_ID =$_GET['id'];
	   $filmTitle =$_GET['filmTitle'];
	   $availibility =$_GET['availibility'];
	   
	   if ($availability == "no")
		   header('Location: http://cms-stu-iis.gre.ac.uk/sb804/webtech/');
	   ?>
 
  <form action="orderMovie.php?id=<? echo $film_ID?>&filmTitle=<? echo $filmTitle ?>" name="orderMovie" id="orderMovie" method="post">
  <table width="500" border="1">
  <tr>
    <td>First Name:</td>
    <td><input name="firstName" id="firstName" type="text"></td>
  </tr>
  <tr>
    <td>Second Name:</td>
    <td><input name="secondName" id="secondName" type="text"></td>
  </tr>
  <tr>
    <td>Email:</td>
    <td><input name="Email" id="Email" type="text"></td>
  </tr>
  <tr>
    <td>Address:</td>
    <td><input name="Address" id="Address" type="text"></td>
  </tr>
  <tr>
    <td>Telephone Number:</td>
    <td><input name="phoneNumber" id="phoneNumber" type="text"></td>
  </tr>
  <tr>
  <td><input name="Submit" type="submit" value="Submit"></td>
  </tr>
</table>
</form>

  <p>&nbsp;</p>
</div>

<div id="footer" align="center">
Contact Us &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Terms and Conditions &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Privacy Policy &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Price Guide
</div>

the page just sits there, it doesnt matter if $availability=no or yes, nothing happens.

I think its something to do with the if statement but if anyone could clarify that would be great.

$availibility =$_GET;
if ($availability == "no")
replace availability by availibility

ah rookie error, thanks would have been here for hours!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.