Includes

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
gfirman
Forum Commoner
Posts: 30
Joined: Tue Nov 21, 2006 10:41 am

Includes

Post by gfirman »

Hi,

I am trying to execute a block of code which is the same in many different pages.

This is a simplified example of what i am doing........

I want to buy a flash drive so I have a page for that.
Then I have another page, when the BUY button is clicked, it shows cost and quantity bought etc.

So I want to update the money for the users account.

Would it be possible to have this code in an include and pass the cost to the include (block of code) to update the money?


Any suggestions would be helpful........thanks!
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

We encourage our users to try things for themselves before asking questions. It is only curteous that you try and resolve issues on your own first before asking someone else to put the time in to solve your concern.

Since I'm already typing.. yes it's possible.
gfirman
Forum Commoner
Posts: 30
Joined: Tue Nov 21, 2006 10:41 am

Post by gfirman »

Thanks for that
Post Reply