⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addcat.php

📁 《PHP专业项目实例开发》源代码
💻 PHP
字号:
<html>
<head>
<title>Add category</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="350" border="0" align="center" cellpadding="0" cellspacing="0" height="277">
  <tr> 
    <td bgcolor="#000000" height="2"> 
      <div align="center"><b><font color="#FFFFFF">ADD CATEGORY</font></b></div>
    </td>
  </tr>
  <tr> 
    <td width="48%" height="121" bgcolor="#CCCCCC"> 
      <form name="form1" method="post" action="add.php?type=category">
        <table width="75%" border="0" align="center">
          <tr> 
            <td width="36%"><b> Name</b></td>
            <td width="64%"> 
              <div align="center"> 
                <input type="text" name="catname" size="20">
              </div>
            </td>
          </tr>
          <tr> 
            <td width="36%"><b>Description</b></td>
            <td width="64%"> 
              <div align="center"> 
                <input type="text" name="catdescription" size="20">
              </div>
            </td>
          </tr>
          <tr> 
            <td width="36%"><b> Parent Category</b></td>
            <td width="64%"> 
              <div align="center"> 
<?php
$host="";$username="root";$password="";$database="books";$x=mysql_connect($host,$username,$password);
$x1=mysql_select_db($database);
$query="select name,categoryid from category";
$result=mysql_query($query);

echo "                <select name=\"parentcategory\">";
echo "                 <option>Select Product Category</option>";
while($row=mysql_fetch_array($result))
{
echo "                 <option value=\"". $row["categoryid"]."\">".$row["name"] ." </option>";
}

?>
              </div>
            </td>
          </tr>
          <tr> 
            <td colspan="2"> 
              <div align="center"> 
                <input type="submit" name="Submit22" value="Submit">
              </div>
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -