Solved

MySQL newbie....

Posted on 2002-04-10
4
202 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

809 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