The Little Guy Posted February 3, 2007 Share Posted February 3, 2007 Why does this work: <img onmouseover="return escape(\'<b>File:</b> '.$rows['file_name'].'<br ><b>Title:</b>\')" class="image" alt="'.$rows['file_id'].'" src="users/'.$_SESSION['user'].'/thumbs/'.$rows['file_name'].'"> And This doesn't (My addition: '.$rows['title'].'): <img onmouseover="return escape(\'<b>File:</b> '.$rows['file_name'].'<br ><b>Title:</b> '.$rows['title'].'\')" class="image" alt="'.$rows['file_id'].'" src="users/'.$_SESSION['user'].'/thumbs/'.$rows['file_name'].'"> Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/ Share on other sites More sharing options...
ted_chou12 Posted February 3, 2007 Share Posted February 3, 2007 Can you show the echo part, (what your echo quotation marks started with as well as put a <?php around it so can be clearly differenciated. Thanks Ted Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/#findComment-175960 Share on other sites More sharing options...
The Little Guy Posted February 3, 2007 Author Share Posted February 3, 2007 <?php echo'<img onmouseover="return escape(\'<b>File:</b> '.$rows['file_name'].'<br><b>Title:</b> '.$rows['title'].'\')" class="image" alt="'.$rows['file_id'].'" src="users/'.$_SESSION['user'].'/thumbs/'.$rows['file_name'].'">'; ?> Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/#findComment-175962 Share on other sites More sharing options...
ted_chou12 Posted February 3, 2007 Share Posted February 3, 2007 sorry, I forgot to ask you , what happens when you add '.$rows['title'].'? Ted Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/#findComment-175963 Share on other sites More sharing options...
The Little Guy Posted February 3, 2007 Author Share Posted February 3, 2007 its a DHTML title thing I got from here http://www.walterzorn.com/tooltip/tooltip_e.htm, (put your mouse on the funky bike). It is supposed to look like that, when I add '.$rows['title'].' It stops displaying, but it does display before I add that. Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/#findComment-175964 Share on other sites More sharing options...
ted_chou12 Posted February 3, 2007 Share Posted February 3, 2007 oh, i see, seems to me you dont have any php syntax errors here, because you have the right number of quotation marks, so i think is the problem with the DHTML, which im not very experienced with... Ted Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/#findComment-175966 Share on other sites More sharing options...
ted_chou12 Posted February 3, 2007 Share Posted February 3, 2007 I think i know, from the link you gave: return escape('This text won\'t create an error.'); do you see this? do you have single qutoation marks in your '.$rows['title'].'? i think thats what cause the error Ted Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/#findComment-175968 Share on other sites More sharing options...
The Little Guy Posted February 3, 2007 Author Share Posted February 3, 2007 but I have that around file_name too. and it works, when '.$rows['title'].' isn't there Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/#findComment-175970 Share on other sites More sharing options...
The Little Guy Posted February 3, 2007 Author Share Posted February 3, 2007 Ahh... I think I got it, I just used the addslashes() function. Link to comment https://forums.phpfreaks.com/topic/36885-i-cant-find-the-error/#findComment-175972 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.