Jump to content

newFreakHiba

Members
  • Posts

    3
  • Joined

  • Last visited

newFreakHiba's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yess. It's working now. Thank you Jessica.
  2. This is what I'm getting as an error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order (pid, bid, price, pname, dateoforder, quantity) VALUES ('pr000005','cl0000' at line 1 SQL: INSERT INTO order (pid, bid, price, pname, dateoforder, quantity) VALUES ('pr000005','cl000002','2499','Augi Quest ','2013-05-17','1') I tried all the combinations of syntax(by removing or adding these '') but still don't know what to do? it's not adding the type of inputs are all compatible I don't see any contradictions.
  3. hello i am totally new to php am trying to send data to my table in sql and data isnt sent! $ind=0; // Create connection $con=mysqli_connect("localhost","root","","orders"); // Check connection if (mysqli_connect_errno($con)){echo "Failed to connect to MySQL: " . mysqli_connect_error();} while($ind<$_SESSION['index']) { $tempdate=date("Y-m-d"); $buyer=$_SESSION['views'][0]; $pid=$_SESSION['productids'][$ind]; $pname=$_SESSION['productbought'][$ind]; $price=$_SESSION['price'][$ind]; $q=$_SESSION['quantityofeachproduct'][$ind]; $sql="INSERT INTO order (pid, bid, price, pname, dateoforder, quantity) VALUES ('$pid','$buyer','$price','$pname','$tempdate','$q')"; mysqli_query($con, $sql); var_dump($sql); $ind++;
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.