Hi all,
I would like to know if it's possible to update a MySQL table by calling a PHP page without moving from the current page
For example, their are download scripts which you can call such as download.php?file=filename and the current page won't change but the file will pop up to save
I would like to implement something like this but for adding current contacts to mailing lists
Example: Call addtolist.php and send in contact id and mail list id then it gets added without any changes to current page
Is it possible to do something like this?
Thanks in advance
Update MySQL without changing pages
Moderator: General Moderators
Re: Update MySQL without changing pages
Yes it's 100% possible if you use AJAX and php.
Re: Update MySQL without changing pages
OK thanks, just making sure i'm not gonna hit a dead end
I've never used Ajax so I guess i'll have to get learning!
I've never used Ajax so I guess i'll have to get learning!
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Update MySQL without changing pages
Assuming I understand correctly, if you give download.php the correct headers, you won't leave the page. Just link to it and the file will download.