mickeymouse Posted May 21, 2012 Share Posted May 21, 2012 I have this function code:function myadmin(){location.href=\"HA_AdminChoices.php\";return false;window.open(location.href); return false;} and I have this code to call the function:if ($auth=="a") {myadmin();} But I get this error message:Fatal error: Call to undefined function myadmin() Don't I have the correct way of calling a function? ThanksMickey Link to comment Share on other sites More sharing options...
birbal Posted May 21, 2012 Share Posted May 21, 2012 you are mixing the js function with php. php executes first and served to the browser after that js get executed. myadmin() is not a defined php function so that error is showing Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now