Newbie to PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Motley
Forum Newbie
Posts: 1
Joined: Sun Sep 12, 2010 5:03 pm

Newbie to PHP

Post 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.
buckit
Forum Contributor
Posts: 169
Joined: Fri Jan 01, 2010 10:21 am

Re: Newbie to PHP

Post 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.
User avatar
angelicodin
Forum Commoner
Posts: 81
Joined: Fri Nov 13, 2009 3:17 am
Location: Oregon, USA

Re: Newbie to PHP

Post 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.
Post Reply