Page 1 of 1

automatic select form a db if something is posted

Posted: Thu Oct 17, 2002 8:33 am
by Grandiozo
hey everyone,

I'm busy with learn php & mysql. I'm now busy with a guestbook.
I can post messages into my database.
I've read a lots of articles (dutch), but I haven't find it.
How can I automatic show a message?
Now I muss add the message self, but I want that it happen automatic. So, somebody post a message and than automatic will be the message add on a page...
Where can I find a script (English or Dutch) or who can write a script for me?
If you want help me, thank you very much!!
For MSN you can contact me on grandiozo@hotmail.com

Greets,

Edwin

Posted: Thu Oct 17, 2002 9:48 am
by Phirus
Erm..Unless you have flagged it on a certain field in the DB, All you should do is:

Code: Select all

<?php

$sqry = mysql_query("SELECT field_names FROM table_name");

?>
Then you loop out the data from the DB:

Code: Select all

<?php

while($result = mysql_fetch_array($sqry)){

echo $resultї'WHATEVER_YOUR FIELD NAME IS IN THE DB'];

}

?>

Hope you understand,

Phirus