Reply to Re: [PHP] Little Problem with my Guestbook

Your name:

Reply:


Posted by "Florian P." on 09/14/05 10:26

<?php

include("sql.inc.php");
include("config.inc.php");

$connection = mysql_connect($sql['host'],$sql['uid'],$sql['pwd']);
$select_db = mysql_select_db($sql['db']);

$select = mysql_query('SELECT * FROM comments');
$data = mysql_fetch_array($select);

$result = mysql_query('SELECT * FROM comments');
$rows = mysql_num_rows($result);

?>

<?php

echo " G&auml;stebucheintr&auml;ge gesamt: $rows";

?>

<table border="1" width="95%">
<tr>
<td>
ID:
</td>
<td>
<?php echo $data["id"]; ?>
</td>
</tr>
<tr>
<td>
Name:
</td>
<td>
<?php echo $data["autor"]; ?>
</td>
</tr>
<tr>
<td>
Titel:
</td>
<td>
<?php echo $data["titel"]; ?>
</td>
</tr>
<tr>
<td>
Kommentar:
</td>
<td>
<pre><?php echo $data["comment"]; ?></pre>
</td>
</tr>
</table>



Thats the code i have written.

And I would like to post the <table>........</table> how often
I have SQL-entries in my database.

I hope you understand what I would like to say.

And in each cycle it ought to put out the next entry of the database.



Florian P.







"Jasper Bryant-Greene" <jasper@bryant-greene.name> schrieb im Newsbeitrag
news:4327C604.5070607@bryant-greene.name...
> Florian Paucke wrote:
> > I need some help from you, because, I'm creating a
> > guestbook. But I have a little problem.
> >
> > I have a table, where the different My-SQL-Entries
> > are read out.
> > But now I get only one Entry, but not more.
> >
> > How can do it, that the table read out 4 times, when
> > 4 entries are in the database?
> >
> > And the cursor from the database are jumping to
> > the next entry.
> >
> > Sorry for my bad english. :)
>
> Please provide the code that is causing problems so that we can
> understand your problem and help you fix it.
>
> --
> Jasper Bryant-Greene
> Freelance web developer
> http://jasper.bryant-greene.name/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация