werushka Posted January 3, 2008 Share Posted January 3, 2008 Hi everyone i have a slightly simple problem but I don't know anything about coding. Here is the code that I want to alter. if ($user->get('gid') < 19) { JError::raiseError( 403, JText::_('ALERTNOTAUTH') ); return; } I instead of giving an error I want it to redirect to a link on the web site in which the link is "index.php?option=com_user&view=login" Can you guys help me please? Link to comment https://forums.phpfreaks.com/topic/84237-red%C4%B1rect-php-code/ Share on other sites More sharing options...
phpQuestioner Posted January 3, 2008 Share Posted January 3, 2008 header("Location: index.php?option=com_user&view=login"); Link to comment https://forums.phpfreaks.com/topic/84237-red%C4%B1rect-php-code/#findComment-428986 Share on other sites More sharing options...
werushka Posted January 3, 2008 Author Share Posted January 3, 2008 I really appreciate your answer.. I have now this code and works perfectly if ($user->get('gid') < 19) { header("Location: index.php?option=com_user&view=login"); return; } can I ask what the " return; " for? Link to comment https://forums.phpfreaks.com/topic/84237-red%C4%B1rect-php-code/#findComment-428990 Share on other sites More sharing options...
awpti Posted January 3, 2008 Share Posted January 3, 2008 Nothing now. you can get rid of it. Link to comment https://forums.phpfreaks.com/topic/84237-red%C4%B1rect-php-code/#findComment-428994 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.