I have a simple insert statement that should use $GLOBALS that has my connection string in. Problem is that it does not insert the data. Have I done this correctly?
Insert.php
<?php
require 'core/init.php';
$Name = $_REQUEST["Name"];
$Venue = $_REQUEST["Venue"];
$Category = $_REQUEST["Category"];
$query = "INSERT INTO bands (Name, Venue, Category)
VALUES ('$Name', '$Venue', '$Category')";
mysql_query ($query,$GLOBALS)
or die ("could not add to database");
echo("You have added: <br />");
$result = mysql_query("SELECT * FROM bands ORDER BY Band_id DESC LIMIT 1");
while($row = mysql_fetch_array($result))
{
echo $row['Name']. "" . $row['Venue']. "" . $row['Category'];
echo "<br />";
}
?>