将来自汞服务器的图像存储到数据库

时间:2011-10-15 06:43:11

标签: mysql html

我在数据库中创建了以下“产品”表。有一个表单用于输入将存储在“产品”表中的产品详细信息。问题是当我点击“浏览”按钮选择图像时,它无法看到从服务器选择图像的选项。任何人都可以帮助我吗?

CREATE TABLE products 
( product_id integer unsigned auto_increment PRIMARY KEY,
  category varchar(15) NOT NULL,        
  image varchar(25) NOT NULL,     
  description varchar(50) NOT NULL
);

   <form >
   Product Category:
   <select name="category" >
   <option value="rings">Rings</option>
   <option value="earrings">EarRings</option>
   <option value="pendants">Pendants</option>
   </select>
   Product Image<input type="file" name= "image" size="15" /> 
   Product Description:<input type="text" name= "description" size="15"/> 
   <input name="submit" type="button" onClick="newproduct ('newproduct.php','info',category.value,image.value,description.value)"  value = "Submit" /> 
  </form>

1 个答案:

答案 0 :(得分:0)

为什么不能使用POST发布数据然后以第二种形式/脚本处理它?<​​/ p>