is it possible to pass jquery variable to PHP variable without using POST, GET, and or Ajax on the same page?? and this diplay the value??.. without reloading the page!
Asked
Active
Viewed 163 times
0
-
You can't pass a variable to PHP without running some sort of PHP parser on a page (which could be through Ajax, but you said you didn't want that) - but jQuery can display the variable on the page for you. Post some details of what you need should you want any help with that. – worldofjr Sep 17 '14 at 02:04
-
If "without reloading the page" is your concern, yes you can ajax but I don't why you wouldn't do that though. – Rey Libutan Sep 17 '14 at 02:14
-
This page shows how to pass a variable to a server-side php file. http://stackoverflow.com/questions/8191124/send-javascript-variable-to-php-variable – TimSPQR Sep 17 '14 at 02:55
-
@Kuma, im not using it because it keep slowing my page to load all the data return by PHP json_encode , if i use $.ajax. and the possible way i think is that concept i ask. but i think its impossible to do. because if using PHP to fetch data its more faster fetching data than jquery ajax. – blinddevil Sep 18 '14 at 01:06
-
@TimSPQR, i already done that. but im not satisfy of $.ajax sending data to PHP then process by PHP then return some value, and then jquery assign each value to html attr. i dont feel it that way. – blinddevil Sep 18 '14 at 01:10
-
Is there a way that you could make the dataset smaller in the PHP file to have it process faster, and pass less data to the client? – TimSPQR Sep 18 '14 at 01:47
-
@TimSPQR, thank to your fast response but all inputed value are required and around 40+ input box. hahaha. for now i will stick to ajax. – blinddevil Sep 18 '14 at 02:04