Reply to Gif based counter

Your name:

Reply:


Posted by Allan Drake on 07/25/07 05:35

I am having trouble using a very simple, modifed script from this
address:
http://www.weberdev.com/ViewArticle/Counting---Creating-a-GIF-based-counter-using-PHP-and-MySQL

The script outputs an image with an incorrect file name. For example.
"http://www.debatron.com/numbers/.gif" Notice the file name is
only partially there. It should be pulling out something like
"1.gif" for a picture of the number 1 etc.

Below is the code I am using. The segment that prints the gif sequence
is at the end. I took alot out, but we are in a large while loop that
is grabbing alot of stuff from mysql. You might have to ignore some of
the code, but I put some in, just in case thats whats screwing it up.


//Grabs $noyes string from mysql data base? (there is more mysql/php
code above this that my progammer was doing in a while loop. Only
$noyes variable is important)

$sqlyes = "Select * from db_debateresponse where db_debate_iddebate =
". MYSQL_RESULT($result,$i,"iddebate") . " and responsetype=0";

$resyes = MYSQL_QUERY($sqlyes);
$noyes = MYSQL_NUMROWS($resyes);

$sqlno = "Select * from db_debateresponse where db_debate_iddebate =
". MYSQL_RESULT($result,$i,"iddebate") . " and responsetype=1";

$resno= MYSQL_QUERY($sqlno);
$noNo = MYSQL_NUMROWS($resno);


//configuring variables for the gif counter

$numurl = 'http://www.debatron.com/numbers/';
$fileending = '.gif';


//Prints the number from $noyes back out as gif image sequence

for ($l = 0; $l < strlen($noyes); $l++) {
echo "<img src=\"$numurl$noyes[$l]$fileending\">";
}

[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

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