lisanet Posted May 9, 2012 Posted May 9, 2012 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?
Hairy DJ Posted May 13, 2012 Posted May 13, 2012 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.
lisanet Posted May 15, 2012 Author Posted May 15, 2012 Dear Hairy, Thank you for answering. I will try this now.
liamwc Posted June 17, 2012 Posted June 17, 2012 with the second question, do you mean a specific page will show dependent on the browser? if so have a look herehttp://www.simplesiteguru.com/blog/website-design-tips/creating-browser-specific-html-code/
Hairy DJ Posted June 19, 2012 Posted June 19, 2012 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, SQLitehttp://eclecticdjs.com/mike/tutorials/php/sqlite_01.phpBasically 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now