The only possible way to do this with PHP and Javascript is to have the javascript to refresh the page, best way is with a hidden form, than have PHP detect the form submition and than execute the script to add info to the database.
Ajax as mentioned before is another option.
PHP is a server side script and is processed by the server, the client browser never sees the PHP. Javascript is processed by the client browser. Therefor javascript cannot call PHP functions.
Reputation Points: 8
Solved Threads: 2
Junior Poster in Training
Offline 57 posts
since Sep 2006