Output the result of PHP in HTML
My task is to display the output of php script in HTML. It seems like,
there is a problem with My PHP code, which i cant make out. Please take a
look at my code and let me know where I am going wrong.thanks in advance
Here is my HTML
<form id="form" name="form" method="post" action="NetOptInput1.html">
<label> Please wait. Your data is being processed.
</label><br>
<br>
<label>Token Number for the submitted Data set:</label><br />
<?php
include("GetToken.php");
echo $result;
?> <br>
<div style="text-align: center"><br><br>
<input type="submit" name="submit" id="submit" value="Home" class="submit"
onClick = "gotoResults()">
<div class="spacer"></div>
</form>
and here is my PHP
<?php
function get_value_of($Token Number)
{
$lines = file('Token.txt');
foreach (array_values($lines) AS $line)
{
list($key, $val) = explode('=', trim($line) );
if (trim($key) == $Token Number)
{
return $val;
}
}
return false;
}
?>
No comments:
Post a Comment