Current location: Hot Scripts Forums » Programming Languages » PHP » Apache .htaccess login php script - won't work in IE


Apache .htaccess login php script - won't work in IE

Reply
  #1 (permalink)  
Old 04-04-11, 04:43 PM
aebx aebx is offline
New Member
 
Join Date: Apr 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Apache .htaccess login php script - won't work in IE

This is for an Apache directory login.
This code takes the username and password from a login page and inserts them into the URL.
The code works for Firefox and Chrome but when I try IE, I get a message saying IE cannot display the webpage.

PHP Code:

<?php 

error_reporting
(0); 

$username $_POST['username']; 
$password $_POST['password']; 

//Do not include https:// in the url. 
$url "/Members/testresults_frameset.php?".$username

if(
$username && $password) { 
       
header('Location: https://'.$username.':'.$password.'@'.$url); 
}else{ 
       echo 
"Please provide a username and password. <a href=\"javascript:history.go(-1)\">Go back</a>."

?>
Any ideas?

I've been directed to this site PHP htpasswd HTTP Authentication, but the code does not seem to AUTHENTICATE the user.
Reply With Quote
Reply

Bookmarks

Tags
.htaccess, apache, login, meta-http


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom php script needed alley Job Offers & Assistance 5 06-30-10 02:14 AM
PHP header login validation script ben_johnson1991 PHP 3 12-29-09 09:13 AM
professional member login part script javadvjj PHP 1 12-03-09 06:23 AM
Raffle/Lottery Script (Very profitable!), Coded it myself. Voltaire General Advertisements 2 01-02-06 11:55 PM
PHP Login Script help Jlowe PHP 7 05-03-05 01:27 AM


All times are GMT -5. The time now is 08:47 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.