943,969 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 8230
  • PHP RSS
Aug 26th, 2007
0

How to insert image in directory using mySQL

Expand 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..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
web_master is offline Offline
28 posts
since Aug 2007
Aug 27th, 2007
0

Re: How to insert image in directory using mySQL

could u explain more
and in a little detail
Reputation Points: 18
Solved Threads: 9
Junior Poster
w_3rabi is offline Offline
160 posts
since Dec 2006
Aug 28th, 2007
0

Re: How to insert image in directory using mySQL

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);
}
?>
Reputation Points: 28
Solved Threads: 71
Posting Pro
ryan_vietnow is offline Offline
578 posts
since Aug 2007
Aug 30th, 2007
0

Re: How to insert image in directory using mySQL

Click to Expand / Collapse  Quote originally posted by web_master ...
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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gotmick is offline Offline
8 posts
since Aug 2007
Aug 31st, 2007
0

Re: How to insert image in directory using mySQL

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..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
flagbarton is offline Offline
10 posts
since Aug 2007
Jul 10th, 2010
0
Re: How to insert image in directory using mySQL
how to insert image into mysql database in php .............
pls give error free code..............,,,,,,,,,,,,,,,,,
Last edited by rahulsabari; Jul 10th, 2010 at 12:49 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rahulsabari is offline Offline
2 posts
since Jul 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: How To Send HTML Mail
Next Thread in PHP Forum Timeline: Website Construction PHP ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC