Chazster wrote:SO I need some code which connects to the database and table then find the record from the url then print it??
I agree with enygma, he gave you the functions that you could use and if you had bothered to check the manual you would have found a number of examples. You could have even searched this forum and found exactly what you were looking for.
Chazster wrote:Also one of my fields is a message and when I come to print it out in php the data is all on one line - how can I fix this?
You need to use the nl2br() function on the information.
It is frankly irritating when you send someone in the right direction and they don't attempt to help themselves at all. Needing help with some code that you've written is one thing, basically asking us to write your code without you attempting any of your own is unfair. If you want your code written by someone else pay them.
The frustration arises because what you asked is incredibly basic and there are multitudes of tutorials available which would have been a better place to start. For example searching on Google using the search string 'connect to mysql using php' yields the following results.
I apologise for being rude and don't want to deter anybody from posting but I think you would have had a similar response from most of the PHP forums out there.
Ok, yeah, i agree with the fact you should write your own code. But let's not forget that the best way to learn how to code effectively is by example. I did not mind posting this simple query algorithm. Hopefully it is somewhat helpful to the person who originally asked the question.
Reading the manual should be the first thing done, but when you are stuck after that, there is someone out there who is willing to help.
Don't leave the forum Chazter. Just try to research your problem more in full before asking such a generalized question. Good luck with the rest of your coding.
fair enough protokol, but lets see if you are as helpful when it's the fifth time you have posted the same bit of code to help someone that couldn't be bothered to a bit searching.
Why should you or I have to search the forum for information that the other person could have found just as easily? I often remember answering the same question before but unlike you I have been involved in so many threads that I can't remember exactly which one was about what (undescriptive subjects like 'mysql' are part of that problem). When you've posted a few hundred times you'll probably understand better. I like being able to help people but there does need to be some giving on their part, not just taking.