All pastes #794084 Raw Edit

Mine

public text v1 · immutable
·published 2007-11-22 21:32 UTC
rendered paste body
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php

        // Include the database information.
        require("include/database.php");
        require("include/opensession.php");
        require("include/character_functions.php");
                
        // Check if we need to verify an answer.
        if(isset($_POST['charid'])) {
                
                // We do.
                $responsecheck = 1;
        
        } else {
                
                // We don't.
                $responsecheck = 0;
        
        }
        
        
        if($responsecheck == 0) {
        
                // Get a new character to display.
                getCharacter("new");
        
        } else if($responsecheck == 1) {
        
                getCharacter($_POST['charid']);
                if($_POST['reading'] == $char_array['reading']) {
                
                        // The answer is correct.
                        $correctAns = 1;
                        
                        // Get a new character.
                        getCharacter("new");
                        
                } else {
                
                        // The answer is incorrect.
                        $correctAns = 0;
                        
                }
        }
        

?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<title>Kanji for Gaijin - Retrieve Test</title>
</head>
<body>
<div id="container">
<div id="correctness">
<p><?php
                                        
                                                if($correctAns == "0") {
                                                
                                                        echo "Incorrect! 
Try again!      <br /><br />";
                                                        
                                                } else if ($correctAns 
== "1") {
                                                
                                                        echo "Correct! 
<br /><br />";
                                                        
                                                }
                                        
                                        ?></p>
</div>
<div id="character">
<p><?php
                                                echo 
$char_array['character'];
                                        ?></p>
</div>
<div id="response_form">
<form name="response" method="post" action="index.php" id=
"response"><strong>Reading:</strong> <input type="text" name=
"reading" size="50" /> <input type="hidden" name="charid" value=
"<?php echo $char_array['id']; ?>" /><br />
<input type="submit" name="submitButton" value="Check" /></form>
</div>
</div>
<?php

        mysql_close();

?>
</body>
</html>