开发者

Store images from mercury server into database

开发者 https://www.devze.com 2023-04-12 23:52 出处:网络
I\'ve created the following \'products\' table in database. There is a form which is used for entering product detail that will be stored in \'products\' table. The problem is when I\'am clicking the

I've created the following 'products' table in database. There is a form which is used for entering product detail that will be stored in 'products' table. The problem is when I'am clicking the 'Browse' button to select the image, it can't see an option to select image from server. Can any body help me?

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 va开发者_如何学编程lue="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>


why can't you post the data using POST and then handling it in the second form/script?

0

精彩评论

暂无评论...
验证码 换一张
取 消