View Full Version : Incrementing a value on click.

07-27-2012, 05:28 AM

I have a website whereby users request their favorite artist's songs on different radio stations.
What i'd like to do with it is: have the users create accounts > login > request > and when they request (submit the form by clicking 'submit'), an update that states "you have requested (#) times" appears or is displayed somewhere on the page.
Then when they return to request again at some other point, the # of times they've request just increments from their previous # of times.

Can anyone point me in the right direction?
Any help is appreciated.
Thank You.

07-27-2012, 09:09 AM
You must have a table in database where you are saving requests made by a user, you can get number of requests from that table for the user and display it.

07-27-2012, 06:43 PM
Can you give me an example of the coding and show how this should be done?

07-30-2012, 01:53 AM

07-30-2012, 01:25 PM
If you want people to be able to register and log-in then you'll need to create, and secure, a database to include usernames, passwords, etc..

MySql is the default database for PHP. You could refer to the stickies in the MySql sub-forum, which will suggest sites and/or books. I recommend the book 'PHP and MySql..' by Larry Ullman.