sirsid Posted June 27 Share Posted June 27 (edited) Hello, New here, I have an <a> & I would like to send data into my MySQL Database from a .php page , it's a forum type thing , favourite link :~/ What is the Best way to do this ? Can anyone help please ? I should add I do Not wont to Post a Form ! Thank-You Sid Edited June 27 by sirsid Quote Link to comment https://forums.phpfreaks.com/topic/329080-not-sure-data-from-an-tag-into-database-~/ Share on other sites More sharing options...
Solution Olumide Posted June 27 Solution Share Posted June 27 10 minutes ago, sirsid said: Hello, New here, I have an <a> & I would like to send data into my MySQL Database from a .php page , it's a forum type thing , favourite link :~/ What is the Best way to do this ? Can anyone help please ? I should add I do Not wont to Post a Form ! Thank-You Sid AJAX (Asynchronous JavaScript and XML) lets you send data to a PHP script in the background, without the page reloading. This is what happens on sites like Twitter when you click "Like" or on Gmail when you archive an email. Also, you need to create the PHP script that will reads the data and sends back a JSON response for the JavaScript to read. Quote Link to comment https://forums.phpfreaks.com/topic/329080-not-sure-data-from-an-tag-into-database-~/#findComment-1655538 Share on other sites More sharing options...
sirsid Posted June 27 Author Share Posted June 27 Thank-You I shall look into that :~) Sid Spoiler Quote Link to comment https://forums.phpfreaks.com/topic/329080-not-sure-data-from-an-tag-into-database-~/#findComment-1655539 Share on other sites More sharing options...
sirsid Posted June 28 Author Share Posted June 28 Hello, I looked into AJAX. I got a query lookup to work. But I Cannot seem to get an INSERT to work using this type of connection mysqli_connect() it does not seem to have a ->save() Does anyone think it is Just the INSERT that is the problem ? or is it the connect t type ? Can anyone help please ? Thank-You. Sid Quote Link to comment https://forums.phpfreaks.com/topic/329080-not-sure-data-from-an-tag-into-database-~/#findComment-1655553 Share on other sites More sharing options...
sirsid Posted June 28 Author Share Posted June 28 Hello, I got it to Work ! Thank-You Olumide :~) Sid Quote Link to comment https://forums.phpfreaks.com/topic/329080-not-sure-data-from-an-tag-into-database-~/#findComment-1655555 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.