sogorman Posted February 24, 2011 Share Posted February 24, 2011 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! Link to comment https://forums.phpfreaks.com/topic/228700-write-to-table-when-user-submits-existing-get-form/ Share on other sites More sharing options...
Skylight_lady Posted February 24, 2011 Share Posted February 24, 2011 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. Link to comment https://forums.phpfreaks.com/topic/228700-write-to-table-when-user-submits-existing-get-form/#findComment-1179090 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.