dollythesheep Posted March 30, 2008 Share Posted March 30, 2008 Can anyone see what's wrong with this code? It keeps on telling me that this line is wrong [color=purple]while ($row = mysql_fetch_assoc($query3)){[/color] ...?? <?php if (isset($_POST['submit'])){ $choice = $_POST['choice']; echo "The user selected <b>$choice</b><p>"; } $query= "SELECT count(*) AS c FROM detention WHERE detentiondate='$detentiondate' AND pupilno='$pupilno'"; $result = mysql_query($query); $result_array = mysql_fetch_assoc($result); $query3 = mysql_query("SELECT detentiondate.detentiondates FROM detentiondates, detention, academicyear WHERE detention.detentiondate != '$_SESSION[detentiondate]' AND detention.detentiondate <= academicyear.enddate AND detention.detentiondate >= academicyear.startdate AND '$result_array[c]' = 0 "); $result3 = mysql_query($query3); echo '<form>'; [color=purple]while ($row = mysql_fetch_assoc($query3)){[/color] echo "<input type='radio' name='choice' value='{$row['detentiondate']}'><br>"; } echo '<input type="submit" name="submit">'; echo '</form>'; ?> Link to comment https://forums.phpfreaks.com/topic/98600-error/ Share on other sites More sharing options...
dollythesheep Posted March 30, 2008 Author Share Posted March 30, 2008 ok never mind that...I got the error sorted out...but it's not returning any dates as it should do...the radios are there though Link to comment https://forums.phpfreaks.com/topic/98600-error/#findComment-504619 Share on other sites More sharing options...
dollythesheep Posted March 30, 2008 Author Share Posted March 30, 2008 nevermind...moved to sql forum Link to comment https://forums.phpfreaks.com/topic/98600-error/#findComment-504632 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.