Jump to content

Archived

This topic is now archived and is closed to further replies.

webdogjcn

Mimic Javascripts onclick

Recommended Posts

I want a user to simply click a button and it will modify a value within a database. So I though of this:
[code]<a href='' onclick="<?php etc. ?>"><img src='' border=0></a>[/code]

Now, I understand that PHP is server side and Javascript is client side, but is there someway to mimic this function with PHP or pass the information from client side to a server side php script? I know it can be done because I've seen similar things on other websites.

Share this post


Link to post
Share on other sites
if you don't mind the page to be reloaded, then you can just create a url with the appropriate query string and then redirects back to the same page. if you don't like the page to reload, you can try AJAX, or open a new window that does this and then closes itself when done.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.