Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right direction with this problem I have.
I am trying to set up a system induct new members of staff onto their training programme.
First I have created a table 'induction_course_dates' of all the course dates and induction_course_titles of all the different courses.
These are the 2 queries I have made on the database
///////////////////////// Make the course title query //////////////////////////////
$q_courses = "SELECT * FROM induction_course_titles";
$result_courses = mysqli_query($dbc, $q_courses);
$row_courses = mysqli_fetch_array($result_courses);
///////////////////////// Make the course date query //////////////////////////////
$q_date = "SELECT * FROM induction_course_dates WHERE DATE(course_date)>='$today' AND course='$courseID' ORDER BY course_date ASC LIMIT 4";
$result_date = mysqli_query($dbc, $q_date);
$row_date = mysqli_fetch_array($result_date);
Obviously in the second query '$courseID' does not have a value so won't actually return anything but I don't know how to loop it through all of the induction_course_titles id's.
For example if it the query read...
///////////////////////// Make the course date query //////////////////////////////
$q_date = "SELECT * FROM induction_course_dates WHERE DATE(course_date)>='$today' AND course='2' ORDER BY course_date ASC LIMIT 4";
$result_date = mysqli_query($dbc, $q_date);
$row_date = mysqli_fetch_array($result_date);
...then this would return the results I'm looking for but there are 25 different courses.
I want the final output to appear as below
The user will select a date from the next four available
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Course 1</td>
<td>
<select name="select" id="select">
<option value="date1">Date 1</option>
<option value="date2">Date 2</option>
<option value="date3">Date 3</option>
<option value="date4">Date 4</option>
</select>
</td>
</tr>
<tr>
<td>Course 2</td>
<td><select name="select2" id="select2">
<option value="date1">Date 1</option>
<option value="date2">Date 2</option>
<option value="date3">Date 3</option>
<option value="date4">Date 4</option>
</select></td>
</tr>
<tr>
<td>Course 3</td>
<td><select name="select3" id="select3">
<option value="date1">Date 1</option>
<option value="date2">Date 2</option>
<option value="date3">Date 3</option>
<option value="date4">Date 4</option>
</select></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="button" id="button" value="Submit" /></td>
</tr>
</table>
Can anybody help?!!!! PLEASE!!!!!
I got my hosting suspended XD
So I saw this challenge a day or so agohttp://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110101&format=htmlAnd I thought to myself "Well, what about numbers
$variable = $variable
HelloSorry if this is a really simple question but I have run out of ideas. Is there a really simple way of doing the following:$animal_dog = $something_something[$i]['animal_dog'];$animal_cat =
parse error
Parse error: syntax error, unexpected '[', expecting ')' in /Users/admin/Sites/phptest/array.php on line 5 Code: <?phpfunction shippingPrice($zone,$weight){ $ground = array(2 => array
how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.If I put a submit button on the page, all is working fine.I don't like the submit button as its
Undefined variable: adHTML
Hello:While checking my site error logs, I've noticed one repetitive error that fills the log file. The error is "PHP Notice: Undefined variable: adHTML in /.../bot_jrheader.php on line
downloading a file as HTML
Hi.I'm rather confused with forcing a download. I just want to save dynamic content (from $_SESSION[''] data) as a .html file.The script to do this is a PHP page, but when I click on
Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spamming, and not just regular spamming. They edited all the current user posts to their name, and
Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website membership from on their computer. He's afraid that the users might share their login's with their
frames get header location..
i have two frames, one top, one bottom. how do i do a form on the bottom frame that gives me the url of the top frame.is it get header location?.. if so how do i use it to get the top frames url.is
need help about
i store the value of my select statement result to an array and stored it to a variable named $fname the i used it as the value of:<input type='text' name='fname' value=<?php echo $fname