Ok, well basically I have a page with some variables which i want to send to a different page without using $_GET.. How the heck do i do this? Thanks in advance.
Okay - I'm making some assumptions in answering your post. I'm guessing you mean you don't want a form post back.. you want an automated AJAX callback. To accomplish this, you could code it in pure javascript, or use a framework. In the example below, I use jquery to accomplish it. One caveat you might not be aware of: Post callbacks can only be used on the same domain as the server sending the base page, so this won't work for submitting forms to other websites without the user's permission. <script> $(document).ready(function() { $.post("test.php", { var1: 'welcome', var2: 'home'}); }); </script>
PHP is all server-side. There's nothing client-side about it. The AJAX portion is the client-side code which loads another file which can execute the PHP that's inside the file it calls. So basically, these two things are similar: User input (clicking a link, submitting a form, etc) -> Loads a page -> PHP is executed in the page loaded -> Output is sent to user AJAX through JavaScript -> Loads a page in the background -> PHP is executed on the page loaded -> Output is returned to the AJAX caller Either way, you'll still have the PHP executed. I recommend using jQuery as the previous poster mentioned. Awesome framework. http://www.jquery.com/
Maybe he's looking more a server-side script to send POST data to another script? If so, it would pay you to look into 'curl'...
I'd do that if needing to transport variables across multiple form pages but I think he was looking for the solution sessions bring, so it doesn't require user interaction (that's how I picked it up anyway)