In message <[EMAIL PROTECTED]> , HOPE 4 BEST <[EMAIL PROTECTED]> writes >hi, > >i think ur database is not getting connected. >try this - --- >$link = mysql_connect($hostname,$username, $password); >if(!$link) >{ > echo "couldnt connect to server"; >die(); >} >mysql_select_db($dbname,$link); >if(!$db) >{ >echo "database not found"; >die(); >}
Or you could have mysql_select_db($dbname,$link); if(!$db) { die( 'database not found' ); } Whilst your suggestion is good practice - it's a good idea to report *all* problems - it can't be the problem in this case, because teditkap said that the program got further than that. >> $query="INSERT INTO table1 (iid, title1, par1, par2, par3) VALUES >> ($vrb1,$vrb2,$vrb3,$vrb4,$vrb5)"; >> >mysql_query($query) or die (' I could not update the database'); > Much more likely to be the missing quotes around $vrb1, etc. You can insert numbers into a table without quotes, but you can't insert text. Incidentally, it could help you if you changed that die() to mysql_query($query) or die (mysql_error()); (see http://es.php.net/mysql_error) ... that way, you will be told what the error is. -- Pete Clark Sunny Andalucia http://hotcosta.com/Andalucia.Spain