advo Posted March 11, 2011 Share Posted March 11, 2011 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 More sharing options...
advo Posted March 11, 2011 Author Share Posted March 11, 2011 geeze my head must not be screw on atm while($data = mysql_fetch_array($logged)) { $arr[] = $data['text']; } imagestring($im, 3, 2, 05, $arr[0], $color); imagestring($im, 3, 2, 20, $arr[1], $color); this did what i wanted Link to comment https://forums.phpfreaks.com/topic/230300-little-help-please/#findComment-1185997 Share on other sites More sharing options...
advo Posted March 11, 2011 Author Share Posted March 11, 2011 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 More sharing options...
cssfreakie Posted March 11, 2011 Share Posted March 11, 2011 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 More sharing options...
advo Posted March 11, 2011 Author Share Posted March 11, 2011 can you give me a link or some demo of how it be done i have no clue on JS Link to comment https://forums.phpfreaks.com/topic/230300-little-help-please/#findComment-1186064 Share on other sites More sharing options...
cssfreakie Posted March 11, 2011 Share Posted March 11, 2011 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.