Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 18th, 2005, 04:26 AM
Authorized User
 
Join Date: Jan 2005
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default Preventing access to a page in PHP

I am using the phpBB bulleting board, but wish to prevent users from registering themselves (as I will do this on their behalf). I therefore want to have access to the registration page myself, but stop anyone else accessing it.

At the moment, there is nothing to stop someone entering the direct URL of the registration page. I want to add some code to that page that prevents it being served unless the person is authorised to see it.

I work in ASP and am new to PHP. I propose writing a login page containing a password field. If logged in, the registration page can be accessed, otherwise it can't. I know how to do this in ASP, but not in PHP.

Please can you give me some PHP code that will achieve this?

Thanks.

Steve

 
Old July 22nd, 2005, 01:18 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default


Why don't you wanna register themselves?
Forums are for members!

You may simply edit the desired template of the themes directory, to remove 'register' link or

put simple PHP if($user='admin') line there.

http://www.mediasworks.com/tutorial/






Similar Threads
Thread Thread Starter Forum Replies Last Post
Preventing page refresh from asp.net button hericles ASP.NET 1.0 and 1.1 Professional 2 October 8th, 2008 04:29 PM
passing value from Php to PHP page baby PHP How-To 3 March 31st, 2005 02:13 AM
Preventing tab controls from changing page badgolfer VS.NET 2002/2003 2 December 17th, 2003 05:35 AM
Preventing Page Caching neeter HTML Code Clinic 3 June 5th, 2003 01:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.