Hello
I am having problems with PHP coding. What I want to be able to do is to make a button on a webpage, and when that button is clicked I want a script to run inside the page (not using pop-ups or reloading the page or load another page etc.) so I can write information to a file (there are many buttons on the page, each to write different things to the file).
I expect that to be possible in some way or another, but I can't seem to find out how to do it :bemused: . Any help is more than appreciated!
Run php script without reloading the page
PHP runs on the server, not the client. what you are asking for is something to happen puely client-side. for this you must use client-side code (javascript).
Search google for "ajax". The Sajax library is quite good. Basically you will do an "onmouseover" javascript function that will POST to a file. On this file you write PHP code that will take arguments from the Javascript function and write them to your file.
Thank you soooo much
This ajax is great, works lika a charm!