Basic PHP/MySQL Database Script

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply

Kool-Aid or Tang

Poll ended at Sun Jan 31, 2010 1:41 am

Kool-Aid
0
No votes
Tang
0
No votes
Neither
0
No votes
 
Total votes: 0

dgohn
Forum Newbie
Posts: 1
Joined: Tue Jan 26, 2010 1:34 am

Basic PHP/MySQL Database Script

Post by dgohn »

I am developing a new Terms of Service for my site as well as a new Privacy Policy. I want all new users to accept said policies and have a way to track who has accepted the policies. I would like to have some type of single page where each user can visit.... say http://www.mydomain.com/newpolicies and that site simply show a framed page with a scrollable frame with the new Terms of Service & Privacy Policy stated in one long scrollable text box and below that scrollable text box have a input able text box for an e-mail address & another for current username and have a check box for I agree or Disagree and a submit button, then a seperate admin page where I could goto and look or a file on my Unix server (where the page is hosted) that shows what username/email addresses have agreed or disagreed to previously said policies. I imagine this would not be that difficult to do using PHP & MySQL for the databases. I am simply wondering if there is a published free script out there and directions for including the SQL databases into the factor already existing and if someone can point me in that direction. Thanks for all input in advance!
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: Basic PHP/MySQL Database Script

Post by JakeJ »

Assuming that you already have a database for email addresses, it shouldn't be that hard but there are several factors.

1. Connect to the database
2. Create a form with the proper fields
3. Submit the form to another .php page for processing
4. Check the $_POST data against the database
5. Follow up action (whatever is appropriate).

Have you googled for a site registration script? I know there are plenty out there. It's always best to search for things and find what you can and then present a specific problem here when a piece isn't working. You learn a lot more that way. And we do too!
smithdwsn
Forum Newbie
Posts: 3
Joined: Tue Jun 01, 2010 1:53 pm

Re: Basic PHP/MySQL Database Script

Post by smithdwsn »

You can create your firs PHP script with Mysql. You should remember these steps:
1. Create form with proper field name.
2. Connect with Mysql
3. Create another script for submit button
4. Check your script which is running successful.
Post Reply