Re: $c=$a+$b Simple Math

From: Date: Fri, 11 Aug 2000 07:37:29 +0000
Subject: Re: $c=$a+$b Simple Math
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-11277@lists.php.net to get a copy of this message
"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@pharmacy.arizona.edu > 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@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#11277) next »