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


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">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
<title>اضافة الصور</title>


?><script type="text/javascript">

     window.location = "index.php";
     </script> <?php

if (isset($_POST[b1]))

    $img = $_FILES['uploaded']['name'];
    $imgfile = $_FILES['uploaded']['tmp_name'];
    $ext = end(explode(".",$img));
    $newimg = genRandomString().".".$ext;

    $m=new myclass();


<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="اضافة" />
  <table width="660px" style="border-color:#06F; margin-top:10px; border-style:none;">
      <th width="10%" >العمليات</th>
       <th width="20%">الصوره</th>
      <th width="15%">التصنيف</th>
      <th width="1%">الرقم</th>

   /* $show = new myclass();
    $show -> shownews();*/



Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.