Jump to content

Associating events with scripts


ksmatthews

Recommended Posts

Hi there,

 

Typically in php clicking buttons or other objects usually lead to page re-loads or data submissions followed by re-directs.

 

Apart from using AJAX, is a there a way of associating button clicks with php code without having to re-load the page ? Specifically, I would like to use button clicks with 'exec()' or 'system()' 'to run UNIX commands and / or communicate with server processes which would both return information that could be displayed to the user.

 

regards,

 

Steven M

Link to comment
Share on other sites

Hi Steven -

 

AJAX is the only way to communicate with a server and just refresh the relevant content. PHP is all or none, so it requires an entire script to run its course, then refresh the entire page with the result. You could use a frameset or an iFrame to get closer to what you want (not refreshing an entire page) without using AJAX.

 

PhREEEk

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.