In message <[EMAIL PROTECTED]>, Wade <[EMAIL PROTECTED]>
writes
>
>03142005 1437 GMT-6
>I was running some tests after my last posting and I have noticed that 
>Im not getting any connection to the db. Using this script - which I use 
>all the time for testing - Im not getting any result. I restarted the 
>db. Restarted mysql but still Im not making a connection other than 
>through control center.
>
>Wade
>
>$db_name = "test";
>$connection = mysql_connect("localhost", "master", "getalife") or 
>die("Connection error <br />" . mysql_error() );
>
>$db = mysql_select_db($db_name, $connection) or die ("DB selection error 
><br />" . mysql_error() );
>
>$sql = "INSERT INTO users (firstname, lastname, username, password) 
>VALUES (";
>$sql = " ' " . $firstname . " ' , " ;
You have =, not .= here.

>$sql.= " ' " . $lastname . " ' , " ;
>$sql.= " ' " . $username . " ' , " ;
>$sql.= " ' " . $password . " ' ) ";
>   
>$result = mysql_query($sql, $connection);

try and or die... here?

>
>echo "Result of Insert: $result";

-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com




The PHP_mySQL group is dedicated to learn more about the PHP_mySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to