Jump to content

little help please


advo

Recommended Posts

hi people im having a little issue here with current php code dose not want to print out what i want or dose but only first letter

 

basicly its a dynamic image there is a db called `chatsigtext` each image will have its own id and so i can sort different image from other images

the code im using is below  i know im doing something wrong but dont know my idea was it would  pul 16 rows based on time decending and have a var $ text1 $text2 and so on each one a dif row in query but it dosent semm to work

 

$chatlines= MYSQL_QUERY("SELECT * from chatsigtext WHERE sigID='".$sig->sigID."' ORDER BY time DESC LIMIT 16 ");

//$arr= mysql_fetch_array($chatlines);
//$text1 = $arr['text']; this works but i cant make text2 = the new row down and so on i want 15 text vars each pulled from the above sql
//$text2 = $arr[1]['text'];

$arr = mysql_fetch_row($chatlines);
$text1 = $arr[1]['text'];// this will only echo  the first letter where above will do whole thing just not next row


imagestring($im, 3, 2, 05, $text1, $color); 
imagestring($im, 3, 2, 20, $text2, $color); 

 

any help on how i can do this would be great

Link to comment
https://forums.phpfreaks.com/topic/230300-little-help-please/
Share on other sites

ok now im really stuck as this is for a php image not a real image i need to have it refresh the image on site with out page load thinking ajax or JS will do this but no clue on where to start

 

the url for it to refresh will be something like chatsig.php?id=some id that is held in post/get data

for life of me i cant seem to get it to reoad with out reloading page any help on how to reload  a image onfly say every 3 seconds with the ?id=<?=$somevar?> would be greatly apretiated

Link to comment
https://forums.phpfreaks.com/topic/230300-little-help-please/#findComment-1186047
Share on other sites

ok now im really stuck as this is for a php image not a real image i need to have it refresh the image on site with out page load thinking ajax or JS will do this but no clue on where to start

 

the url for it to refresh will be something like chatsig.php?id=some id that is held in post/get data

for life of me i cant seem to get it to reoad with out reloading page any help on how to reload  a image onfly say every 3 seconds with the ?id=<?=$somevar?> would be greatly apretiated

 

that would be javascript!

Link to comment
https://forums.phpfreaks.com/topic/230300-little-help-please/#findComment-1186054
Share on other sites

Sorry i am a complete retard in javascript, I can read it, but not write it, I would ask it in the javascript forum we have here.

but google also is a great source: http://www.google.nl/#sclient=psy&hl=nl&q=javascript+image+rotator&aq=3&aqi=g5&aql=&oq=&pbx=1&fp=fe0504c4a0089c6f  (key words:  javascript image rotator )

 

Link to comment
https://forums.phpfreaks.com/topic/230300-little-help-please/#findComment-1186066
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.