Jump to content
Sign in to follow this  
mickeymouse

Calling a Function

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×