Hi,
I have created some php so that when users upload an image file, the php creates a folder (with a unique name using the 'time' function) & places the image (with the same timestamp as name + the file extension) inside the folder, so that the file will end up with a filepath of something like:
images\1293734948\1293734948.gif
The creation of the folder & file work fine but I am really struggling to write the filepath to sql database
//folder name will take the name generated by 'time'
$image_shtname=time();
//filename will take the name generated by 'time' + file extension
$image_name=time().'.'.$extension;
//here i am trying to create a new variable called $dbpicname to store the
//filepath in my database. The variable should be made up of:
//the images folder + backslash + new folder + backslash + filename
$dbpicname = 'images '\ . $image_shtname . \ . $image_name';
The problem is that no matter what combination of . and quote marks I use I either get an sql syntax error or the names but with the '\'s missing or the literal variable names written out.
Any help on the proper syntax of the line would be greatly apreciated.
Thanks a lot
Col