HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Programming/Scripts (
-   -   Mysql fetch array (

bernholdt 19th October 2009 00:41

Mysql fetch array
Hi All
Im using this simple template system but i cant seem to get mysql_fetch_array to show all rows from table it works if i take a clean php page but as soon i put it in this template system if only show last line?


$template = new Template;
$template->replace("menu", "
<li><a href='index.php?Kundetoken=".$Kundetoken."'>Start</a></li>
<li><a href='indstillinger.php?Kundetoken=".$Kundetoken." '>Mine informationer</a></li>
<li><a href='../conf/logaf.php'>Log af</a></li>
<li><a href=''>Kontakt</a></li>
$template->replace("stats", "
<b>Statistikker</b><br />
Kundeid: ".$Kundeid."<br />
Sidstelogin: ".$Sidstelogin."<br />
Sidste ip: ".$Sidsteloginip."<br />
Din ip: ".$_SERVER["REMOTE_ADDR"]."<br />
$template->replace("Copy", "&copy 2006- ".date('Y')." <a href=''>X-Host</a>");

$Fakturer = mysql_query("SELECT * FROM Faktura WHERE Kundeid='".$Kundeid."'");
while ($row = mysql_fetch_array($Fakturer)) {
$template->replace("indhold", "Velkommen ".$Kundenavn."<br /><br />
Herunder kan du se dine ubetalte fakturer, opdatere dine kontakt informationer og se finde alle dine fakturer.<br /><br />
<a href='faktura.php?Kundetoken=".$Kundetoken."&Faktu ranummer=".$row['Fakturanummer']."'>Faktura nr: ".$row['Fakturanummer']."</a>");

Any ideas ???

falko 19th October 2009 15:12

I guess that $template->replace is the problem then.

All times are GMT +2. The time now is 08:42.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.