You are missing ;’s at the end of your lines.
<?php
$conn = mysql_connect(localhost, root, usbw);
mysql_select_db ('veiling');
$bid = $_GET['bod'];
$name = $_GET['naam'];
$item = $_GET['item'];
$maxbid = mysql_query("SELECT MAX(bod) FROM veiling WHERE item=1");
$maxbid = mysql_fetch_array($maxbid);
if( $bid =< $maxbid[0] )
{
die();
}
else
{
mysql_query("INSERT INTO veiling (bod, naam, item) VALUES ($bid, $name, $item)");
// You should escape the parameters with mysql_real_escape_string.
// SQL
echo 'Gefeliciteerd '$name', het bod op item ' $item ' van €' $bid 'is succesvol toegevoegd';
}
?>
This code should work.
You should also note that the mysql_* functions are deprecated as of PHP 5.5. I reccomend you use PDO instead.
0
solved PHP doesn’t get HTML Form values