Hi
I have a bit of code. What I need to try and achieve is when an id is less than 5 a tick box appears that can be submitted with a form. When the ID is greater than 5 the tickbox should not appear, I have put the area I am having problems with in Bold. I have tried so many things on this but cannot get it to work - does anyone have any ideas?
Thanks
<form method='post' action='order.php'>
<p>Selected Magazine:
<?php
//<select name='magazine'>
while ($myrow = mysql_fetch_row($result))
{
if ($myrow[0] == $_GET['mag_id'])
{
//echo "<option value='" . $myrow[0] . "' selected>" . $myrow[1] . "</option>";
echo $myrow[1] . "<input type='hidden' name='magazine' value='" . $myrow[1] . "'><input type='hidden' name='mag_id' value='" . $myrow[0] . "'>";
}
else
{
//echo "<option value='" . $myrow[0] . "'>" . $myrow[1] . "</option>";
}
}
//</select>
echo " - ";
$result = q('SELECT * FROM ' . $db_prefix . 'issues WHERE id=' . GetSQLValueString($_GET['issue_id'],'int') . ' LIMIT 1');
while ($myrow = mysql_fetch_row($result))
{
echo $myrow[1] . "<input type='hidden' name='issue' value='" . $myrow[1] . "'><input type='hidden' name='issue_id' value='" . $myrow[0] . "'>";
}
?>
<br>
<br>
<input type='hidden' name='order_type' value='3'>
<span lang="EN-US">Simply enter the relevant numbers in the Readerlink Enquiry box below separated by a comma (eg: 12345, 67890).</span><span lang="EN-US"><br>The numbers relate to products and services advertised or featured editorially in the magazine.<br></span><br>
<textarea name='coupons' cols=75 rows=5></textarea>
<br>
<?php
$a = $_GET['mag_id'];
if ($a <= 5) {
echo "value is smaller or equal to 5";
} else {
echo <input type="checkbox" name="future" value="checkbox">
Tick here to receive regular, free copies of this magazine.
}
?>
<br>
</p>
<center>
<input type='image' src='images/orderinfo.jpg' id='submit'></center></form>