G r e g L a w r i e wrote:
> It would also appear you are missing a closing ) at the end of the
> '$query=...' line. You have two opening backets and only one closing.
> 
> Greg
> 
> -----Original Message-----
> From: Bruce Lewis [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 4 June 2002 7:50
> To: [EMAIL PROTECTED]; mysql; php-general
> Subject: Re: stupid error, please kick me (and send me a solution)
> 
> 
> Your missing your closing "}" at the end of the else statement.
> 
> 
> ----- Original Message -----
> From: "Jule Slootbeek" <[EMAIL PROTECTED]>
> To: "mysql" <[EMAIL PROTECTED]>; "php-general"
> <[EMAIL PROTECTED]>
> Sent: Monday, June 03, 2002 5:09 PM
> Subject: stupid error, please kick me (and send me a solution)
> 
> 
> 
>>Hey guys,
>>i'm getting this error with the following sql script using php:
>>--error--
>>Warning: Supplied argument is not a valid MySQL-Link resource in
>>/var/www/phpquiz/register_user.php on line 12
>>--error--
>>
>>--script--
>>$link_glob = "mysql_connect('$host_glob', '$un_glob', '$pw_glob')";
>>$query = "INSERT INTO user values('0', '$fname', '$lname', '$email',
>>'$username', PASSWORD('$password')";
>>$result = mysql_db_query('$db_glob', '$query', $link_glob');
>>if (!$result) {
>>echo "<font size=+1>Your Information could not be entered into the
> 
> database,
> 
>>Please contact the <a
>>href=mailto:$webmaster>webmaster</a>.</font><br><br>" . mysql_errno() .
>>": " . mysql_error() . "<br><br>";
>>} else {
>>echo "<font size=+1>Your Information has successfully been entered into
> 
> the
> 
>>database!</font><br>";
>>
>>--
>>Jule Slootbeek
>>[EMAIL PROTECTED]
>>
>>http://blindtheory.cjb.net
>>
>>
>>
>>---------------------------------------------------------------------
>>Before posting, please check:
>>   http://www.mysql.com/manual.php   (the manual)
>>   http://lists.mysql.com/           (the list archive)
>>
>>To request this thread, e-mail <[EMAIL PROTECTED]>
>>To unsubscribe, e-mail
> 
> <[EMAIL PROTECTED]>
> 
>>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>>
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

$query = "INSERT INTO user values('0', '$fname', '$lname', '$email', 
'$username', PASSWORD('$password')";

that should be all closed shouldn't it?
my text editor colors code, and it doesn't show any mistakes..
thanks though
Jule

-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 
        


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to