FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


What is wrong with my script?





ParsaAkbari
I made a expression solver it worked for a while and now for some reason it has stopped working, is it because i have changed the script/overwrited it?



Input.php
Code:
<html>
<head></head>
<body>
Hello and welcome to Parsa Akbari's expression solver.<br>
<br>


<form action="final.php" method="post">
<input type="text" name="lvar1" size="1">x&nbsp; &nbsp;
<input type="text" name="lnum1" size="1">&nbsp; &nbsp;
=&nbsp; &nbsp;
<input type="text" name="rvar1" size="1">x&nbsp; &nbsp;
<input type="text" name="rnum1" size="1">&nbsp; &nbsp;
<input type="submit" value="Send">

</form>
</body>
</html>





Final.php
Code:
<html>
<head></head>
<body>
<?php
$lvar1 = $_POST['lvar1'];
$rvar1 = $_POST['rvar1'];
$lnum1 = $_POST['lnum1'];
$rnum1 = $_POST['rnum1'];
$fvar = $lvar1 - $rvar1;
$fnum = $rnum1 - $lnum1;
echo "Your equation is:
$fvar
x =
$fnum";
?> <br />
<?php
if ($fnum + $fvar == 0) {
   echo 'x = 0';
}
else {
   $xis = $fnum/$fvar;
   echo "Simplified: x =
$xis";
}
?>
</body>
</html>
Peterssidan
The script works fine for me.
The only thing I could think of that could cause trouble is if you actually use the name "Final.php" for the file and not "final.php".
rockacola
ParsaAkbari, I'm suspecting your server setup is playing up on you. Check your AMP setup see if it is still functional. Surprised
ParsaAkbari
Okay thanks a lot guys the problem has been solved.
Related topics
CGI-bin script help
Running a "Hello World" php script
script no longer working on server 2 ????
Need a script
What is wrong with this MySQL query?
I'm doing something wrong,,,
question about mail a friend script
how to page up with out using link anchor ?
PHP script problem
whats wrong with this php script?
Activation Script
php / javascript script works in FireFox browser, but not IE
Connected to another part of a php script.
think something wrong with javascript, and template
Running a Perl script in the background
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.