[PHP] RE: parse error (close this one)

2007-05-04 Thread Brad Sumrall
Du!

It would have made sense to direct it to /phpbb/login.php

Not

/phpbb/index.php

 

I know, the keyboard and the chair!

 

Brad



[PHP] Re: Parse Error, Unexpected $

2004-07-19 Thread Jason Barnett
Did the error actually say Unexpected $end ?  That would mean that PHP hit the 
end of the script before it expected to, and could be caused by an unclosed string.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Parse Error, Unexpected $

2004-07-19 Thread Daniel Kullik
Hello.
Cannot find any unexpected dollar-sign ($) in this code.
But please enclose the associative array-indexes within quotation-marks 
and run your script again.

[code]
$foo = $_POST['assoc_index'];
[/code]
Daniel
Harlequin wrote:
I've checked my syntax but obviously missing something.
Would anyone mind a quick scan:
// Convert Values to Variables:
  $Title = $_POST[Title];
  $ChristianName = $_POST[ChristianName];
  $MiddleName = $_POST[MiddleName];
  $Surname = $_POST[Surname];
  $HomePhone = $_POST[HomePhone];
  $Address01 = $_POST[Address01];
  $Address02 = $_POST[Address02];
  $Address03 = $_POST[Address03];
  $City = $_POST[City];
  $Postcode = $_POST[Postcode];
  $Country = $_POST[Country];
  $Nationality = $_POST[Nationality];
  $Gender = $_POST[Gender];
  $WorkPermitRequired = $_POST[WorkPermitRequired];
  $MyStatus = $_POST[MyStatus];
// Dump Data Into MembersData:
  $UserDataDump = INSERT INTO MembersData (Title, ChristianName,
MiddleName, Surname, DOB, TelephoneHome, Address01, Address02, Address03,
AddressCity, AddressPostcode, AddressCountry, Nationality, Gender,
WorkPermit, Status)
VALUES('$Title','$ChristianName','$MiddleName','$Surname','$HomePhone','$Add
ress01','$Address02','$Address03','$City','$Postcode','$Country','$Nationali
ty','$Gender','$WorkPermitRequired','$MyStatus');
   mysql_query($UserDataDump) or die(Couldn't Create User Data Entry. MySQL
Error:  . mysql_error());

--
WWE e-commerce IT GmbH
Eiffestrasse 462, D-20537 Hamburg
Tel.: +49-40-2530659-0, Fax: +49-40-2530659-50
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Parse Error, Unexpected $

2004-07-19 Thread Craig Donnelly

Put all your values in the following {}...

So:

VALUES('{$Title}','{$ChristianName}','{$MiddleName}','{$Surname}'. and
so on.

HTH
Craig

Harlequin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I've checked my syntax but obviously missing something.

 Would anyone mind a quick scan:

 // Convert Values to Variables:
   $Title = $_POST[Title];
   $ChristianName = $_POST[ChristianName];
   $MiddleName = $_POST[MiddleName];
   $Surname = $_POST[Surname];
   $HomePhone = $_POST[HomePhone];
   $Address01 = $_POST[Address01];
   $Address02 = $_POST[Address02];
   $Address03 = $_POST[Address03];
   $City = $_POST[City];
   $Postcode = $_POST[Postcode];
   $Country = $_POST[Country];
   $Nationality = $_POST[Nationality];
   $Gender = $_POST[Gender];
   $WorkPermitRequired = $_POST[WorkPermitRequired];
   $MyStatus = $_POST[MyStatus];

 // Dump Data Into MembersData:
   $UserDataDump = INSERT INTO MembersData (Title, ChristianName,
 MiddleName, Surname, DOB, TelephoneHome, Address01, Address02, Address03,
 AddressCity, AddressPostcode, AddressCountry, Nationality, Gender,
 WorkPermit, Status)


VALUES('$Title','$ChristianName','$MiddleName','$Surname','$HomePhone','$Add

ress01','$Address02','$Address03','$City','$Postcode','$Country','$Nationali
 ty','$Gender','$WorkPermitRequired','$MyStatus');
mysql_query($UserDataDump) or die(Couldn't Create User Data Entry.
MySQL
 Error:  . mysql_error());

 -- 
 -
  Michael Mason
  Arras People
  www.arraspeople.co.uk
 -

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Parse Error, Unexpected $

2004-07-19 Thread Harlequin
Really sorry for taking up so many people's time on such a small issue.

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
Harlequin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I've checked my syntax but obviously missing something.

 Would anyone mind a quick scan:

 // Convert Values to Variables:
   $Title = $_POST[Title];
   $ChristianName = $_POST[ChristianName];
   $MiddleName = $_POST[MiddleName];
   $Surname = $_POST[Surname];
   $HomePhone = $_POST[HomePhone];
   $Address01 = $_POST[Address01];
   $Address02 = $_POST[Address02];
   $Address03 = $_POST[Address03];
   $City = $_POST[City];
   $Postcode = $_POST[Postcode];
   $Country = $_POST[Country];
   $Nationality = $_POST[Nationality];
   $Gender = $_POST[Gender];
   $WorkPermitRequired = $_POST[WorkPermitRequired];
   $MyStatus = $_POST[MyStatus];

 // Dump Data Into MembersData:
   $UserDataDump = INSERT INTO MembersData (Title, ChristianName,
 MiddleName, Surname, DOB, TelephoneHome, Address01, Address02, Address03,
 AddressCity, AddressPostcode, AddressCountry, Nationality, Gender,
 WorkPermit, Status)


VALUES('$Title','$ChristianName','$MiddleName','$Surname','$HomePhone','$Add

ress01','$Address02','$Address03','$City','$Postcode','$Country','$Nationali
 ty','$Gender','$WorkPermitRequired','$MyStatus');
mysql_query($UserDataDump) or die(Couldn't Create User Data Entry.
MySQL
 Error:  . mysql_error());

 -- 
 -
  Michael Mason
  Arras People
  www.arraspeople.co.uk
 -

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: parse error on fgets

2004-05-05 Thread Brian Muldown
[EMAIL PROTECTED] wrote:
Using PHP 4 with this code:
 if ($csvfile = fopen($csvpath, r)) {
 while (!feof ($csvfile))
  {
$filestring = fgets( $csvfile , 255);
  }
}
I get a parse error on the line :
$filestring = fgets( $csvfile , 255);
Any ideas why this is happening?
replacing it with fread also returns a  parse error.
Please reply to me directly as the digest takes awhile to get to me.
I don't get a parse error making a new document just with your code  (I 
did get an Undefined variable $cvspath - but that's only a NOTICE, and 
obviously not the problem you describe).

Are you certain you don't have an error above/below this code snip 
(maybe missing a trailing curly bracket somewhere)?

-brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Parse error: parse error, unexpected '='

2004-04-20 Thread Craig
?php

 $args = array(a,b,b);
 $keys = array(0,1,2);

 function array_key_remove($args,$keys,$replacement=NULL)
 {
  echo Foo!;
 }

?


Lasse Motroen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have received some code and am trying to run it. However, I get the
 following error:

 *Parse error*: parse error, unexpected '=', expecting ')'

 It happens on this line when $args=array() is reached:

 function array_key_remove($args=array(), $keys=array(),$replacement=NULL)

 I have php-4.2.2-17 and Apache 2.0.40 installed, and am runnig RedHat 9.
 What's wrong, please help.

 Regards,
 not-really-too-familiar-with-PHP

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Parse error, unexpected T_STRING!!

2004-03-05 Thread Brian V Bonini
On Thu, 2004-03-04 at 21:39, Andre Cerqueira wrote:
 ? is tag for php code start
 
 Enrique Martinez wrote:
  Hello, I'm getting an error that says: 
  
  Parse error, unexpected T_STRING on line 73
  
  line 73 is: ?xml version=1.0 encoding=iso-8859-1
  ?
  
  this is what I have below line 73:
  
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
  Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  html xmlns=http://www.w3.org/1999/xhtml;
  
  I have PHP-4.2.2, Apache 2.0 on RedHat Linux 9.0
  
  Any idea how can I fix the problem? Thanks in advance.

?php echo '?xml version=1.0 encoding=iso-8859-1?' . \r\n; ?


-- 
Brian V Bonini [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Parse error ???

2004-03-04 Thread Michael Nolan
Mike Mapsnac wrote:
The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Parse error ???

2004-03-04 Thread Mike Mapsnac
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open stream: 
Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:
The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
One-click access to Hotmail from any Web page – download MSN Toolbar now! 
http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Parse error ???

2004-03-04 Thread Michael Nolan
Is this what it actually looks like?

if(!move_uploaded_file($_FILES['myfile']['tmp_name
'],
/var/www/html/upload/)) {
die Error! Moving the uploaded file failed.;
If so, the files array shouldn't be like that.  It shouldn't be split 
onto two lines.  Try $_FILES['myfile']['tmp_name'].

Mike

Mike Mapsnac wrote:
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open 
stream: Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:

The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Parse error ???

2004-03-04 Thread Neil Freeman
If I remember correctly the second parameter of move_uploaded_file() 
needs to be the full filename, ie path plus required filename.

so...

if(!move_uploaded_file($_FILES['myfile']['tmp_name'],
(/var/www/html/upload/ . $_FILES['myfile']['name'])))
Neil

Mike Mapsnac wrote:

***
This Email Has Been Virus Swept
***
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open 
stream: Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:

The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
One-click access to Hotmail from any Web page  download MSN Toolbar 
now! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

--
--
 www.curvedvision.com
--
This communication is confidential to the intended recipient(s). If you are not that person you are not permitted to make use of the information and you are requested to notify the sender immediately of its receipt then destroy the copy in your possession. Any views or opinions expressed are those of the originator and may not represent those of Advanced System Architectures Ltd.

*** This Email Has Been Virus Checked ***

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Parse error ???

2004-03-04 Thread Mike Mapsnac
It works now.

I run the script as user mike and mike:mike is owner of the directory, when 
I upload something to directory the owner of the file is apache:apache.
Why the owner of the file is not mike ?

thanks

From: Neil Freeman [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED]
CC: [EMAIL PROTECTED],  [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:58:26 +
If I remember correctly the second parameter of move_uploaded_file() needs 
to be the full filename, ie path plus required filename.

so...

if(!move_uploaded_file($_FILES['myfile']['tmp_name'],
(/var/www/html/upload/ . $_FILES['myfile']['name'])))
Neil

Mike Mapsnac wrote:

***
This Email Has Been Virus Swept
***
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open stream: 
Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:

The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
One-click access to Hotmail from any Web page – download MSN Toolbar now! 
http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

--
--
 www.curvedvision.com
--
This communication is confidential to the intended recipient(s). If you are 
not that person you are not permitted to make use of the information and 
you are requested to notify the sender immediately of its receipt then 
destroy the copy in your possession. Any views or opinions expressed are 
those of the originator and may not represent those of Advanced System 
Architectures Ltd.

*** This Email Has Been Virus Checked ***

_
Frustrated with dial-up? Lightning-fast Internet access for as low as 
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Parse error ???

2004-03-04 Thread Sam Masiello

This is because the file is uploaded as the user running the web server
process; apache, in this case.

--Sam


Mike Mapsnac wrote:
 It works now.
 
 I run the script as user mike and mike:mike is owner of the
 directory, when 
 I upload something to directory the owner of the file is
 apache:apache. Why the owner of the file is not mike ? 
 
 thanks
 
 From: Neil Freeman [EMAIL PROTECTED]
 To: Mike Mapsnac [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED],  [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: Parse error ???
 Date: Thu, 04 Mar 2004 13:58:26 +
 
 If I remember correctly the second parameter of move_uploaded_file()
 needs to be the full filename, ie path plus required filename.
 
 so...
 
 if(!move_uploaded_file($_FILES['myfile']['tmp_name'],
 (/var/www/html/upload/ . $_FILES['myfile']['name'])))
 
 Neil
 
 Mike Mapsnac wrote:
 
 ***
 This Email Has Been Virus Swept
 ***
 
 brackets solve the probleb. But why I have the warning messages? The
 permission on the directory is correct. Any ideas what can cause
 such messages? 
 
 Warning: move_uploaded_file(/var/www/html/upload/): failed to open
 stream: Is a directory in /var/www/html/uploadproc.php on line 11
 
 Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to
 '/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
 Error Moving the uploaded file failed.
 
 
 From: Michael Nolan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Parse error ???
 Date: Thu, 04 Mar 2004 13:40:46 +
 
 Mike Mapsnac wrote:
 
 The script should upload files (images).
 
 Error message is give below, any ideas why I get this errror
 message? Parse error: parse error in /var/www/html/uploadproc.php
 on line 3 
 
 
 die() needs brackets around its arguments, eg:
 
 die(Error! The expected file wasn't a part of the submitted
 form); 
 
 
 Mike
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 _
 One-click access to Hotmail from any Web page - download MSN
 Toolbar now! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/
 
 
 --
 --
  www.curvedvision.com
 --
 
 
 This communication is confidential to the intended recipient(s). If
 you are not that person you are not permitted to make use of the
 information and you are requested to notify the sender immediately
 of its receipt then destroy the copy in your possession. Any views
 or opinions expressed are those of the originator and may not
 represent those of Advanced System Architectures Ltd. 
 
 *** This Email Has Been Virus Checked ***
 
 
 _
 Frustrated with dial-up? Lightning-fast Internet access for as low as
 $29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re[2]: [PHP] Re: Parse error ???

2004-03-04 Thread Richard Davey
Hello Mike,

Thursday, March 4, 2004, 6:16:17 PM, you wrote:

MM I run the script as user mike and mike:mike is owner of the directory, when
MM I upload something to directory the owner of the file is apache:apache.
MM Why the owner of the file is not mike ?

Because Apache is not running as mike and Apache owns the file the
browser is uploading.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Parse error, unexpected T_STRING!!

2004-03-04 Thread Andre Cerqueira
? is tag for php code start

Enrique Martinez wrote:
Hello, I'm getting an error that says: 

Parse error, unexpected T_STRING on line 73

line 73 is: ?xml version=1.0 encoding=iso-8859-1
?
this is what I have below line 73:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
I have PHP-4.2.2, Apache 2.0 on RedHat Linux 9.0

Any idea how can I fix the problem? Thanks in advance.



__
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster
http://search.yahoo.com
--
Andr Cerqueira


signature.asc
Description: OpenPGP digital signature


[PHP] Re: parse error with mysql_connect

2003-08-24 Thread Catalin Trifu
Hi,

The prototype for mysql_connect is:

resource mysql_connect ( [string server [, string username [, string
password [, bool new_link [, int client_flags ] )

As you can see you get parse error because the fourth argument
should be boolean, not string.

Cheers,
Catalin

35: // Initialize MySQL database
36: $h =
mysql_connect('localhost','localhost',constant(mysql_user),constant(mysql
_password));
37: mysql_select_db('mjec_mjecnet', $h);

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Parse error not understood

2003-08-14 Thread Ivo Fokkema
 //If Delete User is selected--
 if ( $_REQUEST['useroption'] == 'delete')
 {
 //First, check that the user already exists
 $query = select count(*) from pbpc_client where username = ' .
 $_REQUEST['usernamebox'] . ';;
 $result = mysql_query($query);
 if(!$result)
 {
 echo 'Cannot run query.';
 exit();
 }

 $count = mysql_result($result, 0, 0);
 if($count==0)
 {
 //User does not exist in the database
 header('location: user_not_exists.php');
 exit();

 header('location:del_new_user.php');
 exit();
 }
 //header('location: content.php');
 ?

 No matter which option I select I get the following output :
 --
 Parse error: parse error, unexpected $ in
 /var/www/html/Sessions/userman.php on line 83

 Line 83 is '?'..
You missed a '}' at lines :


if($count==0)
{
//User does not exist in the database
header('location: user_not_exists.php');
exit();

Add a '}' after this, and your problem is fixed!


--
Ivo Fokkema
PHP  MySQL programmer
Leiden University Medical Centre
Netherlands



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Parse error not understood

2003-08-14 Thread Chris Blake
Holy schmoley...something so small.I must get off this green tea,
all this good health stuff is causing havoc in my brain...

Thanks Fokkema, and Johnfor pointing out an obvious error...

Regards


On Wed, 2003-08-06 at 14:48, Fokkema, I.F.A.C. (HKG) wrote:
  //If Delete User is selected--
  if ( $_REQUEST['useroption'] == 'delete')
  {
  //First, check that the user already exists
  $query = select count(*) from pbpc_client where username = ' .
  $_REQUEST['usernamebox'] . ';;
  $result = mysql_query($query);
  if(!$result)
  {
  echo 'Cannot run query.';
  exit();
  }
 
  $count = mysql_result($result, 0, 0);
  if($count==0)
  {
  //User does not exist in the database
  header('location: user_not_exists.php');
  exit();
 
  header('location:del_new_user.php');
  exit();
  }
  //header('location: content.php');
  ?
 
  No matter which option I select I get the following output :
  --
  Parse error: parse error, unexpected $ in
  /var/www/html/Sessions/userman.php on line 83
 
  Line 83 is '?'..
 You missed a '}' at lines :
 
 
 if($count==0)
 {
 //User does not exist in the database
 header('location: user_not_exists.php');
 exit();
 
 Add a '}' after this, and your problem is fixed!
 
 
 --
 Ivo Fokkema
 PHP  MySQL programmer
 Leiden University Medical Centre
 Netherlands
-- 
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379

None of our men are experts.  We have most unfortunately found it
necessary 
to get rid of a man as soon as he thinks himself an expert -- because no
one 
ever considers himself expert if he really knows his job.  A man who
knows a 
job sees so much more to be done than he has done, that he is always
pressing 
forward and never gives up an instant of thought to how good and how
efficient 
he is.  Thinking always ahead, thinking always of trying to do more,
brings a 
state of mind in which nothing is impossible. The moment one gets into
the
expert state of mind a great number of things become impossible.
-- From Henry Ford Sr., My Life and Work, p. 86 (1922):


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Parse error not understood

2003-08-08 Thread Ivo Fokkema
Miles Thompson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Yes, I'm top posting, pls forgive.

 This is a situation where an editor which has built-in brace matching
 really helps - if in the midst of looking one remembers to use it.

 Another tip, although it probably wouldn't help here: Save the code with a
 .phps extension and look at it in the browser.
I always indent statements like this :

if (this) {
  do_this();
  if (that) {
do_that();
  }
}

It helps me 'see' the code and also it's easier to track missing braces. I
know people have their own coding style - I just find it easy for me.

--
Ivo



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Parse error not understood

2003-08-06 Thread Miles Thompson
Yes, I'm top posting, pls forgive.

This is a situation where an editor which has built-in brace matching 
really helps - if in the midst of looking one remembers to use it.

Another tip, although it probably wouldn't help here: Save the code with a 
.phps extension and look at it in the browser.

Cheers - Miles

At 02:59 PM 8/6/2003 +0200, Chris Blake wrote:
Holy schmoley...something so small.I must get off this green tea,
all this good health stuff is causing havoc in my brain...
Thanks Fokkema, and Johnfor pointing out an obvious error...

Regards

On Wed, 2003-08-06 at 14:48, Fokkema, I.F.A.C. (HKG) wrote:
  //If Delete User is selected--
  if ( $_REQUEST['useroption'] == 'delete')
 snip -- liked the Ford quote  

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: parse error, unexpected $end ...

2003-01-24 Thread Octavio Herrera
This is the source code

?
include(includes/encabezado_xml.php);
include(includes/conexion.php);

mysql_select_db(latinencounters);

$u_login=;
$u_pwd=;
if(isset($url_login)){
 $u_login=$url_login;  // parametro login del usuario
}
if(isset($url_pwd)){
 $u_pwd=$url_pwd;  // parametro password del usuario
}


$query=select * from usuarios_ws where login='$u_login' and
pwd=password('$u_pwd');
$rs=mysql_query($query,$enlace);
$filas=mysql_num_rows($rs);

if($filas==0){
 echo errormensajeYour Login or Password is
Incorrect/mensaje/error;
}else{

echo usuarios_ws\n;

for($a=0;$a$filas;$a++){
 $fila=mysql_fetch_array($rs);
 echo  usuario\n;
 echoid.$fila[id]./id\n;
 echoname.$fila[name]./name\n;
 echoborn.$fila[born]./born\n;
 echooccupation.$fila[occupation]./occupation\n;
 echocountry.$fila[country]./country\n;
 echocity.$fila[city]./city\n;
 echodescription.$fila[description]./description\n;
 echologin.$fila[login]./login\n;
 echo  /usuario\n;
}

$query=select * from perfil;
$rs=mysql_query($query,$enlace);
$filas=mysql_num_rows($rs);

$dominio=http://www.latinencounters.com/;;
for($a=0;$a$filas;$a++){
 $fila=mysql_fetch_array($rs);
 echo girl\n;
 echo  Codigo.$fila[Codigo]./Codigo;
 echo  FirstName.$fila[FirstName]./FirstName;
 echo  LastName.$fila[LastName]./LastName;
 echo  Height.$fila[Height]./Height;
 echo  Weight.$fila[Weight]./Weight;
 echo  Photo2$dominio.$fila[Photo2]./Photo2;
 echo  Photo3$dominio.$fila[Photo3]./Photo3;
 echo  Photo4$dominio.$fila[Photo4]./Photo4;
 echo  Photo5$dominio.$fila[Photo5]./Photo5;
 echo /girl\n;
}

echo /usuarios_ws\n;
mysql_close($enlace);
?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: parse error, unexpected $end ...

2003-01-24 Thread John W. Holmes
 ?
 include(includes/encabezado_xml.php);
 include(includes/conexion.php);
 
 mysql_select_db(latinencounters);
 
 $u_login=;
 $u_pwd=;
 if(isset($url_login)){
  $u_login=$url_login;  // parametro login del usuario
 }
 if(isset($url_pwd)){
  $u_pwd=$url_pwd;  // parametro password del usuario
 }
 
 
 $query=select * from usuarios_ws where login='$u_login' and
 pwd=password('$u_pwd');
 $rs=mysql_query($query,$enlace);
 $filas=mysql_num_rows($rs);
 
 if($filas==0){
  echo errormensajeYour Login or Password is
 Incorrect/mensaje/error;
 }else{

You don't have a closing brace for this.

 echo usuarios_ws\n;
 
 for($a=0;$a$filas;$a++){
  $fila=mysql_fetch_array($rs);
  echo  usuario\n;
  echoid.$fila[id]./id\n;
  echoname.$fila[name]./name\n;
  echoborn.$fila[born]./born\n;
  echooccupation.$fila[occupation]./occupation\n;
  echocountry.$fila[country]./country\n;
  echocity.$fila[city]./city\n;
  echodescription.$fila[description]./description\n;
  echologin.$fila[login]./login\n;
  echo  /usuario\n;
 }
 
 $query=select * from perfil;
 $rs=mysql_query($query,$enlace);
 $filas=mysql_num_rows($rs);
 
 $dominio=http://www.latinencounters.com/;;
 for($a=0;$a$filas;$a++){
  $fila=mysql_fetch_array($rs);
  echo girl\n;
  echo  Codigo.$fila[Codigo]./Codigo;
  echo  FirstName.$fila[FirstName]./FirstName;
  echo  LastName.$fila[LastName]./LastName;
  echo  Height.$fila[Height]./Height;
  echo  Weight.$fila[Weight]./Weight;
  echo  Photo2$dominio.$fila[Photo2]./Photo2;
  echo  Photo3$dominio.$fila[Photo3]./Photo3;
  echo  Photo4$dominio.$fila[Photo4]./Photo4;
  echo  Photo5$dominio.$fila[Photo5]./Photo5;
  echo /girl\n;
 }
 
 echo /usuarios_ws\n;
 mysql_close($enlace);
 ?

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Parse error

2003-01-14 Thread Brent Lee
Everything works great now. Thanks for the quick responses everyone.

Brent Lee [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm new to PHP and am slowly learning it. I have the following code that
is
 giving me errors could someone take a look and suggest a fix?

 Parse error: parse error in /home//public_html/Info/datain.php on
 line 7

 HTML
 ?php
 $db = mysql_connect(localhost, ,xx);
 mysql_select_db(learndb,$db);
 $sql = INSERT INTO personnel (firstname, lastname, nick, email, salary)
 VALUES ('$first','$last','$nickname',)
 $result = mysql_query'($sql);
 echo Thank you! Information entered.\n;
 ?
 /HTML




 --

 Thanks
 __
 Brent Lee





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: parse error

2003-01-03 Thread Greg Beaver
In addition to the other errors pointed out...

I assume you want a loop.  change

 while($row = mysql_fetch_array($response));

to

 while($row = mysql_fetch_array($response))
{

Take care,
Greg
--
phpDocumentor
http://www.phpdoc.org

   while($row = mysql_fetch_array($response));


   echo(p align=centerimg border=0
src=images/banner_chico_bio.jpg
 width=274 height=43/p);
   print img src=\  . $row[banner_nombre] . \;
   echo(div align=center);
   echo(center);
   echo(table border=1 width=500 height=25);
   echo(tr);
   echo(td width=500 height=25);
   echo(div align=left);
   echo(table border=0 width=125 height=27);
   echo(tr);
   echo(td width=125 height=27/td);
   echo(/tr);
   echo(/table);
   echo(/div);
   echo(p);

print($row[texto] .br\n);

   echo(/td);
   echo(/tr);
   echo(/table);
   echo(/center);
   echo(/div);
   }

 ?


 /div

 /html





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Parse error - new set of eyes?

2002-07-25 Thread Scott Fletcher

I had experienced similar problem like that in the past.  Part of it had to
do with the header() function.  Your script checked out fine, just like mine
did.  Try remarking the line of code where hte header is and see if you
don't have hte parse error, if this is the case then it's the header().
Jas [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am getting a parse error on line 14, I am trying to make sure session
vars
 are being set before rendering the page.  This is lines 12,13,14  15.
Any
 help is appreciated.
 Jas

 if ((!$u_name) || (!$p_word)){
  header(Location: index.php);
  session_destroy();
  exit; }
 /* Check for missing session vars */
 elseif ((!isset($HTTP_SESSION_VARS['clk']) ||
 (!isset($HTTP_SESSION_VARS['holy_cow']) ||
 (!isset($HTTP_SESSION_VARS['ipaddy']) || (!isset($HTTP_SESSION_VARS['a']))
{
  /* Begin logging of client info to database table since session vars are
 not present */
  require '/path/to/connection/class/db.php';





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Parse error

2002-07-22 Thread Kondwani Spike Mkandawire



 ?php
 If ('GET' == $HTTP_SERVER_VARS['REQUEST_METHOD']) {
   $MailToAddress = '[EMAIL PROTECTED]';
   $MailSubject = 'Get Involved List';
 ?

 ?php
   exit;
 }
 ?

You appear to be moving in and out of PHP Mode that could be pretty
tough to follow...  I've practically been looking at php Code 8 hours
a day for the past 3 months with a good deal of former CGI Scripting
experience and I'm still scared of learning this tactic...  However I have
never had to use it before so the circumstances may be different...

 ?
 If ('POST' == $HTTP_SERVER_VARS['REQUEST_METHOD']) {
   if (isset($HTTP_POST_VARS['email'])) {
 $MailFromAddress = $HTTP_POST_VARS['email'];  // I'm assuming the
 vars were posted from a form
   } else {
 $MailFromAddress = '[EMAIL PROTECTED]';  // vars don't expand in
 single quotes, but we don't have any here.
   }

   $Message = $HTTP_POST_VARS['Message']; // should single quote
 associative array indexes
   if (isset($HTTP_POST_VARS['Header'])) {
  $Message = $HTTP_POST_VARS['Header'] . \n\n$Message;  // need to
 wrap arrays in double quotes in {} to parse
   }

   if (isset($HTTP_POST_VARS['Footer'])) {
 $Message .= \n\n$HTTP_POST_VARS[Footer];
   }

   mail($MailToAddress,$MailSubject,$Message,$MailFromAddress); // don't
 have to quote vars on parms  } ?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Parse Error(newbie)

2002-05-29 Thread Kevin Lowe



Hi JJ,

Looks OK to me, could it be that youa re missing a semi colon ; or a brace } from a 
previous line, in this case PHP often reports the parse error as being the line where 
the next ; is?

EG 

$var1 = x

$var2 = y;

This will show an error on the second line.

KEvin 



Re: [PHP] Re: Parse Error(newbie)

2002-05-29 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Kevin Lowe declared
 Looks OK to me, could it be that youa re missing a semi colon ; or a brace } from a 
previous line, in this case PHP often reports the parse error as being the line where 
the next ; is?

Yep, that would be me guess: a missing brace higher up in the script (or
order of script) I'm always doing that!
- -- 
Nick Wilson // www.tioka.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE89NWyHpvrrTa6L5oRAn6RAJwIu/7YB40v45sixV6nai7TJKFrngCbBKwW
r2Rw1S22dMaCfZiijJ1EZ+4=
=1KIA
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Parse Error(Newbie)

2002-05-26 Thread David Robley

In article 003601c20541$fdc31970$0100a8c0@JohnH, [EMAIL PROTECTED] 
says...
 I know it is probably something obvious but the following gives me a parse error and 
as a newbie I am having trouble locating it.
 
 $query = select * from news WHERE id = $_get['id'];
 
 JJ Harrison
 [EMAIL PROTECTED]
 www.tececo.com
 

$query = select * from news WHERE id =  .$_get['id'];

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: parse error, mysql select

2002-04-01 Thread martinahingis

Error is absolute.
Don't use  (double quotation mark) in yur queries. Use ' (single quot.)
instead

$query = SELECT DATE_FORMAT( exp_date, '%W, %M  %d, %Y') AS thedate from
tifrequest where user='$user' limit 1,1;

Because the preprocessor think that your string is finished when it sees a
double quot.
And use a colorful editor. that helps u seeing errors like this. :)

martina


Robert McPeak [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 When I execute from browser I get a parse error, but when I enter the
 query directly into a MySQL command prompt I get a successful return.
 Can anybody see the problem with this code:

 $query = SELECT DATE_FORMAT( exp_date, %W, %M
 %d, %Y) AS thedate from tifrequest where user='$user' limit 1,1;


 Thanks!  My eyes are shot!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Parse Error

2001-10-29 Thread Valentin V. Petruchek

Try this:

var $VAL_ID;
var $VAL_TICKER;
var $VAL_ID_FEED;





-- 
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] Re: parse error AFTER end of included file??

2001-08-28 Thread James Holloway

Jaxon,

do you have a line of white space after your closing tag?

Anyway, this looks fishy to me:

if (!isset($page_id))
{
$sql=select page_id from table where fieldname = $value;
$link_id = mysql_connect($host, $usr, $pass) or die (mysql_error());
mysql_select_db($database, $link_id); //select database catalog
$result = mysql_query ($sql, $link_id) or die (mysql_error());
//return result set to php
if (!$result) echo wait - no result set!;

$page_id = mysql_result($result, 0, fieldname);

// Where is the closing } for if (!isset($page_id)){ ?
// added it below
}

I think you'd benefit from using braces more often too, so your style is
consistent. so changing

if (!$result) echo wait - no result set!;

to

if (!$result)
{
echo wait - no result set!;
}

might mean that you're able to spot things like this more easily.

Just my opinion ;)

James

Jaxon [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 Can anyone tell me why I have a parse error here?

 I'm including this file, which is 16 lines, but the error being thrown by
 the including page reports a parse error in this file on line 17 ???:
 ?php
 if (!isset($page_type))
 {
 $page_type = foo;
 }

 if (!isset($page_id))
 {
 $sql=select page_id from table where fieldname = $value;
 $link_id = mysql_connect($host, $usr, $pass) or die
(mysql_error());
 mysql_select_db($database, $link_id); //select database catalog
 $result = mysql_query ($sql, $link_id) or die (mysql_error());
 //return result set to php
 if (!$result) echo wait - no result set!;

 $page_id = mysql_result($result, 0, fieldname);
 ?

 cheers,
 jaxon




-- 
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]