|
-
Dec 7th, 2005, 07:47 AM
#1
Thread Starter
Addicted Member
Newbie Question
Hi Guys
I have a form that posts data to a php script in a seperate file (form.php) I need this form.php to be accesible only by the form that submits data to it and not accessible as a direct link.
I remeber from college there is some code to do what im asking but I just can't remeber.
Thanks in advance for any help guys.
-
Dec 7th, 2005, 10:28 AM
#2
Re: Newbie Question
You can put the file outside the document root and use the include statement to access it from the PHP script. If you want to POSt the data you will need to have public access to it.
-
Dec 7th, 2005, 04:48 PM
#3
PowerPoster
Re: Newbie Question
You can get the page you came from via the headers right?
$_SERVER['HTTP_REFERER'];
But a browser may not always send the page it came from, and users can edit it as well and fake it.
I guess you could always try making some kind of hash as well and validate it in Form.php... depends how important it is.
Last edited by Pc_Madness; Dec 7th, 2005 at 04:51 PM.
Don't Rate my posts.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|