RE: [PHP] Going blind? Plz hlp w/ parse error

2001-09-19 Thread Lawrence . Sheed

For a start use  
's

much easier to read

eg
$qry_1=select * from cust_info where username=\$username\;

should be

$qry_1=select * from cust_info where username='$username';


this looks like a guilty line -

$qry_2=insert into cust_info (username,password,mother) values 
($username,$password,$mother) or die (No query #2!);


possibly a change to -
 
$qry_2=insert into cust_info (username,password,mother) values 
('$username','$password','$mother');

$result=@mysql_query($qry_2,$connection) or die (No query # 2!);


may prove better for you.

Lawrence.
-Original Message-
From: Anthony Rodriguez [mailto:[EMAIL PROTECTED]]
Sent: September 20, 2001 12:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Going blind? Plz hlp w/ parse error


Please help! There is a parse error in like 10:

?php

// file: root/reg/add_2.php, updated: 08/25/01

$connection=@mysql_connect(localhost,afrodriguez,xxx) or die (No 
connection!);

$db=@mysql_select_db(sbwresearch,$connection) or die (No database!);

$qry_1=select * from cust_info where username=\$username\;

$result=@mysql_query($qry_1,$connection) or die (No query # 1!);

$row_1=@mysql_affected_rows();

if ($row_1==0)

{

   $qry_2=insert into cust_info (username,password,mother) values 
($username,$password,$mother) or die (No query #2!);

   $result=@mysql_query($qry_2,$connection);

   @mysql_free_result($result);

   @mysql_close($connection);

   echo 

   html

   etc.

Thank you!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Going blind? Plz hlp w/ parse error

2001-09-19 Thread Brian White

At 00:34 20/09/2001 -0400, Anthony Rodriguez wrote:
Please help! There is a parse error in like 10:

?php

// file: root/reg/add_2.php, updated: 08/25/01

$connection=@mysql_connect(localhost,afrodriguez,xxx) or die (No 
connection!);

$db=@mysql_select_db(sbwresearch,$connection) or die (No database!);

$qry_1=select * from cust_info where username=\$username\;

$result=@mysql_query($qry_1,$connection) or die (No query # 1!);

$row_1=@mysql_affected_rows();

if ($row_1==0)

{

   $qry_2=insert into cust_info (username,password,mother) values 
 ($username,$password,$mother) or die (No query #2!);

   $result=@mysql_query($qry_2,$connection);

You've got all muddled up . perhaps:

   $qry_2=insert into cust_info (username,password,mother) values 
(\$username\,\$password\,\$mother
);

   $result=@mysql_query($qry_2,$connection) or die (No query #2!);



   @mysql_free_result($result);

   @mysql_close($connection);

   echo 

   html

   etc.

Thank you!


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-
Brian White
Step Two Designs Pty Ltd - SGML, XML  HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Going blind? Plz hlp w/ parse error

2001-09-19 Thread ReDucTor

Which line is line 10?!?
- Original Message - 
From: Anthony Rodriguez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 20, 2001 2:34 PM
Subject: [PHP] Going blind? Plz hlp w/ parse error


 Please help! There is a parse error in like 10:
 
 ?php
 
 // file: root/reg/add_2.php, updated: 08/25/01
 
 $connection=@mysql_connect(localhost,afrodriguez,xxx) or die (No 
 connection!);
 
 $db=@mysql_select_db(sbwresearch,$connection) or die (No database!);
 
 $qry_1=select * from cust_info where username=\$username\;
 
 $result=@mysql_query($qry_1,$connection) or die (No query # 1!);
 
 $row_1=@mysql_affected_rows();
 
 if ($row_1==0)
 
 {
 
$qry_2=insert into cust_info (username,password,mother) values 
 ($username,$password,$mother) or die (No query #2!);
 
$result=@mysql_query($qry_2,$connection);
 
@mysql_free_result($result);
 
@mysql_close($connection);
 
echo 
 
html
 
etc.
 
 Thank you!
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]