I am using this html form page...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

 <title>Item Entry - Opulentworx - Private</title>



<form action="/itemENTRY.php" method="post" id="itemENTERdb">
<input type="text" id="itemNUM"/>Item #<br>
<input type="text" id="quant"/>Quantity<br>
<input type="text" id="date"/>Date<br>
<input type="text" id="cost"/>Cost<br>
<input type="text" id="ground"/>UPS Ground<br>
<input type="text" id="3day"/>3 Day UPS<br>
<input type="text" id="2day"/>2 Day UPS<br>
<input type="text" id="nextDAY"/>Next Day UPS<br>
<input type="text" id="salesTAX"/>Sales Tax<br>
<input type="text" id="dFEE"/>Design Fee<br>
<input type="text" id="pFEE"/>Print Fee<br>
<input type="text" id="markUP"/>Mark-UP<br>
<input type="text" id="subTOT"/>Sub-Total<br>
<input type="text" id="flTAX"/>FL Tax<br>
<input type="submit" value="Save Date"/>
<input type="reset" value="Reset Date"/>


and this php file to insert into my database...

$link = mysql_connect("mysql","user","xxxxxxx");
$sql="INSERT INTO info (itemNUM, quant, date, cost, ground, 3day, 2day, nextDAY, salesTAX, dFEE, pFEE, markUP, subTOT, flTAX) 
VALUES ('$_POST["itemNUM"]', '$_POST["quant"]', '$_POST["date"]', '$_POST["cost"]', '$_POST["ground"]', '$_POST["3day"]', '$_POST["2day"]', '$_POST["nextDAY"]', '$_POST["salesTAX"]', '$_POST["dFEE"]', '$_POST["pFEE"]', '$_POST["markUP"]', '$_POST["subTOT"]', '$_POST["flTAX"]')";



Nothing happens. Can someone please help me. I am new to PHP and I desperately need to get my database functional for my business.



You've defined the SQL statement as $sql, but now you need to actually do something with it. You need to call the function mysql_query with $sql as an argument.



Optionally you can use

$result = mysql_query($sql);

In this case you don't really need to hold the output of the function as a variable but it's a good habit to get into.

Thank you very much! I like this site already.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.