PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
create table Category(
CategoryID int(20) not null AUTO_INCREMENT,
CategoryName varchar(100) not null,
Description varchar(255) not null,
primary key (CategoryID)
);
?>
Then i wan to upload the image for everytime i insert the new data into my table,what should i do? And also can delete the image when i delete the data at the same time...
Anyone who know that?
Just have a field of varchar(100) or whatever to store the image name, and leave the image on the filesystem as nature intended
When you are deleting the entry from the db you could first grab the image name, then delete the row from the db, then delete the image from the filesystem (maybe use http://php.net/unlink to do it).