passing data in javascript innerhtml to database -


document.getelementbyid("message").innerhtml = 'choice 1: type="text" name="choice" value="">

does knows how pass name="choice" database?

i got undefined index choice error.

you asking huge question there try , help, workflow might be:

1. post data using ajax serverside handler 2. process , validate/sanitise data , pass database 3. once done return confirmation (or error) message tot frontend 4. handle ajax response , feedback user 

here information ajax, here's php manual docs on pdo , mysql database functions , here docs jquery might make ajax process big easyer

give resources read, have go @ implementing functionality need , if stuck post smaller, recreatable problems code have written


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -