I was wondering if you can help with one of my forms. I have a file calld job.php and the text field is called 'job':
<select name='job' id='job'>"
In another file I am using the sql statement
$getjob=$_POST['job'];
$query1 = "SELECT * FROM Job_Spec WHERE Project_Name ='$getjob'";
this file is called go.
this works fine.
But I am having trouble calling $getjob again in a different file (Called find10a.php). It doesnt return an error but just displays nothing. this is the code I am using:
Code: Select all
$getjob=$_POST['job'];
$query1 = "SELECT * FROM Job_Spec WHERE Project_Name ='$getjob'";
$result1 = mysql_query($query1)
or die ("Couldn't execute query.");
$colcnt = 0;
while ($row = mysql_fetch_array($result1,MYSQL_ASSOC)) {
{
if (!$colcnt)
{
$colcnt = 7;
}
$colcnt--;{
$Name1 = $row['Name'];
$Java1 = $row['Java'];
$Leadership1 = $row['Leadership'];
$Communication1 = $row['Communication'];
$Teamwork1 = $row ['Team_Work'];
$Problem_Solving1 = $row['Problem_Solving'];
}
}<form id='form2' method='post' action='go.php'>
But the find10a.php is not linked at all with the form and hence I cannot use $getjob?
Please can someone help!