Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP & MySQL

Name: wowzor 2013-05-30 10:45

im making e-commerce and im having issue to add from dropmenu value 0 or 1 (availability) into my database. when i try send that query it save all datas except availability. thanks for any advice
            <select name="dostupnost">
              <option selected="selected">Vyberte možnost</option>
              <option value="1">Skladem</option>
              <option value="0">Není skladem</option>
            </select>

    if(isset($_POST["name"])) {
      require "connect.php";
      $name=$_POST["name"];
      $price=$_POST["price"];
      $quantity=$_POST["quantity"];
      $availability=$_POST["availability"];
      $describe=$_POST["describe"];
      $regex = '/[0-9]+/'; //Only numbers

      $sql = "INSERT INTO products (name, describe, price, quantity, date_added, availability) VALUES (\"$name\", \"$describe\", \"$price\", \"$quantity\", NOW(), \"availability\")";
      //$echo $sql;
      $ok = mysql_query($sql) or die (mysql_error());

Name: Anonymous 2013-05-30 10:55

>>4
That's no excuse for not knowing Latin.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List