Yes I have made the admin section already.
When the administrator adds a art (product) to the site he is then ask if he would like to add an image for the art.
The art is stored on the server with a with Php and a Mysql database.
This is the code to add the art
<?php
if (isset($insertme))
{
$flag=1;
$errorcounter=1;
if($flag)
{
$result=mysql_query("
insert into arts(
artID,
name,
desc,
price,
size,
photo,
categoryID
)
values (
null,
'$name',
'$description',
'$price',
'$size',
'nothing',
$category
)") or die (mysql_error(). " : ".mysql_errno());
if ( ($result) != 1)
print "Sorry, Bad";
else
{
print "Art is added <br>";
$lastid=mysql_insert_id(); //upload image
if ($if_upload=="yes")
{
require "upload.php";
}
exit;
}
}
else //if $flag==0 it means we have errors
{
print "<font color=red><br><b>".($errorcounter-1)." Wrong. Try Again</b></font>";
}
}