PDA

View Full Version : Grr stupid loop


colicab-d
04-11-2003, 09:40 PM
Ok hi folks i got a wee prob.. im making a simple shoutbox for a friend norm a 5 min task...

However ive never integrated anything into vb aside throught the admin panel.. include style.css

well anyway i was told that i should eval the output for this one so it would use vb`s style etc..

anyway i got a problem now..

ive tried including an eval in the loop so it can loop the results

(my syntax is bad im too used to truebasic)


well anyway my prob is ever since i used eval at the top of the code.. it seems the loop wont return anything in it..

which kinda figures as its evaling everything before the loop

my question now is how the heck to i work around this?

should i eval the output last?

will it show say 5 results even tho its $name in the template?

im a bit stuck.. and i realise someone will come along and point out the obvious put thank you if you can :D

ive included the hack.. i just need the shout.php fixed up so its shows the results set by $last

Zzed
04-11-2003, 10:00 PM
Why do you have this in the bottom of shout.php? :confused:



?>

<? } ?>



It seems like it is throwing off the balancing of the { and } for the while statement....

colicab-d
04-11-2003, 10:20 PM
a mistake from earlier...



while($r = mysql_fetch_array($query)){

$id=$r['id'];

$time=$r['time'];

$message=$r['message'];

$name=$r['name'];


gettemplate('shoutbit');

echo "DOES THIS WORK AT ALL???";

?>

<? } ?>



i had some html in there from when it wasnt being integrated to vb

so



?>

<?



isnt needed i know :(

colicab-d
04-12-2003, 12:37 PM
anyone else?