I'm still learning my way round PHP and mySQL (apparently quite slowly :rolleyes: ) so I'd really appreciate any help or advice you might be able to give me as to why I can't get the following to work.
I have a table called "jobs" with 3 fields currently - "id", "jobtitle" and "jobdescrip"
I have a form to upload the info to the table, a form to edit it and a way of deleting it which all works nicely.
Problem is that I want to introduce a checkbox in the form so that I can "do stuff" with the results - like only show the results from rows where the checkbox was ticked. BUT I can't seem to pass the checkbox variable into the table at all.
Here's the uploading form:
<form action="addjob.php" method="post">
<input type="hidden" name="id" value="NULL" />
<input type="checkbox" id="show" name="show" value="1" />Show Job on Recruitment Page?
Job Title
<input type="text" name="jobtitle" title="input job title" id="jobtitle" size="50" />
Enter full Job Description
<textarea name="jobdescrip" id="jobdescrip" rows="15" cols="50"></textarea>
<input type="submit" value="Submit Job Details" />
</fieldset>
</form>
Here's the addjob.php page:
.............
/making variables
$jobtitle = $_POST['jobtitle'];
$jobdescrip = $_POST['jobdescrip'];
$show = $_POST['show'];
//oh the query!
$result=MYSQL_QUERY("INSERT INTO jobs (id,jobtitle,jobdescrip,show)".
"VALUES ('NULL', '$jobtitle', '$jobdescrip', '$show')");
.................
Any advice would be gratefully accepted
Edit: apologies if this should be in the newbies forum - please feel free to move if appropriate.