View unanswered posts | View active topics It is currently Sun Aug 07, 2022 8:18 pm



Reply to topic  [ 2 posts ] 
 php arithmic trouble 
Author Message
Junior Member

Joined: Wed May 19, 2004 9:11 am
Posts: 10
Post 
<?php
$ans = $_POST[first] $_POST[calc] $_POST[second];
$message = "";
if (!isset($_POST[first]) == here) {
$message = "Welcome to the math machine";
} elseif (($_POST[first]) == ($_POST[first])) {
$message = "$_POST[first] $_POST[calc] $_POST[second] = $ans";
}
?>
this a peice of code from a test page i am trying out. $_POST[first] $_POST[calc] $_POST[second]; these are user inputs, they would make, E.G. 4 + 4, i want this to complete so that when i put $ans in my code it will give me 8, not 4 + 4.

any help on this matter will help me very much, and is much apreciated.
thanks loads
lee


Wed May 19, 2004 9:14 am
Report this post
Profile
Junior Member

Joined: Wed May 19, 2004 9:11 am
Posts: 10
Post 
the message above is me phplee, i forgot to log in!!!

thanks


Thu May 20, 2004 3:23 am
Report this post
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.