Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

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!
0
Nick50000
Asked:
Nick50000
  • 2
1 Solution
 
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
 
Nick500000Commented:
I have posted the question again but with A LOT more points! Question title: MySQL and PHP question!
0
 
lokeshvCommented:
you have got the ans..there ..check

Lk :o)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now