Database help needed... 02:17 12 Dec 2004

I know absolutely nothing about databases, I'll make that plain from the start.

What I need to do, when a visitor enters an item code into a text field on a form, is return the item details to the web page.

I thought about doing it with php (if $code='blah' then echo 'blah blah details'), but with sixty items, this would mean sixty lines of 'if' commands for the code to search through.

Is there a simple way to use a db? My host provides a web database, and mySQL, could I use one of these for the php to dig out the details using the $code?

I've had a look at a couple of tutorials on mySQL, but my brain can't take it in.

  BBez 10:38 12 Dec 2004

maybe you should consider a "Content Management System"...

i used E-107 click here which will let you build the site locally then uplaod to your hosting provider...

auto creates your SQL dB and has easy to use Admin panel with dB backup...

You have to do a bit of Server configuration but if you view the included "read-me" file with the installer, you'll be fine...

maybe someone else can offer you a "shopping cart" CMS if it's items you're selling on the site... 11:01 12 Dec 2004

are already up, and have shopping carts. I just want to save them time and error, so that when they enter a four letter code, the page returns the item description and price.

Thanks for the response, Whiz...

  Taran 23:44 12 Dec 2004

What about using listbox selection ?

Your customers could select from a listbox (or more than one) and all related data toi the selection is called from the database to populate the page/table/whatever.

The secret here is in populating the drop down listbox dynamically - that is, the listed options are 'read' from the database to begin with and selecting one form the list calls all other related text and image information from the database and displays it.

Not knowing your site and the nature of things, I can't say whether this would be suitable but it certainly kicks the tar out of playing with a huge if statement.

If I'm on the right tracks as a concept post again for more specific code examples.

T 00:27 13 Dec 2004

a list box, but 61 items on it?

The stuff on the site I am working on is so expensive, it's pointless having a shopping cart. No one is going to lay out this amount by credit card on the net.

I need them to enter a four digit code, then return the price and descriptions of the items ordered, with a total price for all purchases.

I've not started the order form yet, until I get an idea of the best method, and I have to wait for the prices to be forwarded to me anyway, but here's the site so far (not complete yet) if it gives you a better idea of what I'm after.

Cheers, Whiz... 00:28 13 Dec 2004
  Taran 00:58 13 Dec 2004

What about dividing your content listboxes by category ?

Selecting sideboards will dynamically populate the subsequent listox with only those codes pertaining to sideboards. Selecting tables removes all other options apart from those codes to do with tables.

Filtering by multiple dynamic listboxes is a pretty effeicient way of making huge amounts of content practical to manage without going nuts in the process.

Imagine this:

Select funiture type > select option A > select option B > displays all details of the three selections.

A nice touch is to include your selections or the results they led to in your contact form and this is also relatively straight forward to do.

I'm not saying that this is a be-all and end-all, but it works well and is not really rocket science to set up, provided you have a basic handle on certain principles.

T 01:10 13 Dec 2004

little ponder about it. I have to wait for the prices anyway. I personally dont fancy drop downs, but I'll see how they look and may change my mind.

Thanks Taran, Whiz...

  Forum Editor 01:22 13 Dec 2004

listboxes would be the perfect solution to this, Barry.

One totally unrelated point occurs to me. reference is made in the text about the furniture being made of solid mahogany. As you may know, there's a good deal of fuss being made about the use of big-leaf mahogany from the Amazon rain-forests at the moment - the trees are considered an endangered species. President Bush has launched an initiative to protect the timber, and that's bound to raise the subject's profile.

The UK is the world's second largest importer of this timber, and there's a move afoot to get us to reduce the amount we import for the furniture industry. I wonder if it might be an idea to include a few words about the source of the timber that's used in your products? Many people might be concerned, and want to know that illegal imports aren't involved here. 01:32 13 Dec 2004

I'll ask the maker. I think I recall him saying it came from Russia, can't be sure though. I know he's above board, anyway.

Thanks for bringing it up. 15:59 18 Dec 2004

got access to a MySQL database. It tells me I must upload MyAdmin, which I downloaded from SourceForge and unzipped.

I took a look at the configuration page of MyAdmin, and unfortunately realised that you have to have a degree in rocket science to do this (or it could be that I'm a bit thick).

Is there an easier way? I hhave been given a db name, Host name, Port, user name, and password by 1&1, but their help is a little lacking.

Any advice? Cheers, Whiz...

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5T review: Hands-on

Illustrator Andrés Lozano on his improv line work, brazen use of colours & hand sketching

iPhone X review

Comment envoyer gratuitement des gros fichiers ?