Image upload database reference - image name row ID
Posted: Wed Feb 16, 2005 7:01 pm
Hi all,
I have the following table structure:-
I want to have a form in which i can fill in the fields for the database table above. And also select a picture to upload to a directory and automaticlly add a reference to the table (ive been told this is better than storing the image inside the table itself). I want it so when the image is uploaded to the directory the image reference is added to the database and the image name is changed to the specific row ID of the table.
How would i do this, can anyone help me because im stuck?
Thanks alot
Jim
feyd | please use formatting tags when posting code
I have the following table structure:-
Code: Select all
CREATE TABLE `sales` (
`SaleID` int(5) NOT NULL auto_increment,
`Title` varchar(255) NOT NULL default '',
`Image_Ref` varchar(255) NOT NULL default '',
`Description` text NOT NULL,
`Date` date NOT NULL default '0000-00-00',
PRIMARY KEY (`SaleID`),
FULLTEXT KEY `Description` (`Description`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;How would i do this, can anyone help me because im stuck?
Thanks alot
Jim
feyd | please use formatting tags when posting code