Jump to content

Write to table when user submits existing GET form


sogorman

Recommended Posts

I have an existing GET form that I use and want to write to a MYSQL table everytime a user uses that form.

<FORM ACTION="https://someurl.com" METHOD=GET>

Would the easiest to be a javascript function that uses the onclick event?

 

What would be the best way to continue to pass the user along while capturing data and writing that to a MYSQL table.

 

Thanks!

 

 

Sounds like you haven't done this before.

 

Does your user have to login? If so, when user log's in, you should be able to get their username or id from the database.

 

If not and using method="get", then you can use :

$one_value = $_GET ['one_value'];
echo $one_value;

on your next page to collect that information for the one_value name/id in your input box.

 

To add this to the db you will need to use either and INSERT query to add a new row to the db or an UPDATE query to update an original row in the db.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.