• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

SQL & PHP Database Help

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

Latest posts

Latest profile posts

Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member