Re: [PHP] $c=$a+$b Simple Math From: Gérald Lacombe (g.lacombe <email protected>)
Date: 08/11/00

"Andrew V. Romero" wrote:

> I have been trying to get a simple math php script to work but can't
> seem to make it work. Basically at this point I am trying to have a
> user input two numbers into a html form at
> http://www.u.arizona.edu/~avr/testing/form2.htm and then I want a php
> file to add those numbers and display the results. My php file is:
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
> <html>
> <head>
> <title>test</title>
> </head>
> <body>
> <?php
> echo "Thanks for Testing <br>";
> echo "X: $x <br>";
> echo "Y: $y <br>";
> $ans=$x+$y

$ans=$x+$y; // don't forget the ;

>
> echo "Answer: $ans <br>";
> ?>
> </body> </html>
> So why do I keep getting a "Parse error: parse error in
> /home/u20/avr/public_html/testing/form2.php3 on line 12"? What do I
> need to change in order to get it to display the results of x+y?
> Thanks.
> Remove the numbers from my address if you want to reply personally
> --
> Andrew V. Romero
> Romer1999o <email protected>
> Remove the #'s from my address to reply.
> http://www.u.arizona.edu/~avr/
> ICQ #54080914
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>