Page 1 of 1
make a page unaccessable until credit card validation?
Posted: Thu Jun 13, 2002 6:53 pm
by chris12295
Ok, i have a site for people to place ads online. I want them to be able to put their ad in my database but not until they pay. How can I prevent them from accessing a script to insert their information until their payment has been validated? I dont have a script started so, any suggestions would work.
Posted: Thu Jun 13, 2002 8:48 pm
by Jim
Well, you could always do it manually.
I can't think of any way PHP will be able to tell if the Cred Card is verified unless you tell it so. So when you see the cred is improved, just slip the banner into rotation!

Posted: Thu Jun 13, 2002 10:49 pm
by chris12295
I dont need a credit validation or banner rotation script, i just need to prevent the script from being accessed unless a user has paid bascially. I think it might have somthing to do with file locking or chmod but im not sure. CAN ANYBODY HELP ME????

Posted: Fri Jun 14, 2002 1:41 am
by twigletmac
I think what Jim meant was accept their information but flag it until the payment has been authorised. If the payment isn't authorised or they don't pay within a specified time period you delete their info. If their credit card goes through fine you unflag the info and the banner goes live.
Or you could have it so you need a username and password to login to an admin area where ad details can be added and the username and password are sent out when their card is validated.
Mac
Posted: Fri Jun 14, 2002 10:16 am
by chris12295
the second part is more what i need, but how can i set up a login or admin area so people cant access the pages until they have logged in?
Posted: Fri Jun 14, 2002 12:32 pm
by twigletmac
Basically you need to have a database or flat file with usernames and passwords stored in it. Then you have a login screen like you do for things like this forum, which requests that data. You then compare the users info with info in the database and if you get a match the person is then allowed into the secure area. The script to test for logged in status is included at the top of each page that needs to be secure.
A fully coded example of a login script using a database is available here:
http://www.evolt.org/article/Creating_a ... index.html
Mac