I created input with name "usertest" in file quiz.html.php
Code: |
<input type="text" name="usertest" />
|
How to get this value input in file question.html.php
Code: |
$usertest = $_POST['usertest'];
|
is not working. if that is not working, I don't know what is. Help me!
File: Quiz.html.php
Code: |
<?php
defined('ARI_FRAMEWORK_LOADED') or die('Direct Access to this location is not allowed.');
$quiz = $processPage->getVar('quiz');
$ticketId = $processPage->getVar('ticketId');
$arisI18N = $processPage->getVar('arisI18N');
$option = $processPage->getVar('option');
$task = $processPage->getVar('task');
$canTakeQuiz = $processPage->getVar('canTakeQuiz');
$Itemid = $processPage->getVar('Itemid');
?>
<div style="margin: 4px 4px 4px 4px;">
<form action="<?php echo JURI::root(true); ?>/index.php<?php if ($Itemid): ?>?Itemid=<?php echo $Itemid; ?><?php endif; ?>" method="post">
<h1 align="center"><?php AriQuizWebHelper::displayDbValue($quiz->QuizName); ?></h1><br />
<?php AriQuizWebHelper::displayDbValue($quiz->Description, false); ?>
<br /><br />
<?php
if ($canTakeQuiz)
{
?>
<input class="start-btn" type="submit" class="button" value="<?php AriQuizWebHelper::displayResValue('Label.Continue'); ?>" />
<?php
}
?>
[b]<input type="text" name="usertest" />[/b]
<input type="hidden" name="tmpl" value="<?php echo JRequest::getString('tmpl', ''); ?>" />
<input type="hidden" name="task" value="get_ticket" />
<input type="hidden" name="quizId" value="<?php echo $quiz->QuizId; ?>" />
<input type="hidden" name="option" value="<?php echo $option; ?>" />
</form>
</div>
|
File: Question.html.php
Code: |
<?php
defined('ARI_FRAMEWORK_LOADED') or die('Direct Access to this location is not allowed.');
$arisI18N = $processPage->getVar('arisI18N');
$option = $processPage->getVar('option');
$ticketId = $processPage->getVar('ticketId');
$questionVersion = $processPage->getVar('questionVersion');
$questionVersionId = $processPage->getVar('questionVersionId');
$questionTime = $processPage->getVar('questionTime');
$quizInfo = $processPage->getVar('quizInfo');
$statistics = $processPage->getVar('statistics');
$questionData = $processPage->getVar('questionData');
$progressPercent = $processPage->getVar('progressPercent');
$completedCount = $processPage->getVar('completedCount');
$totalTime = $processPage->getVar('totalTime');
$hasSplitter = ($questionTime != null && $totalTime != null);
$itemId = $processPage->getVar('Itemid');
$tmpl = JRequest::getString('tmpl', '');
[b]$usertest = $_POST['usertest'][/b]
$doc = JFactory::getDocument();
$doc->addScript(JURI::root(true) . '/administrator/components/' . $option . '/js/yui/yahoo-dom-event.js');
$doc->addScript(JURI::root(true) . '/administrator/components/' . $option . '/js/validators.js');
$doc->addScript(JURI::root(true) . '/administrator/components/' . $option . '/js/ari.dom.js');
?>
<form method="post" action="<?php echo JURI::root(true); ?>/index.php<?php if ($itemId): ?>?Itemid=<?php echo $itemId; ?><?php endif; ?>" name="formQue_<?php echo $questionVersionId; ?>" id="formQue_<?php echo $questionVersionId; ?>" style="margin: 5px 5px 5px 5px;">
[b]<?php echo 'Your name: '.$usertest; ?>[/b]
<h4><?php AriQuizWebHelper::displayDbValue($quizInfo->QuizName); ?></h4>
|