Ok, now that I understand how your file is set up, I can offer some advice:

Your file relies on line endings and blank lines to seperate data. By looking for them and taking everything from the previous EOL+1 (end of line) to the current EOL you've got your item. (This is a string-centric view.)

Reading in a file makes this process easy. As you read each line, you'll have your items, or an EOL character. You can then do as you wish with the item (you may need to chop() it first) such as compare it to a list of items appropriate to the slot you're reading, or simply adding it to the appropriate place in the database. If it's an EOL, don't worry. The database accepts NULL values (unless someone used the NOT NULL option.)

Why don't you try it and see if you can do it now?


Take a moment and look at what will always be the same in your file.

  1. Are the "fittings" from a standard set?
  2. Is each blank line guaranteed to be there?
    2a. What about line endings? (Does an EOL mean end of item slot?)
  3. Can "fittings" go in a different place on your "vessel" or are they one position only?
    3a. If they can go multiple places, does the order of the list matter?

First, do not disable my back button. It's 2nd on my list of most hated website activities. (1st is opening new browser windows.)

Ok, now to try to understand what you're trying to do: If you want to prevent a user who logged out from seeing the information on a previous user's welcome.php page, your best bet is to tell the browser the page is out of date and needs refreshed. That way, the browser won't load the page from cache and instead load the page from the server.

I think using a "META" tag with the option "expires" (Search for "META expires" and see what comes up) is the way to go here.


Cookies are bits of information that will remain accessible to the browser across many openings and closings of the browser. For example, the "Remember me" functions of websites use sessions. Sessions, OTOH, are only remembered while the browser is opened. If the browser is closed, the session ID will be different and the user will have to do things like log in again.

For the record, Mozilla lets me delete the session ID when I want to. It's just another cookie in Mozilla's point of view.


What you'd have to do is make sure the patterns exist for each input file (they don't have to be strict patterns, just a standard format) and then parse your files off of that. If you don't have any patterns to match, you've got a situation where you're trying to do human-level comprehension. That's way beyond the average PHP program.


I'm working on a database install/configuration page where the page asks the user for the database credentials, his software credentials, and a few other options and then proceeds to attempt to create and/or populate the database. There are four main sections: Data entry, database table creation, database population (for certain defaults), and configuration file writing.

My question is what would be the best way to proceed from section to section? If one section fails, should the install script detect the failure and then proceed from the beginning of that part, or if the install fails, should the script remove what was done and start from scratch? Should it do a combination of the above?


Are you fluent in C++? If so, you can learn PHP by following examples in code. The base structure is the same, you just go about putting dollar signs in front of your variables. (Ok, this is a very simple point of view.) I started with PHP using my limited HTML knowledge and form processing demo code.

In any case, php.net will probably be your best friend. PHP has EXCELLENT documentation, so it's worth checking there first. They'll even tell you some of the common security issues.


"Read only" is a file access issue, not a PHP issue. If your web server is set up correctly, only authorized users should be able to change your page anyway, so read-only will only keep you from doing so.

Most service providers have a way to set permissions on files. A common issue with Perl scripts, for example, is improper permissions, so service providers have to let you change them. (PHP usually doesn't have this problem.)


You can do this a couple different ways, both of which that come to mind involve using forms.

You can either have a check box that says "I agree" and a "continue" button (this is the usual method, probably the best way) or you can have two buttons: I agree, I disagree.

Either way, you have to use PHP to process the form and determine whether or not the user agreed.


AFAIK, php.ini does not have a "show graphics" or "show images" option. (A quick search for "graphics" or "images" returns nothing related unless you're doing dynamic images.) Whether or not graphics and images are shown depends on several things:

  1. Browser setting
  2. Validity of the graphic file (is it corrupted? Did you FTP it in the right mode?)
  3. HTML source (are you using <img= tags?)

Ok, we'll switch to software troubleshooting:
Is MySQL running and in memory? It should show up on Window's Processes list.

If not, perhaps something's preventing it from starting. Try launching it from a command prompt (not the run box, we want a chance to catch messages.)

Are you running other software that could interfere? MySQL probably wants to be on a specific port, and another program could be using it. What about Window's Firewall?

PHP does know about MySQL, right? The line extension=mysql.dll is uncommented in php.ini (for version 5)?


MSN is supposed to allow you to do something like this. If a site supports the "Microsoft Network" universal login, you should be able to log in using your MSN (hotmail) account.

If you can't tie this to one programming language (or environment), perhaps you can tie your various programs into a single database. Your programs would then be able to store the information how they like, and you'd have a single point of log in.