Page 2 of 2

Posted: Tue Sep 25, 2007 12:05 am
by lnt
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Code: Select all

MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')")
Do you want to write:

Code: Select all

MYSQL_QUERY("INSERT INTO counter (field1, field2, field3) VALUES ('', '$name', '2')")

Code: Select all

<script type="text/javascript" src="myCount.php"></script>
Attribute "src" of script element must be a script file including javascript statements. but your php file echoes some img tags.

Try this

Code: Select all

for ($i = 0; $i < strlen($count); $i++) {
    echo "var img=document.createElement('img');";
    echo "img.src=\"$url$count[$i]$style$ending\";";
    echo "document.body.appendChild(img);";
}
Use firebug to debug your script in firefox before posting a question here :)


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

image counter

Posted: Tue Sep 25, 2007 7:49 pm
by Nanaosei
I try your suggustion but nothing show up on the index.html page

Posted: Wed Sep 26, 2007 7:44 am
by lnt
Sorry, I copied your code but I did not see strlen($count). It must be $count in the for loop.