View Single Post
  #2 (permalink)  
Old 10-04-2008, 10:03
DavidAllen's Avatar
DavidAllen DavidAllen is offline
Premium Member
 
Join Date: Jan 2007
Location: Amersham
Posts: 330
Send a message via MSN to DavidAllen Send a message via Skype™ to DavidAllen
Default

Hi Karl
Firstly you might want to edit your post to hide the database logon details (and change them on the database) otherwise you will find that some unscrupulous type will hack your database.
Secondly you don't need all those 'stripslashes' - that is for recieving user input not output from the database.
Thirdly to answer your question - you just need to use some sql like:
PHP Code:
$sql 'select * from drinks where id = '.$drinkid
make the call to the database - get the price of that drink and multiply by $drinkprice.
__________________
David Allen - www.serina.co.uk
Reply With Quote