Hi there, any help much appreciated, I am new to php/mysql although i have a solid understanding of javascript so scripting usually makes sense to me! I have been trying to do a tutorial, i have had success on a server i have access to, but not on my home based server, I have apache http server 2.2, mysql 5.0, php 5, along with phpmyadmin (working fine) and phpbuilder on evaluation (working fine done tutorials no sweat)
on home computer this works fine =
<?php
$user=" ";
$password=" ";
$database=" ";
mysql_connect('localhost',$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="CREATE TABLE contacts1 (id int(6) NOT NULL auto_increment,first varchar(15) NOT NULL,last varchar(15) NOT NULL,phone varchar(20) NOT NULL,mobile varchar(20) NOT NULL,fax varchar(20) NOT NULL,email varchar(30) NOT NULL,web varchar(30) NOT NULL,PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))";
mysql_query($query);
mysql_close();
?>
it creates the table no sweat! great everything is configured lol
but this =
<?php
$username=" ";
$password=" ";
$database=" ";
mysql_connect('localhost',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO 'contacts' VALUES ('','John','Smith','01234 567890','00112 334455','01234 567891','johnsmith@gowansnet.com','http://www.gowansnet.com')";
mysql_query($query);
mysql_close();
?>
runs with no errors, but no values are added?
like i said it worked fine on my websites server, but not on my home server? Im thinking there might be a php extension i am missing, but if phpmyadmin and phpmaker5 are working? Please help me out here, i know its probably somthing stupid lol
Chris๐
Chriss.