My login script won't load the redirect url

Hi, I have a basic login script that I’ve previously used successfully (since have changed server) but now it won’t load the destination URL after successful login. Any help that you can give would be greatly appreciated. Thanks - James

The code has been included below…

<?php $product= "The Reality Creations"; // products name that appears in login page $passcode[0] = "516204"; // passcode restrcited to max length 12 charactors $redirect_page[0] = "http://www.realitycreations.com/private/test.html"; // redirect url on successful login $passcode[1] = "924537"; $redirect_page[1] = "http://www.realitycreations.com/zxytg"; //description //Add as many passcodes and redirect links using above format //***************************************************************************************** // DO NOT MAKE CHANGE BELOW THIS LINE //***************************************************************************************** $i = 0; foreach ($passcode as $v) { if ( !strcmp($_POST['pass'] , $v) ) { include($redirect_page[$i]); exit; header("Location: ".$redirect_page); } $i++; } ?> Restricted Login Access- RealityCreations.com





Welcome to <?php print $product; ?> Private Access Area

Please enter your passcode and click the login button

              


Enter passcode:


	 <?php
         if (isset($_POST[pass]) ) { print "<div align=\"center\" class=\"err\">The passcode that you entered has either expired, or is incorrect, <br> please check and try again</div>"; };
     ?>
	
  </td>
</tr>

Please note, this is a restricted area for existing customers only
If you experience any difficulty you can email us for
assistance at [email protected]

Add to the top:

[php]error_reporting(-1);
ini_set(‘display_errors’, ‘1’);[/php]

Thanks, I’ve added that and the following error message is displayed after login…


Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /homepages/13/d457956169/htdocs/private/login.php on line 23

Warning: include(http://www.realitycreations.com/private/test.html): failed to open stream: no suitable wrapper could be found in /homepages/13/d457956169/htdocs/private/login.php on line 23

Warning: include(): Failed opening ‘http://www.realitycreations.com/private/test.html’ for inclusion (include_path=’.:/usr/lib/php6’) in /homepages/13/d457956169/htdocs/private/login.php on line 23


What is a ‘wrapper’? What can I do to make the login script work?

Thanks,
James

I really don’t know what it’s supposed to do, but you might try this:

Change:
[php] if ( !strcmp($_POST[‘pass’] , $v) ) {
include($redirect_page[$i]);
exit;
header("Location: ".$redirect_page);
}[/php]
To:
[php] if ( !strcmp($_POST[‘pass’] , $v) ) {
header("Location: ".$redirect_page[$i]);
exit;
}[/php]

Thank you very much! It now works :smiley:
Best regards,
James

Sponsor our Newsletter | Privacy Policy | Terms of Service