PHP Help..anyone..anyone?

Discussion in 'PHP' started by movidalatina, Mar 19, 2008.

  1. #1
    I have this page where images appear but as it turns
    out the images, are one right next to the other 1.2.3.4.5.6.7.8.9
    I am looking to just have 5 on top, then the next 5 under those
    and then if there are more, to be under those..not like this
    __ __ __ __ __ __ __ __ __ __ __

    but rather like this
    __ __ __ __ __ __
    __ __ __ __ __ __
    __ __ __ __ __ __
    __ __ __ __ __ __

    Below is the page:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Your Website! - website.com!</title>
    </head>
    <body bgcolor="#ffffff">
    <center><img src="/images/logo.gif"></center><br>
    <br>
    <br>

    <?

    include("connect.php");

    if (is_uploaded_file($_FILES['userfile']['tmp_name']))
    {
    $uploaddir = '/home/papara/public_html/uploads/';
    $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
    $file_name = $_FILES['userfile']['name'];
    $file_location = "http://website.com/resized/";
    $file_location .= $file_name;
    if (copy($_FILES['userfile']['tmp_name'], $uploadfile))
    {
    $filename = '/home/papara/public_html/uploads/' . $file_name;
    //header('Content-type: image/jpeg');

    // Get new dimensions
    list($width, $height) = getimagesize($filename);
    $new_width = 150;//$width * $percent;
    $new_height = round(($height * 150) / $width); //$height * $percent;

    // Resample
    $image_p = imagecreatetruecolor($new_width, $new_height);
    $image = imagecreatefromjpeg($filename);
    imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);

    $ul_width = $new_width * 2;
    $ul_height = $new_height * 2;
    $image_r = imagecreatetruecolor($ul_width, $ul_height);
    $imagex = imagecreatefromjpeg($filename);
    imagecopyresampled($image_r, $imagex, 0, 0, 0, 0, $ul_width, $ul_height, $width, $height);

    // Output
    imagejpeg($image_p, '/home/papara/public_html/resized/' . $file_name , 100);
    imagejpeg($image_r, '/home/papara/public_html/magnified/' . $file_name , 100);

    mysql_query("INSERT INTO photos (location) VALUES ('$file_location')");
    $getbig = mysql_query("SELECT * FROM photos ORDER BY ID DESC LIMIT 1");
    $photo = mysql_fetch_object($getbig);
    }
    }
    ?>



    Any help would be appreciatted
     
    movidalatina, Mar 19, 2008 IP
  2. movidalatina

    movidalatina Well-Known Member

    Messages:
    1,268
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    105
    #2
    anyone..anyone?
     
    movidalatina, Mar 19, 2008 IP