Jump to content

Search the Community

Showing results for tags 'image browse & upload'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi, Below is my image browse upload code , here I can insert image in database, but it is dispaly only icon instead of image, Please help me to display image...many many thanks in advance index.php <!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>Logo Upload here..</title> </head> <body> <form action="index.php" method="post" enctype="multipart/form-data"> <label>Product Name</label> <input type="text" name="pname" /> <label>Product image</label> <input type="file" name="image" > <input type="submit" name="submit" value="Add Logo"> </form> <?php include "db_conexn.php"; if(!isset($_FILES["image"]["tmp_name"])) echo "Please select an image.."; else { $image=addslashes(file_get_contents($_FILES["image"]["tmp_name"])); $image_name=addslashes($_FILES["image"]["name"]); $image_size=getimagesize($_FILES["image"]["tmp_name"]); if($image_size==FALSE) echo "It is not an image"; else { $insert=mysql_query("insert into images values('','$image_name','$image')"); echo "<img src='uploadsql.php'>"; } } ?> </body> </html> uploadsql.php <html> <body> <?php $result=mysql_query("select * from images"); while($row=mysql_fetch_array($result)) { header("Content-Type:image/jpeg"); $image=$row['image']; echo $image; } ?> </html> table table : images id name image 26 Chrysanthemum.jpg [bLOB - 858.8 KiB]
×
×
  • 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.