wongadob Posted February 24, 2012 Share Posted February 24, 2012 Hi, I have come across a bit of a snag, I need to be able to send some data to a PHP file without the use of a form, or with a form that has hidden values and autosubmits (dont mind which, bottom line is I need some data sending to a PHP file without user input. I have a master display PHP file that displays a huge table of data. I also have a menu of filter or sort by options. For most of the items in the menu, they have to call an intermediary form so that the user can select a value to filter by. However one of the items on the meny needs no user input as it is a simple - Filter by items that are open (for example) So there is no form required. I already know the data to filter by. Any ideas how I can achieve that. On the next it suggests using sockets, but that to me seems a bit of a hack, and I am sure PHP must be able to 'POST' values to another PHP file in a cleaner way? Any help much appreciated Wongadob Link to comment Share on other sites More sharing options...
birbal Posted February 24, 2012 Share Posted February 24, 2012 It sounds like you are going to need to use curl Link to comment Share on other sites More sharing options...
thescientist Posted February 24, 2012 Share Posted February 24, 2012 can't you use AJAX? You can define any event you want to send anything you want, without user interaction. It seems like it would just be easier for the master PHP file to configure itself based on what POST values are passed into it. If there are no POST values of significance passed into it, then load the default view, else filter the view. Link to comment Share on other sites More sharing options...
wongadob Posted February 24, 2012 Author Share Posted February 24, 2012 I guess I could pass the data via session variables, but just thought there may be a secret way I was un aware of. Link to comment Share on other sites More sharing options...
wongadob Posted February 27, 2012 Author Share Posted February 27, 2012 I found a really good solution to this here:- http://stackoverflow.com/questions/1149454/non-ajax-get-post-using-jquery-plugin?answertab=oldest#tab-top Hope it is OK to post a link to another forum site, but this solution seems to work very well. It is an Ajax solution. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.