atl_andy Posted March 28, 2008 Share Posted March 28, 2008 I have an AJAX script that populates a menu based on the choice of another menu selection. The problem I'm having is the value that is returned to the AJAX menu is the value of my user id, or the session variable of the user that is logged in. I would like to get rid of the isset($_GET['Param']) feature, but the function doesn't work without it. Let me know if more explanation or coade is needed. if( isset($_GET['Param']) ) { AJAX dropdown goes here } The AJAX function that I think is interfering is: function ajaxFunction(ID, Param) { var loaderphp = "<?php echo $_SERVER['PHP_SELF'] ?>"; // Particularly this part...can this be eliminated or changed? xmlHttp.onreadystatechange=function() { if(xmlHttp.readyStae==4) { document.getElementByID(ID).innerHTML = xmlHttp.responseText; } } xmlHttp.open("GET", loaderphp+"?Param="+Param,true); xmlHttp.send(null); } Quote Link to comment Share on other sites More sharing options...
atl_andy Posted March 28, 2008 Author Share Posted March 28, 2008 Oddly enough, I changed "<?php echo $_SERVER['PHP_SELF'] ?>"; to: "reload.php"; and it worked. I don't know why exactly. If someone can explain, I would be grateful. reload.php is the same script in it's own file. Quote Link to comment Share on other sites More sharing options...
AP81 Posted April 2, 2008 Share Posted April 2, 2008 should be: <? echo $PHP_SELF; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.