Closed Thread
Page 2 of 22 FirstFirst 123412 ... LastLast
Results 11 to 20 of 214

Thread: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

  1. #11
    Jaan Guest

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    yea you should show the script.. then we can solve the problem

  2. CODECALL Circuit advertisement

     
  3. #12
    coated_pill is offline Newbie
    Join Date
    Jul 2008
    Posts
    12
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    i have solved the corrupt problem.. i just wanna ask if what will i place in the tags of files extension to uploads .zip or .rar in my webhost..

    what will i replace with this tags
    # What type of files should be allowed to be uploaded ?
    $allow_type = "audio/mpeg";
    Last edited by coated_pill; 07-11-2008 at 03:46 AM.

  4. #13
    Jaan Guest

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    Code:
    // .rar
    $allow_type "application/rar";
    // .zip
    $allow_type "application/zip"
    I get those by using this script:

    Code:

    <?php
    if($_GET['act'] == "show"){
    echo 
    $_FILES['files']['type'];
    }else{
    ?>

    <form action="?act=show" enctype="multipart/form-data" method="post">
    <input type="file" name="files" />
    <input type="submit" name="submit" />
    </form>
    <?php
    }
    ?>

  5. #14
    coated_pill is offline Newbie
    Join Date
    Jul 2008
    Posts
    12
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    Quote Originally Posted by Jaan View Post
    Code:
    // .rar
    $allow_type "application/rar";
    // .zip
    $allow_type "application/zip"
    I get those by using this script:

    Code:

    <?php
    if($_GET['act'] == "show"){
    echo 
    $_FILES['files']['type'];
    }else{
    ?>

    <form action="?act=show" enctype="multipart/form-data" method="post">
    <input type="file" name="files" />
    <input type="submit" name="submit" />
    </form>
    <?php
    }
    ?>
    by the way.. can i have a very detailed tutorials on how can i upload my files to my sub folder in my public_html folder..

    A step step by step to do this with the explanation and example.. that would be highly appreciated.. thanks! i am just a newbie in php..

    Thank you again!

  6. #15
    coated_pill is offline Newbie
    Join Date
    Jul 2008
    Posts
    12
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    Resolved ^_^

  7. #16
    -z-
    -z- is offline Newbie
    Join Date
    Jul 2008
    Posts
    1
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    hi.. i have modified the code because i did not pass the id from other page.. an while i run the page .. it will call me to download the php file...pls advice .. i just want to retrieve the picture stored in the database and it is uploaded sucessfully from the previous tutorial provided.. thanks in advance

    Code:
     $storedid = "1";
      $id = (int)$storedid;
    
    if(!isset($id) || empty($id)){
    die("Please select your image!");
    }else{
    
    $query = mysql_query("SELECT * FROM tbl_images WHERE id='$id'");
    $row = mysql_fetch_array($query);
    $content = $row['image'];

  8. #17
    Stucka is offline Newbie
    Join Date
    Aug 2008
    Posts
    1
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    Thank you

  9. #18
    techker is offline Programmer
    Join Date
    Aug 2008
    Location
    mtl
    Posts
    136
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    why is that i get a download file when i call it in the browser?

    viewimage.php?id=1

  10. #19
    Jaan Guest

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    hmm.. have you changed anything?

  11. #20
    techker is offline Programmer
    Join Date
    Aug 2008
    Location
    mtl
    Posts
    136
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    nothing at all...

Closed Thread
Page 2 of 22 FirstFirst 123412 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 4 users browsing this thread. (0 members and 4 guests)

Similar Threads

  1. Replies: 3
    Last Post: 02-07-2011, 11:29 AM
  2. Tutorial: Storing Images in MySQL with PHP
    By Jordan in forum PHP Tutorials
    Replies: 47
    Last Post: 01-04-2011, 08:37 PM
  3. Beginner Storing images in XML file - Part II - Displaying image
    By Jaan in forum PHP Tutorials
    Replies: 6
    Last Post: 01-04-2011, 08:35 PM
  4. display images sequentially using PHP and MySQL
    By jhanjon in forum PHP Development
    Replies: 2
    Last Post: 10-08-2009, 12:11 PM
  5. Replies: 2
    Last Post: 07-16-2009, 12:48 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts