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
https://forums.phpfreaks.com/topic/79947-associating-events-with-scripts/
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

Archived

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

×
×
  • 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.