PHP Classes

Doubt about form

Recommend this page to a friend!

      QCM Class  >  All threads  >  Doubt about form  >  (Un) Subscribe thread alerts  
Subject:Doubt about form
Summary:$submit variable are never true
Messages:2
Author:Eduardo Fuerte
Date:2009-02-26 22:48:28
Update:2009-03-19 16:55:35
 

  1. Doubt about form   Reply   Report abuse  
Picture of Eduardo Fuerte Eduardo Fuerte - 2009-02-26 22:48:28
Hello Mr. Fauque !

I've used your examples and my doubt here is about the $submit variable that is always "false" so the correction ($test->correction()) of the form test never occur ?!

I really don't know if it's needed any configuration (unfortunatelly I cant understand your pdf text very well)

Could you please help me ?

Eduardo

<?
$idQCM = 9; // Identifiant, numéro du questionnaire
require("QCM.php"); // Insertion de la classe d'objet
$test = new qcm($idQCM); // Instanciation du test
?>
<html>
<head>
<title><? echo $test->title; ?></title>
<link rel="stylesheet" href="test.css" type="text/css">
</head>
<body>

<?

echo "Submit ".$submit;

if (!$submit) {
echo "<form method=\"post\" name=\"test\" action=\"$PHP_SELF\">\n";
$test->display(); // Affichage du test
echo "</form>\n"; }
else {
$test->correction(); // Correction du test
}
?>
</body>
</html>

  2. Re: Doubt about form   Reply   Report abuse  
Picture of Pierre FAUQUE Pierre FAUQUE - 2009-03-19 16:55:35 - In reply to message 1 from Eduardo Fuerte
This reply is just for the forum, because you (Eduardo) know the solution.
For others take a look at the message : "This package is done with errors, #6".
The solution is in it.

Pierre