SQL & PHP Database Help

sean.ferguson

OSNN Veteran Addict
Joined
4 Jul 2003
Messages
1,693
Ok, i have been looking around on places such as php.resourceindex.com and hotscripts.com but have not found anything that is free/opensource that can do the job nicely. So, it looks like i need to code one, however i am very rusty with php and have little to no experience of SQL.

What i want is to create a sql database which will obviously hold the information. I will need as far as i know, fields to hold the following: "Id", "Name", "Description", "Long Term Treatment" and "Short Term Treatment". Id can be an auto incremented number. Everything else will be letters.

I then need to be able to display the information on a page, users need to be able to search through the records, by either name, description or id. I also want every records "name" to appear in a drop down menu, so they can simply look through them all if they wish.

On the first visit to the page, only the search function and drop down menu should be visable. Records will only be shown after a search has took place or after a selection has been made from the drop down menu.

Once a search has been submitted if the returned records are >20 i would like a message to appear "Your search has returned too many results, please refine your search."

If a search return 20 or less records then i want them all to be displayed. Obviously a selection from the drop down menu will only show that one record.

I have attached a very simple layout for you to try and understand slightly better what i mean.

Preferably, a simple form to enter the information into the database would be nice and shouldnt be too hard to code. So long as i can remember how i done it last time. If i cant it shouldnt be too hard to enter information straight from phpmyadmin and edit it further if required.

Any help or pointers anyone can give me would be great. It will need to be very customisable as i need it to fit in perfectly with two different (validating) style sheets. The actual search engine and record display finction should validate to xhtml 1.1 if possible, but i may need help with that too as i seem to always hit problems with validation and forms. :s

Thanks in advance for any help given.
 
OK, a little update.

For those who maybe found the above a little ambiguous i have managed to get the information pulled out of the database. I have also managed to setup the design i want it to fullfill. Right now, it may not validate. But i want to get the actually funtioning sorted before i worry too much about that.

I now need alot of help getting the search function working, and the displaying of the search results. Also the option box on the right hand side.

The pages i am talking about can be found here :)
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back