Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
mrekko
- Forum Newbie
- Posts: 6
- Joined: Fri Sep 24, 2010 6:37 am
Post
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!
Last edited by
mrekko on Thu Dec 09, 2010 2:29 pm, edited 1 time in total.
-
McInfo
- DevNet Resident
- Posts: 1532
- Joined: Wed Apr 01, 2009 1:31 pm
Post
by McInfo »
Spaces?
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.
-
mrekko
- Forum Newbie
- Posts: 6
- Joined: Fri Sep 24, 2010 6:37 am
Post
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!
-
mrekko
- Forum Newbie
- Posts: 6
- Joined: Fri Sep 24, 2010 6:37 am
Post
by mrekko »
YES!
The problem was in the path!! Many thanks!!