Solved

MySQL newbie....

Posted on 2002-04-10
4
203 Views
Last Modified: 2006-11-17
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
Comment
Question by:Nick50000
  • 2
4 Comments
 
LVL 4

Expert Comment

by:lokeshv
ID: 6932967
lot in just 10 points ? :-)
0
 

Author Comment

by:Nick50000
ID: 6934509
yeah sorry, I don't have any more... hey tell you wot - i'll re-register and get some more.....
0
 

Accepted Solution

by:
Nick500000 earned 15 total points
ID: 6934604
I have posted the question again but with A LOT more points! Question title: MySQL and PHP question!
0
 
LVL 4

Expert Comment

by:lokeshv
ID: 6934671
you have got the ans..there ..check

Lk :o)
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question