Try something along these lines:
...
Date:
Time:
Cost:
Colour:
...
...
mysql_query("SELECT " . implode(',', $_REQUEST['columns']) . " FROM
tablename");
...
?>
This should product a query like
SELECT date,time,colour FROM tablename;
And it's a lot neater than writing a huge chunk of code to g
You got it right, except you're going to have it blow up on you if
someone doesn't select something
Try these changes:
$a1 = $_POST['ch1'];
$a2 = $_POST['ch2'];
$a3 = $_POST['ch3'];
# Add this bit
If (isset($_POST['ch1')) {
$collist .= ",$a1";
}
If (isset($_POST['ch2')) {
if ($collist == "")
2 matches
Mail list logo