MySQL newbie....

I am a complete novice at MySQl, and really all I want to do is:

-> Connect to the db server.
-> Select a db.
-> Select a message to print to the user based on an id supplied to the script via the query string. ie /script.php?id=1 .

I have set up a MySQL table called 'txts', and this table has three fields: 'id', 'heading', and 'message'.

Firstly, I want to display a page which lists all the messages available, in a table like this:

-------------------------------------
| Message Heading (field 'heading') |
-------------------------------------
| The actual message |
| (field 'message') |
-------------------------------------
| A link to another page giving the |
| message id via the query string |
| (using the 'id' field) |
-------------------------------------

Then, on the next page, I would like to be able to put the message into a variable ($message) which I can use later on.... the message will be selected from the table using the ?id= parameter to get the right message.

I know that this is a lot to ask, but can anyone give advice on how to do this. I will be extremely grateful for any help at all.

Thanks,
Nick!
Nick50000Asked:
Who is Participating?
 
Nick500000Connect With a Mentor Commented:
I have posted the question again but with A LOT more points! Question title: MySQL and PHP question!
0
 
lokeshvCommented:
lot in just 10 points ? :-)
0
 
Nick50000Author Commented:
yeah sorry, I don't have any more... hey tell you wot - i'll re-register and get some more.....
0
 
lokeshvCommented:
you have got the ans..there ..check

Lk :o)
0
All Courses

From novice to tech pro — start learning today.