Connect with Facebook Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Tutorials > PHP Tutorials

PHP Tutorials PHP Tutorials

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old 07-11-2008, 05:25 AM
Jaan's Avatar   
Moderator
 
Join Date: Dec 2006
Location: Estonia
Age: 18
Posts: 1,518
Blog Entries: 4
Rep Power: 24
Jaan is just really niceJaan is just really niceJaan is just really niceJaan is just really niceJaan is just really nice
Send a message via MSN to Jaan
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 07-11-2008, 05:34 AM
Newbie
 
Join Date: Jul 2008
Posts: 12
Rep Power: 0
coated_pill is an unknown quantity at this point
Default 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 05:46 AM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 07-11-2008, 07:24 AM
Jaan's Avatar   
Moderator
 
Join Date: Dec 2006
Location: Estonia
Age: 18
Posts: 1,518
Blog Entries: 4
Rep Power: 24
Jaan is just really niceJaan is just really niceJaan is just really niceJaan is just really niceJaan is just really nice
Send a message via MSN to Jaan
Default Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

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

PHP 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
}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 07-12-2008, 10:40 PM
Newbie
 
Join Date: Jul 2008
Posts: 12
Rep Power: 0
coated_pill is an unknown quantity at this point
Default Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

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

PHP 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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 07-13-2008, 01:31 AM
Newbie
 
Join Date: Jul 2008
Posts: 12
Rep Power: 0
coated_pill is an unknown quantity at this point
Default Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

Resolved ^_^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 07-20-2008, 01:00 PM
-z- -z- is offline
Newbie
 
Join Date: Jul 2008
Posts: 1
Rep Power: 0
-z- is an unknown quantity at this point
Default 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'];
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 08-11-2008, 12:25 PM
Newbie
 
Join Date: Aug 2008
Posts: 1
Rep Power: 0
Stucka is an unknown quantity at this point
Default Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 08-23-2008, 04:31 PM
Programmer
 
Join Date: Aug 2008
Location: mtl
Posts: 135
Rep Power: 0
techker is an unknown quantity at this point
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 08-24-2008, 07:17 AM
Jaan's Avatar   
Moderator
 
Join Date: Dec 2006
Location: Estonia
Age: 18
Posts: 1,518
Blog Entries: 4
Rep Power: 24
Jaan is just really niceJaan is just really niceJaan is just really niceJaan is just really niceJaan is just really nice
Send a message via MSN to Jaan
Default Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

hmm.. have you changed anything?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 08-24-2008, 07:25 AM
Programmer
 
Join Date: Aug 2008
Location: mtl
Posts: 135
Rep Power: 0
techker is an unknown quantity at this point
Default Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

nothing at all...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Storing Images in MySQL with PHP Jordan PHP Tutorials 23 06-02-2009 10:01 PM
Tutorial: PHP to MySQL Jordan PHP Tutorials 9 09-05-2008 12:12 PM


All times are GMT -5. The time now is 10:10 PM.

Freelance Jobs

XML/XSL: Need code for Book with Chapers using XML
Create an XML file for a book of your creation, and a basic CSS file that will format it to display ...
Earn: $40.00


C++/C: Simple firework cue sequencer
What I require is a rework of a simple cue sequencer. I have a piece of hardware (an Arduino boar...
Earn: $50.00


HTML/XHTML: Menu Rework - ASCIIBin
I'm placing this in the HTML/XHTML section of the Freelance site but you are not limited to HTML. Wh...
Earn: $20.00



CodeCall Goal

Goal #1: 1,000 Blogs
Goal #2: 1,000 Wiki Pages
Goal #3: 300,000 Posts
Goal #4: 20,000 Threads
Done: 30%, 23%, 55%, 75%

Ads