Jump to content

[SOLVED] Image Trouble


sumfight

Recommended Posts

Ok, I got everything i need to set up to make my images with text and link to work, the text and links work, but i can't get the picture to appear, here is the code i am using

 

<?php

$host="host"; // Host name

$username="username"; // Mysql username

$password="password"; // Mysql password

$db_name="database name"; // Database name

 

// Connect to server and select databse

mysql_connect("$host", "$username", "$password")or die("cannot connect to server");

mysql_select_db("$db_name")or die("cannot select DB");

 

$sql="SELECT * from images LIMIT 12"; // choose limit of pictues to be displayed

$result=mysql_query($sql);

?>

              <table width="95%" border="0" cellpadding="3" cellspacing="3" style="padding-top:5px">

                <tr>

<?php

$i=13; // always 1 more than limit

while($rows=mysql_fetch_array($result)){

$i = $i - 1;

    if($i % 2 == 0)

    {

?>

                </tr>

                <tr>

<?php

}

?>

                  <td align="center" valign="top"><table border="0" align="center" >

                      <tr>

                        <td align="center><img src="<?php echo $rows['image']; ?>" alt="<?php echo $rows['name']; ?>" border="0"/></td>

                      </tr>

                      <tr>

                        <td align="center" valign="middle"><a href="<?php echo $rows['link']; ?>"><?php echo $rows['name']; ?></a></td>

                      </tr>

                  </table></td>

                  <td>

<?php

}

?>

                  </td>

                </tr>

              </table>

 

and in my database i am putting the image link under image as this: http://sumfight.com/v2/mv/vidpics/20.jpg

 

it does not show up though, any help?

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.