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> Quote Link to comment 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 ?> Quote Link to comment 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 ' Quote Link to comment 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 Quote Link to comment 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 . . . Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.