Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Incrementing a value on click.

    Hi,

    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.

  • #2
    New Coder
    Join Date
    Nov 2007
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you give me an example of the coding and show how this should be done?

  • #4
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Anyone?

  • #5
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    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.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •