Welcome! Log In Create A New Profile

Advanced

Topic 2C

Posted by allenvd 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Topic 2C
July 19, 2006 10:10PM
Topic Completed.
Re: Topic 2C
July 25, 2006 07:26PM
smiling bouncing smiley Topic completed
Re: Topic 2C
August 06, 2006 10:10PM
Topic completed. (Partly thanks to last semester's forum, though it does include a lot of junk messages.) What page(s) are we supposed to read in the PHP5 book - is it really p707 as it says in the Due Dates section...?
avatar
Mac
Re: Topic 2C
August 11, 2006 09:47AM
Yes, p707 in the handbook is the chapter on PHP functions. SOme functions you create yourself - others have been created and is part of PHP and you can just use it, for example the strlen() function is used to find out how many characters a variable have, for example.
cwd
Re: Topic 2C
August 13, 2006 04:49PM
Topic 2C completed
lad
Re: Topic 2C
August 14, 2006 07:05AM
Topic 2C completed
Re: Topic 2C
August 16, 2006 04:40PM
Topic 2C completed.
Re: Topic 2C
September 05, 2006 10:58AM
Completed.
Anonymous User
Re: Topic 2C
September 05, 2006 08:18PM
Topic comleted!



J.A Smit

student number: 7130-387-1
Re: Topic 2C
September 06, 2006 03:01PM
complete

But, i can't get $cost to print, even if i put in a global variable.

Code>>

<html>
<head><title>Calculating the purchase price</title></head>
<body>

<?php

$price = $_POST['price'];
$items = $_POST['items'];

function total ($price,$items)
{
global $cost;
$cost = $price * $items;
return $cost;


}
echo "the total price of your purchase is $cost";
echo ".";

?>
Sorry, only registered users may post in this forum.

Click here to login