Jump to content

Two Questions


Recommended Posts

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?

Link to comment
Share on other sites

The form will be on a page something like:

 

http://username.heliohost.org/form/use/test/form1.html

 

You can use your file manager to copy the source code but the form's action is a relative link so you need to copy it to the same drectory as the form. The action to the form is process.php. You can edit the HTML of the form that the generator makes.

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...