+ Reply to Thread
Results 1 to 5 of 5

Thread: error in pictures

  1. #1
    joennika214 is offline x10Hosting Member joennika214 is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    13

    error in pictures

    Good day sir.. im wondering why cant the pictures from my site wont appear in the page online but when in my computer its good. hers the code.
    include('/home/joennika/public_html/db_connection/Global_Variables.php');

    /* Connects to the systems database*/
    $connection = mysql_connect($host,$user,$password) or die(mysql_error());
    mysql_select_db($database,$connection) or die(mysql_error());

    /* Select all categories from PetType table */
    $query = 'select * from tbl_news order by date_made desc limit 1';
    $result = mysql_query($query) or die ('Couldn’t execute query.');

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

    // give a name to the fields


    if (strlen($newArray['Body']) > 290)
    {
    $v_Body= substr($newArray['Body'],0,289);
    }
    else
    {
    $v_Body = $newArray['Body'];
    }

    $v_Date_Made = $newArray['Date_Made'];
    $v_Title = $newArray['Title'];
    }

    $query = 'select * from tbl_softwares where use_number >0 order by Use_Number';
    $result = mysql_query($query) or die ('Couldn’t execute query.');

    $counter=0;
    while ($newArray = mysql_fetch_array($result))
    {


    // give a name to the fields
    $var_image_path[$counter]=substr($newArray['image_small'],1,strlen($newArray['image_small']));
    $var_image_title[$counter]=$newArray["Title"];
    $var_image_pk[$counter]=$newArray["PK"];
    $counter+=1;
    }

    ?>


    here where i insert the image


    <div id="leftworkPan">
    <ul>
    <li>
    <img src="<?php echo $var_image_path[0] ?>" alt="<?php $var_image_title[0] ?>" width="109" height="105"
    align="top" title="<?php $var_image_title[0] ?>" /><a href="frm_about.php?ID=<?php echo $var_image_pk[0]; ?>">view</a></li>
    <li class="middle">&nbsp;</li>
    <li> <img src="<?php echo $var_image_path[1] ?>" alt="<?php $var_image_title[1] ?>" width="109"
    height="105" align="top" title="<?php $var_image_title[1] ?>" /><a href="frm_about.php?ID=<?php echo $var_image_pk[1]; ?>">view</a></li>
    <li><img src="<?php echo $var_image_path[2] ?>" alt="<?php $var_image_title[2] ?>" width="109"
    height="105" align="top" title="<?php $var_image_title[2] ?>" /><a href="frm_about.php?ID=<?php echo $var_image_pk[2]; ?>">view</a></li>
    <li class="middle">&nbsp;</li>
    <li> <img src="<?php echo $var_image_path[3] ?>" alt="<?php $var_image_title[3] ?>" width="109"
    height="105" align="top" title="<?php $var_image_title[3] ?>" /><a href="frm_about.php?ID=<?php echo $var_image_pk[3]; ?>">view</a></li>
    </ul>
    </div>

    Heres my site http://joebetsoft.x10hosting.com/
    image path : /images/System/Products_pics (i also tried /public_html/images/System/Products_pics
    the image wont appear.. but in my computer it shows.. also when i goto another pages like "NEWS" and others the server says i cant find the page even though the page is on my directory.

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: error in pictures

    The image links are coming out all lowercase.
    1. Rename System to system
    2. Rename Products_pics to products_pics
    3. Change any .JPG extensions to .jpg

    a. When naming files and directories always use lowercase. It is easier to be consistent that way
    b. Never use spaces in names either.
    c. Be careful when using some authoring tools, especially Microsoft ones, to enforce a) and b)

  3. #3
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: error in pictures

    @joennika214: when posting source code, please use [php], [html] or [code] tags (as appropriate) to delineate the code, preserve formatting and make it readable. For example,

    PHP Code:
    while ($newArray mysql_fetch_array($result)) 
    {
        
    // give a name to the fields
        
    if (strlen($newArray['Body']) > 290

  4. #4
    joennika214 is offline x10Hosting Member joennika214 is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    13

    Re: error in pictures

    thanks guys im going to check this later

  5. #5
    joennika214 is offline x10Hosting Member joennika214 is an unknown quantity at this point
    Join Date
    Apr 2010
    Posts
    13

    Re: error in pictures

    @descalzo thank you very much sir.. now it works... thanks tahnks thanks

+ Reply to Thread

Similar Threads

  1. Help (with pictures)
    By Desudesu in forum Free Hosting
    Replies: 23
    Last Post: 06-16-2008, 12:03 AM
  2. Funny Pictures
    By javajenius in forum Off Topic
    Replies: 0
    Last Post: 05-11-2008, 10:49 PM
  3. Help with pictures
    By letasega in forum Programming Help
    Replies: 5
    Last Post: 04-25-2008, 05:17 PM
  4. Making pictures for you
    By Namjies in forum The Marketplace
    Replies: 6
    Last Post: 11-10-2007, 08:03 AM
  5. Pictures of your iPod
    By Nathan in forum Off Topic
    Replies: 5
    Last Post: 11-14-2006, 08:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers