Please Help...Simple error (I think)
Posted: Sat Mar 07, 2009 1:35 pm
I have been pulling my hair out with this. My code is pasted below. Basically I have a variable stored in a session and I am trying to use it in an sql statement...why won't it work? I dont get any errors, just a blank page.
Can anyone tell me what I have done wrong? When I change Project_Name='$getjob' to a name that actually is in the database it works fine!
Code: Select all
<? session_start();
$getjob = $_POST['job'];
?>
<h1 class="title2">Find Suitable Candidate: <?php echo "$getjob" ?></h1>
.......
$query1 = "SELECT * FROM Job_Spec WHERE Project_Name='$getjob'";
$result1 = mysql_query($query1)
or die ("Couldn't execute query.");