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
Share on other sites

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
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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.