Hi guys, i have a question.
First off this is my table
CREATE TABLE vexour(
id int(11) NOT NULL auto_increment,
track_title varchar(50) NOT NULL default '',
band_name varchar(50) NOT NULL default '',
song_name varchar(50) NOT NULL default '',
song_url varchar(50) NOT NULL default '',
image_url varchar(50) NOT NULL default '',
band_url varchar(50) NOT NULL default '',
stars decimal(1,1) NOT NULL default '3',
PRIMARY KEY (id)
)
I want to start adding variables to it, so i decided in using a query to insert data,
Here is the code i came up with
<?php
$location = "localhost";
$username = "myname";
$password = "mypass";
$database = "program_program";
$conn = mysql_connect("$location","$username","$password");
if (!$conn) die ("Could not connect MySQL");
mysql_select_db($database,$conn) or die ("Could not open database");
$insert = "INSERT INTO vexour (id,track_title,band_name,song_name,song_url,image_url,band_ulr,stars)
VALUES ('2','title','band_name','test_song','test_url','test_image','test_band','3')";
mysql_query($insert) or die ("Could not add data to the table");
?>
to me it looks nearly flawless.....
But for some reasong i cant add the data, i get the die Could not add data to the table
Can anyone please help?
All help is greatly appriciated,
Thank you for your time
~Gabor Szauer