Page 1 of 1

Newbie to PHP

Posted: Sun Sep 12, 2010 5:15 pm
by Motley
Greetings,

I'm definitely new to PHP. I am trying to do the following:
First I need to do a page which does the following predefined numbers.
$a = 35
$b = 10
$c = 17

$a times $c divided by $b equals..........

I have no idea what the "variables" (if that is the proper term is for what I need to define multiplication, division & equals.)

I have got this whopping far:

<?php
$A = '35';
$B = '10';
$C = '10';
echo "$var, $Var";
?>

Next I need to do a form where the user can enter their own set of numbers using the same math of user number x user number divided by user number= answer.
Any help with thess admitidely newbie question qould be greatly appreciated.

Re: Newbie to PHP

Posted: Sun Sep 12, 2010 5:30 pm
by buckit
sounds like a homework assignment? we'll help with a specific problem... but no one will do your work for you.

but to help send you in the right direction.

The php manual is a very good resource. a 2 second google returned this: http://php.net/manual/en/language.opera ... hmetic.php

for the second, google "sending post data to php"

good luck.

Re: Newbie to PHP

Posted: Sun Sep 12, 2010 6:55 pm
by angelicodin
in addition to what buckit said, http://www.w3schools.com/php/php_operators.asp also has some great information on this, also this would be a good place to start learning php.