Page 1 of 1

IMG SRC error!

Posted: Thu Dec 09, 2010 1:04 pm
by mrekko
Hello guys!

I want to display a image wich link is in a mysql database.

i used a loop with this output:

Code: Select all

while( $linha = mysql_fetch_array($sql_noticia) ){
			echo '<ul class="noticias">
	                <li><img src="'.$linha['path'].'" alt="image" /> </li>
			<li class="titulogrande">'.$linha['descricao'].'</li>
				<li class="texto">'.$linha['data'].'</li>					
				<li class="textobd">'.$linha['assunto'].'</li>	
				<br>
				<li class="texto"><p align="right">Links Externos</p></li>	 
}
The output cames nice except the image, it only shows the alt phrase "image". I guess im using a bad syntax in the IMG tag!

Thank you!

Re: IMG SRC error!

Posted: Thu Dec 09, 2010 1:56 pm
by McInfo
Spaces?

Code: Select all

src=" '.$linha['path'].' "
     ^                  ^
Edit: I just did a test, and the spaces don't seem to matter.

Check the page source in your browser. See if the path is what you expect it to be.

Re: IMG SRC error!

Posted: Thu Dec 09, 2010 2:07 pm
by mrekko
In the actual code there“s no spaces there. bad copy&past!

sorry! didnt saw!

I will check the page source! report later!

Re: IMG SRC error!

Posted: Thu Dec 09, 2010 2:27 pm
by mrekko
YES!

The problem was in the path!! Many thanks!!