| | |
sos help
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 0
can anybody please tell me how to insert and retrieve an image stored in a database using php and mysql.the way i m doing now is by storing the file in a server and filename in the db.but the problem with that is while retrieving the image doesnt show up.db entries are all correct..but due to some reason i cant display the file in my webpage.please help...dis is very urgent.i m badly running out of time..thanx in advance
provide us with appropriate code...
or check these urls:
http://www.daniweb.com/forums/thread134714.html
http://www.wellho.net/solutions/php-...-retreive.html
or check these urls:
http://www.daniweb.com/forums/thread134714.html
http://www.wellho.net/solutions/php-...-retreive.html
Last edited by Shanti Chepuru; Sep 23rd, 2008 at 9:29 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Personally I would not use the second example-saving images into the Database, there is no need.
The filesystem was designed to do this job so why re-invent the wheel? I have yet to come across a scenario where storing images in the database is better than the filesystem.
The filesystem was designed to do this job so why re-invent the wheel? I have yet to come across a scenario where storing images in the database is better than the filesystem.
AJAX is not a programming language, scripting language or any other sort of language.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
It is acheived by using JavaScript http functions.
So, AJAX = JavaScript.
•
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 0
thank u so much for ur instant reply.i'll try to qoute my problem here
its like this..
This is works fair in a localmachine with host as localhost but when deploys it in the hosting space and run as a normal web page i just can't stand it ,i cant see the image.and i am not able to think of reasonable answer.can u help me out of this?
its like this..
php Syntax (Toggle Plain Text)
//retrieve the filename from db using a select query $result= mysql_result("SELECT imagename FROM imagetab"); $row=mysql_fetch_array($result); //then i placed an image object with dynamic source like this <img src="<?php echo $row[0]; ?>"/>
This is works fair in a localmachine with host as localhost but when deploys it in the hosting space and run as a normal web page i just can't stand it ,i cant see the image.and i am not able to think of reasonable answer.can u help me out of this?
Last edited by peter_budo; Sep 25th, 2008 at 4:33 pm. Reason: Keep It Organized - please use [code] tags
take a look at this fuction:
chmod($pro_imgpath,0777); And 777- Everybody (i.e. others) has full rights.
chmod($pro_imgpath,0777);
php Syntax (Toggle Plain Text)
<?php // Read and write for owner, nothing for everybody else chmod("test.txt",0600); // Read and write for owner, read for everybody else chmod("test.txt",0644); // Everything for owner, read and execute for everybody else chmod("test.txt",0755); // Everything for owner, read for owner's group chmod("test.txt",0740); ?>
Last edited by Shanti Chepuru; Sep 24th, 2008 at 5:29 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
•
•
•
•
Personally I would not use the second example-saving images into the Database, there is no need.
The filesystem was designed to do this job so why re-invent the wheel? I have yet to come across a scenario where storing images in the database is better than the filesystem.
Last edited by R0bb0b; Sep 24th, 2008 at 8:31 pm.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
![]() |
Similar Threads
- Word Association Game (Posting Games)
- Hijack This Log, please help (Viruses, Spyware and other Nasties)
- Someone please save me from About:Blank (Viruses, Spyware and other Nasties)
- data access (Visual Basic 4 / 5 / 6)
Other Threads in the PHP Forum
- Previous Thread: php echo
- Next Thread: Help building VIN decoding website
| Thread Tools | Search this Thread |
apache api array basic beginner broken cache cakephp class cms code computing confirm countingeverycharactersfromastring cron curl customizableitems database date delete dynamic echo email error fcc file filter folder form forms forum freelancing function functions gc_maxlifetime google header headmethod howtowriteathesis href htaccess html iframe image include incode ip javascript joomla limit link login malfunction match memmory memory menu method mod_rewrite multiple mysql navigation neutrality oop pagerank parsing paypal pdf php phpmysql query question random recursiveloop root script search select server sessions sms snippet soap source space sql support! system table template thesishelp trouble tutorial upload url variable video web window.onbeforeunload=closeme; youtube






