Jump to content

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

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...