I want to introduce categories in Jump menu These categories are stored in the database is the way to do it I have tried but this does not work
<?php
session_start();
include("myclass.class.php");
function genRandomString() {
$length = 10;
$characters = '0123456789abcdefghijklmnopqrstuvwxyz';
$string = "";
for ($p = 0; $p < $length; $p++) {
$string .= $characters[mt_rand(0, strlen($characters))];
}
return $string;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
<title>اضافة الصور</title>
</head>
<body>
<?php
if(!isset($_SESSION[username]))
{
?><script type="text/javascript">
window.location = "index.php";
</script> <?php
}
if (isset($_POST[b1]))
{
$image=$_POST['uploaded'];
$categories=$_POST['jumpMenu'];
///uploaded
$img = $_FILES['uploaded']['name'];
$imgfile = $_FILES['uploaded']['tmp_name'];
$ext = end(explode(".",$img));
$newimg = genRandomString().".".$ext;
copy($imgfile,".../images/".$newimg);
$m=new myclass();
$m->addImage($newimg,$categories);
}
?>
<div align="center" style="width:900px;height:1000px;background-color:#d9d9d9;margin-left:250px;margin-top:0px;
border-radius:5px 5px 5px 5px;color:#114b8f;text-align:right;">
<div style="float:right; width:80px ; margin-right:100px;"> <?php include("cpmenu.php");?> </div>
<div style="float:left; margin-top:20px; margin-left:20px;">
<?php while($row=mysql_fetch_array($res))
{
$strSQL = "SELECT Categoriesname FROM categories ORDER BY ID";
$m = $m+1;?>
<fieldset style=" border-color:#06F; width:630px;"> <legend>اضافة صور</legend>
<form action="addimage.php" method="post" enctype="multipart/form-data" name="form">
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option><?php echo $row[Categoriesname]; }?></option>
<p> <input name="uploaded" type="file" />:أضـف صـورة <br />
<input name="b1" type="submit" value="اضافة" />
</select>
</fieldset>
<table width="660px" style="border-color:#06F; margin-top:10px; border-style:none;">
<tr>
<th width="10%" >العمليات</th>
<th width="20%">الصوره</th>
<th width="15%">التصنيف</th>
<th width="1%">الرقم</th>
</tr>
<?php
/* $show = new myclass();
$show -> shownews();*/
?>
</table>
</form>
</div>
</div>
</body>
</html>