yea you should show the script.. then we can solve the problem![]()
yea you should show the script.. then we can solve the problem![]()
█ Trill Hosting - Cheap SSL, Cheap Web Hosting, Register Cheap Domains, Cheap Blog Hosting
█ www.trillhosting.com | support@trillhosting.com
█ Hosting Plans | Write To Us | Support | Client Area | About Us
CodeCall Blog | CodeCall Wiki
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.
I get those by using this script:Code:// .rar
$allow_type = "application/rar";
// .zip
$allow_type = "application/zip";
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
}
?>
█ Trill Hosting - Cheap SSL, Cheap Web Hosting, Register Cheap Domains, Cheap Blog Hosting
█ www.trillhosting.com | support@trillhosting.com
█ Hosting Plans | Write To Us | Support | Client Area | About Us
CodeCall Blog | CodeCall Wiki
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!
Resolved ^_^
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'];
Thank you
why is that i get a download file when i call it in the browser?
viewimage.php?id=1
hmm.. have you changed anything?
█ Trill Hosting - Cheap SSL, Cheap Web Hosting, Register Cheap Domains, Cheap Blog Hosting
█ www.trillhosting.com | support@trillhosting.com
█ Hosting Plans | Write To Us | Support | Client Area | About Us
CodeCall Blog | CodeCall Wiki
nothing at all...
There are currently 3 users browsing this thread. (0 members and 3 guests)
Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum