So you want random numbers with negative values... How do you get them? This is a simple method to do so.

This is an Ada package that simply waits for the user to press the enter key. (If they enter anything else it's simply ignored.)

The first of a few examples I'd like to contribute.

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?

You can build your absolute URL from PHP-supplied functions. Take a look at PHP.net's header page, under "Notes" and above the comments.

[url]http://www.php.net/header[/url]

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.

You ARE changing those values to the proper ones, right? For example, to use the username "daniweb" and password "isthecurrentsite" and connect to the server [url]www.example.com[/url], your connection string would be:
mssql_connect('localhost', 'daniweb', 'isthecurrentsite');

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.

How are you uploading the files?

If by FTP, you'll have to do the searching yourself. I still use WS_FTP, but most GUI FTP programs can be set to upload one file after another without your intervention. (Most text ones confirm every file.)

The way you've done it looks ok. My psychic debugging skills, however, are telling me it's something more...

You do know that variables in the URL are GET variables and not POST?

You can do it on IIS. It was my first foray into home PHP programming.

Where does IIS expect your files to be? How are you accessing the server on the front end? (Hint: If using a hostname, use the IP address instead. Sometimes hostnames don't propagate to other machines nicely.)

"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'll need to update to the latest version of PHP first. You'll then want to run an upgrade all command (pear upgrade-all) to try to get the all the latest packages.

PHPUnit's a pain to install because it requires so much stuff be up to date.

Have you considered Simpletest? It's much more compatible.

commented: yep! +3

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.

Do you have the latest version of Pear? If not, update to the latest and see if that helps on installing phpunit.

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?)

That's how it's supposed to work.

When you call the page with index.php, the &p= part is NULL. The null (or unset) case is not handled in your if statement, so it's branching to else.

What is your error message?

My psychic debugging skills are weak, but I'm getting a feeling you need to run mysql_query() before mysql_fetch_array().

You don't want "register globals" on. It's behavior can lead to security issues, as describe in the linked article.

[url]http://www.php.net/register_globals[/url]

Your code should be fixed instead, which we'll be happy to help with.

It's very possible that you had version conflicts. They don't always play nice together.

I had a problem with MySQL stopping after it started a week ago that I fixed by rebooting. Maybe it's just something in the air.

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 was supposed to be an example of such an idea. The idea never really caught on, mainly because the single login exposed too much.

A thought just occured to me... You can transfer cookies. They're just text files, after all.

What's your connection string? (Be sure to replace the password with something like 'PASSWORD' if you don't want it shared.)

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.

Please start a new thread to ask a different question. If you find one similar to what your problem is, you can link to it.

October 2006 was a long time ago, I had forgotten all about errorcodes and such from "print."

Take a look at the mysql_fetch* functions and mysql_result. I've got a feeling that mysql_result will do what you want.

(You can simply type "MySQL" in php.net's search box to bring up a page that lists most the MySQL functions.)