Current location: Hot Scripts Forums » Programming Languages » PHP » Need help with password protect script


Need help with password protect script

Reply
  #1 (permalink)  
Old 03-31-05, 10:30 PM
Martiart Martiart is offline
New Member
 
Join Date: Mar 2005
Location: Camarillo, CA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Need help with password protect script

I'm not a programmer. I downloaded a PHP script to password protect certain pages on my site. When the username and password are validated, another PHP scrip is called. Can I change this call to an HTML file? Here's the line of code in the script I'm using:
$success_page = "1.php";
I tried changing this to an .htm file but it didn't work.
Reply With Quote
  #2 (permalink)  
Old 04-01-05, 12:42 AM
filth filth is offline
Newbie Coder
 
Join Date: Mar 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
you could simply rename the htm file with a php extension
Reply With Quote
  #3 (permalink)  
Old 04-01-05, 12:00 PM
Martiart Martiart is offline
New Member
 
Join Date: Mar 2005
Location: Camarillo, CA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Need help with password protect script

Thanks. I tried renaming the file with a php extension and the file I want is displayed, however, all of the HTML functions (images, links, etc.) are lost. Is there a way to call an HTML file from PHP or do I need to put something in the HTML file to make it run like an HTML file?
Please could someone help. I'm being bombarded with e-mails from site users wondering why the secure area of the site is not working. I just switched my site host. The former host supported .htaccess so I was all set up with passwords for our membership. The new host will only support PHP scripts for protecting pages.
Reply With Quote
  #4 (permalink)  
Old 04-01-05, 12:28 PM
creepycridler's Avatar
creepycridler creepycridler is offline
Wannabe Coder
 
Join Date: Feb 2005
Location: Seatac, WA
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
leave your file a .php and seperate all the html out of it. Create a html file with all the stuff you removed. then in your .php file use:

PHP Code:

<?php include("your html.html"); ?>

If I understand your problem right, this should work
Reply With Quote
  #5 (permalink)  
Old 04-01-05, 07:03 PM
Martiart Martiart is offline
New Member
 
Join Date: Mar 2005
Location: Camarillo, CA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Tried it and it still doesn't work. It will display the HTML file, but all you see is the text in that file. No images and no links. Any other help?
Reply With Quote
  #6 (permalink)  
Old 04-03-05, 09:12 AM
Martiart Martiart is offline
New Member
 
Join Date: Mar 2005
Location: Camarillo, CA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Problem solved. Thanks for the help.
Reply With Quote
Reply

Bookmarks


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
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 10:17 AM
password protect individual records mwasi Script Requests 0 03-21-05 05:35 AM
Need To Password Protect a Page For Multi-Users cebuy PHP 8 09-09-04 07:57 AM
way to password protect jasong PHP 4 03-08-04 10:34 PM


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