Jump to content

Recommended Posts

Posted

I have two questions:

 

1. After I use the php form generator, do I need to move the php file to somewhere else? Which one do I move and where do I move it to? If the html form is already made do I need to change it at all to match the php form? Do I have to use the one that the generator makes? Can I just make a page to the same details and upload it?

 

2. I want my visitors' browsers to bring up its own set of pages so that the site shows correctly. Do I write to the htaccess file for this? What do I write to it?

  • 1 month later...
Posted

No because most people use either IE of Firefox so making it browser specific just divides most people into two groups. I can think of two solutions off the top of my head.

 

 

1) Make passwords for each user, use the form to check for a match from a list of passwords and if it finds a match, store the password in a session cookie (or regular cookie) and redirect the user to his page. His page checks the cookie and if it doesn't match sends the viewer to a login page.

DJ Mike's Tutorials: PHP; Cookies Pt.1. This works best if you don't have a lot of users.

http://eclecticdjs.com/mike/tutorials/php/cookies_01.php.

 

2) If you have a lot of users you probably want to use a database but if you have never done a database project you will have more to learn. If that is the case I recommend that you start with SQLite instead of my SQL.

DJ Mike's Tutorials: PHP, SQLite

http://eclecticdjs.com/mike/tutorials/php/sqlite_01.php

Basically you start out like in the first solution but then you have just one (or maybe a few more) pages that show different content depending on the user. That page is a template that will show some things to everyone, like headers and footers but will pull different data out of the DB depending on the viewer. As an example, think of your email. Most of the pages look the same to everyone but to list the email it checks the DB to get the email for a particular person.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...