Solved

MySQL newbie....

Posted on 2002-04-10
4
200 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
Comment Utility
lot in just 10 points ? :-)
0
 

Author Comment

by:Nick50000
Comment Utility
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
Comment Utility
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
Comment Utility
you have got the ans..there ..check

Lk :o)
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now