I'm not much of a programmer, but I'm working on a guest book for a wedding website for my sister. Right now the form that users fill out to post to the guest book has three fields - "name", "email", and their message. I store all these values in a single text file, which I read from when I display them on the front end of the guest book.
My problem is that I don't display the email addresses, but I want them to be available in the 'Administration Panel' for my sister's convenience.
I use a standard fopen to access the file, to convert the data to HTML. I've found that the fopen doesn't work at all unless 'public' is set to 'read' in my CHMOD (777 for example). But when my data file is CHMOD'd to 777 then anyone with an internet connection can access those files by directing their url to the text file. So my natural thought process (knowing little about CHMODing) was to make the permissions 666, which would give the 'owner' (who I assume is me and my files on my server) access to the data file, but 'public' would be denied access. Sure enough, when I CHMOD to 666, I get my desired "403 forbidden", but then my script can't access the file to read the data. It's as if the file thinks my script is a 'public' script.
I hope that made an tiny bit of sense to someone other than myself. I don't really know what I'm talking about which makes it hard to describe my situation
.
Help is greatly appreciated, so thank you ahead of time!
e
My problem is that I don't display the email addresses, but I want them to be available in the 'Administration Panel' for my sister's convenience.
I use a standard fopen to access the file, to convert the data to HTML. I've found that the fopen doesn't work at all unless 'public' is set to 'read' in my CHMOD (777 for example). But when my data file is CHMOD'd to 777 then anyone with an internet connection can access those files by directing their url to the text file. So my natural thought process (knowing little about CHMODing) was to make the permissions 666, which would give the 'owner' (who I assume is me and my files on my server) access to the data file, but 'public' would be denied access. Sure enough, when I CHMOD to 666, I get my desired "403 forbidden", but then my script can't access the file to read the data. It's as if the file thinks my script is a 'public' script.
I hope that made an tiny bit of sense to someone other than myself. I don't really know what I'm talking about which makes it hard to describe my situation
Help is greatly appreciated, so thank you ahead of time!
e