rednebmas Posted December 12, 2010 Share Posted December 12, 2010 It is not outputting anything after the third echo. This is where it is http://sambender.com/brandon/review.php?subject=Math%20Problems echo "<table border='0'><tr><td><div id='question'><b>Question:</b><br/>$question</div></td></tr>"; echo "<tr><td><div id='answer' style='display:none;'><b>Answer:</b><br/>$answer</div>"; echo "<a href=\"javascript:showdiv('answer')\">Show Answer</a></td></tr>"; echo "<td><tr><a href='submitanswer.php?correct?=yes&correctid=$correctid>I got this correct!</a></tr></td></table>"; It just outputs <table border='0'><tr><td><div id='question'><b>Question:</b><br/>What is your name?</div></td></tr><tr><td><div id='answer' style='display:none;'><b>Answer:</b><br/>Rooba holabint</div><a href="javascript:showdiv('answer')">Show Answer</a></td></tr><td><tr> Link to comment https://forums.phpfreaks.com/topic/221441-stops-echoing/ Share on other sites More sharing options...
Boxerman Posted December 12, 2010 Share Posted December 12, 2010 are you putting them in tags? <?php code ?> Link to comment https://forums.phpfreaks.com/topic/221441-stops-echoing/#findComment-1146382 Share on other sites More sharing options...
rednebmas Posted December 12, 2010 Author Share Posted December 12, 2010 Yep. Entire php section <?php $subject = $_GET['subject']; $userID = $_COOKIE['userID']; include("database.php"); $today = dateAdd("now","+0 days"); $correctRow = selectrow("SELECT * FROM correct WHERE nextTimeToAnswer <= '$today' and subject = '$subject' and userid = $userID"); $problemid = $correctRow['problemid']; $correctid = $correctRow['id']; $problemRow = selectrow("SELECT * FROM problems WHERE id = $problemid"); $question = $problemRow['question']; $answer = $problemRow['answer']; echo "<table border='0'><tr><td><div id='question'><b>Question:</b><br/>$question</div></td></tr>"; echo "<tr><td><div id='answer' style='display:none;'><b>Answer:</b><br/>$answer</div>"; echo "<a href=\"javascript:showdiv('answer')\">Show Answer</a></td></tr>"; echo "<td><tr><a href='submitanswer.php?correct?=yes&correctid=$correctid>I got this correct!</a></tr></td></table>"; ?> Forgot to close the href with ' Link to comment https://forums.phpfreaks.com/topic/221441-stops-echoing/#findComment-1146384 Share on other sites More sharing options...
n3r0x Posted December 12, 2010 Share Posted December 12, 2010 echo "<td><tr><a href='submitanswer.php?correct?=yes&correctid=$correctid>I got this correct!</a></tr></td></table>"; should be echo "<td><tr><a href='submitanswer.php?correct?=yes&correctid=$correctid'>I got this correct!</a></tr></td></table>"; you are missing a ' after $correctid Edit: apparently i was to slow typing.. hehe Link to comment https://forums.phpfreaks.com/topic/221441-stops-echoing/#findComment-1146386 Share on other sites More sharing options...
Pikachu2000 Posted December 12, 2010 Share Posted December 12, 2010 Also, the last echo has the <td> tag before the <tr> tag . . . Link to comment https://forums.phpfreaks.com/topic/221441-stops-echoing/#findComment-1146391 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.