How to insert image in directory using mySQL

Reply

Join Date: Aug 2007
Posts: 26
Reputation: web_master is an unknown quantity at this point 
Solved Threads: 0
web_master's Avatar
web_master web_master is offline Offline
Light Poster

How to insert image in directory using mySQL

 
0
  #1
Aug 26th, 2007
how do i insert a image into a directory through MySQL, rename it, generate a link and upload the generated link in MySQL......???

anyhelp will be really apprietiated....

and if its a tutorial its the best way out, i'm not good at PHP.....

plz its urgent for me..

thx alot..
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 160
Reputation: w_3rabi is an unknown quantity at this point 
Solved Threads: 9
w_3rabi's Avatar
w_3rabi w_3rabi is offline Offline
Junior Poster

Re: How to insert image in directory using mySQL

 
0
  #2
Aug 27th, 2007
could u explain more
and in a little detail
programming is an art ,only for those who can understand it.
- th3 php wr3nch -
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 570
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: How to insert image in directory using mySQL

 
0
  #3
Aug 28th, 2007
try the move_uploaded_file() function to save the file into your directory and create a variable that will create a path to your file in the directory that will be used to store the path in mysql.
it goes something like this..
<?
move_uploaded_file($_FILES['file']['tmp_name'],$newimage);
$ewan="../photoupload/";
$ewanko=$ewan . $newimage;
$query="insert into test1 set title='" .$_POST['textfield']. "',path='$ewanko',memid='$memid'";
mysql_query($query);
}
?>
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 8
Reputation: gotmick is an unknown quantity at this point 
Solved Threads: 0
gotmick gotmick is offline Offline
Newbie Poster

Re: How to insert image in directory using mySQL

 
0
  #4
Aug 30th, 2007
Originally Posted by web_master View Post
how do i insert a image into a directory through MySQL, rename it, generate a link and upload the generated link in MySQL......???

anyhelp will be really apprietiated....

and if its a tutorial its the best way out, i'm not good at PHP.....

plz its urgent for me..

thx alot..
I found a great tutorial to do this here: http://www.php-mysql-tutorial.com/up...ile-server.php

I figured out a lot from this site!
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 10
Reputation: flagbarton is an unknown quantity at this point 
Solved Threads: 0
flagbarton flagbarton is offline Offline
Newbie Poster

Re: How to insert image in directory using mySQL

 
0
  #5
Aug 31st, 2007
definitely base on your title you cant use mysql to move your file in the directory. but in php its posible, like ryan was posted..
and the use of mysql there is to save other information in the database
like Description, ImageName, Id, ForeignID etc..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 4394 | Replies: 4
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC