/    Sign up×
Community /Pin to ProfileBookmark

Radio buttons, php and updating mysql

I am very much a learner, but I have successfully developed in php an online quiz which uses radio buttons for input, after which the user clicks a submit button, and the result is passed through to the next page. So I at least understand that much.

But now I wish to obtain feedback (on other pages), similar to where Google Help has a simple feedback form at the bottom of each page – “Was this page helpful Yes/No” – with no Submit button, and with a thank you message generated. The differences from the other case are (1) there is no submit button, and (2) I want to update my mysql database (which shouldn’t be a problem). I want to do it without the submit button if I can because it is simpler and I think more people will give the feedback if it is one click.

I think Google uses Javascript or Ajax, which I am not familiar with (though if I have to, I’ll learn), but I’m wondering first if I can do it with php.

I have searched online, and I cannot get the help I need. Is someone able to help me with these questions please:

  • 1.

    Can I submit the data to mysql as soon as a button is clicked? If so, how?

  • 2.

    Would I be much better learning and using Ajax?

  • Thanks

    to post a comment
    PHP

    0Be the first to comment 😎

    ×

    Success!

    Help @ercatli spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.19,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...