To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 02 December 2004 16:49, Matthew Sims wrote:
So when using arrays with string keys within strings you need to
concatenate it.
$var = I live in the city of .
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 02 December 2004 13:22, Robert Sossomon wrote:
But what I don't understand is why sometimes
'$_POST[variable]' works and why
sometimes it will only work when it is
So when using arrays with string keys within strings you need to
concatenate it.
$var = I live in the city of . $_POST['cityname'];
No, you do not *need* to -- it is one option, certainly, but there is no
necessity about it.
Within double-quoted strings, it is perfectly acceptable to use
Parse error: parse error, expecting `']'' in file.php
I've been working on this script, and can't see why it fails here, but I have
another page that uses the same coding and it works correctly.
OK, here's the code:
$cart1 = ;
$cart1 =
Parse error: parse error, expecting `']'' in file.php
I've been working on this script, and can't see why it fails here, but I
have another page that uses the same coding and it works correctly.
OK, here's the code:
$cart1 = ;
$cart1 =
Parse error: parse error, expecting `']'' in file.php
I've been working on this script, and can't see why it fails here, but I
have
another page that uses the same coding and it works correctly.
OK, here's the code:
$cart1 = ;
$cart1 =
Robert Sossomon wrote:
Parse error: parse error, expecting `']'' in file.php
First, some minor nits with other posters :-)
1. While it's true that integer and string keys are handled differently in
some cases, it has absolutely no bearing when the array reference is
buried in a string.
2. The
GH wrote:
With the following code, I am getting the following message
Parse error: parse error, expecting `')'' in
/var/www/html/cert/admin_template.php on line 30
Line 30 Reads as follows:
foreach($admin_get_options_result as $api = $file, $desc)
Your syntax is incorrect on this
your naming scheme, as that might save time on any misspelled
variable names.
HTH
-Minuk
- Original Message -
From: GH [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Monday, October 11, 2004 1:48 AM
Subject: [PHP] Parse Error --- can not solve at this time... please assit
With the following code, I am getting the following message
Parse error: parse error, expecting `')'' in
/var/www/html/cert/admin_template.php on line 30
Line 30 Reads as follows:
foreach($admin_get_options_result as $api = $file, $desc)
Can any one please assist.
GH wrote:
Greetings...
I am getting a parse error (line 45) and I do not know what is causing it...
since I have the same code with minor changes nyc_ renamed to fed_ and
it works...
can someone please assit.
code is also available at http://www.phpaste.com/536
File:
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];
I see one problem, but not the one you are talking about.
// Convert Values to Variables:
$Title = $_POST[Title];
This (and the rest of the post fields) should have quotes:
$Title = $_POST[Title];
(php looks for a constant named Title, instead of the string Title)
What line gives you the
Jim
I deleted a whole load of lines and still get the error. I've narrowed it
down to this code:
?php
// Verify User Input:
echo brbrbr;
$requiredFields =
array('Title','ChristianName','Surname','HomePhone','Address01','City','Post
code','Country','Gender','WorkPermitRequired','MyStatus');
On Monday 19 July 2004 19:02, Harlequin wrote:
I deleted a whole load of lines and still get the error. I've narrowed it
down to this code:
Please read the syntax guide in the manual. Asking people to solve parse
errors for you is, IMHO, ludicrous.
--
Jason Wong - Gremlins Associates -
But the error (line 40) is actually the last line...! :|
You had a missing brace. When the error line is the last line (and especially
if error is Undefined $end) then you likely have a missing ending brace or
ending quote. Not trying to start a flame war here, but if you try a different
else
{
echo Hi...!;
?
You are missing a } at the end of the else. It should be:
else
{
echo Hi...!;
}
?
On Mon, 19 Jul 2004 12:02:47 +0100, Harlequin
[EMAIL PROTECTED] wrote:
Jim
I deleted a whole load of lines and still get the error. I've narrowed it
down to this code:
Hello,
Try adding the closing brace } to the last else
forEach($errors as $error)
{
echo $error . 'brbr';
}
}
else
{
echo Hi...!; --
hth
Jarratt
On Mon, 2004-07-19 at 12:02, Harlequin wrote:
Jim
I deleted a whole load of lines and still get the error. I've narrowed it
Thanks Jason.
I've started doing that - damn well have to with nested IF statements.
--
-
Michael Mason
Arras People
www.arraspeople.co.uk
-
Jason Barnett [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
But the error
I went with this, but am getting a parse error.
usort($authors, create_function('$a,$b','
$a = str_replace(array('é', 'à'), array('e', 'a'), $a);
$b = str_replace(array('é', 'à'), array('e', 'a'), $b);
return strcasecmp($a,$b);'));
Anyone see it? I've got headaches from
I'm sorry, I used unescaped single quotes inside single quoted string,
this is right:
usort($authors, create_function('$a,$b','
$a = str_replace(array(é, à), array(e, a), $a);
$b = str_replace(array(é, à), array(e, a), $b);
return strcasecmp($a,$b);'));
John
Sorry. Still getting a parse error on line 40:
39 usort($authors, create_function('$a,$b','
40 $a = str_replace(array('é', 'à'), array('e', 'a'), $a);
41 $b = str_replace(array('é', 'à'), array('e', 'a'), $b);
42 return strcasecmp($a,$b);'));
Can you have two arrays
Dunno the original question, but this obviously should be escaped...
So the correct code follows...
usort($authors, create_function('$a,$b','
$a = str_replace(array(\'é\', \'a\'), array(\'e\', \'a\'), $a);
$b = str_replace(array(\'é\', \'a\'), array(\'e\', \'a\'), $b);
return
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
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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Tuesday 20 Apr 2004 08:24, Lasse Motroen wrote:
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
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
//Upload.php (form)
form method=post action=uploadproc.php enctype=multipart/form-data
input type=file name=myfilebr /
[snip]
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
//uploadproc.php
if(!isset($_FILES['myfile'])) {
die Error! The expected file wasn't a part of the submitted form;
}
[/snip]
Try
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
What do you have before line 73?
On Thu, 2004-03-04 at 12:03, 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
This is what I have before line 73:
?php require_once('Connections/connTrio.php'); ?
?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = ,
$theNotDefinedValue = )
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) :
$theValue;
switch ($theType) {
case
Hey Mike, your wild guess worked great!! :) Thanks a lot, and Craig as
well.
--- Ford, Mike [LSS] [EMAIL PROTECTED] wrote:
On 04 March 2004 20:04, Enrique Martinez wrote:
Hello, I'm getting an error that says:
Parse error, unexpected T_STRING on line 73
line 73 is:
- Original Message -
From: Jay Blanchard [EMAIL PROTECTED]
To: Rolf van de Krol [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 9:06 AM
Subject: RE: [PHP] Parse Error
The error is:
Parse error: parse error, unexpected T_VARIABLE in
/www/htdocs/rolfvand
On Wed, 18 Feb 2004 21:35:15 -0800
Bob Eldred [EMAIL PROTECTED] wrote:
The error is:
Parse error: parse error, unexpected T_VARIABLE in
/www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46
[/snip]
All of your values are not enclosed with single quotes - the
first
four
are,
Since I replied only to Edwin.
- Original Message -
From: Bob Eldred [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 18, 2004 10:40 PM
Subject: Re: [PHP] Parse Error
Yes. Of course not. That wasn't the point. The point was that the
parse error isn't caused
Does anybody know what this error can meen?
Parse error: parse error, unexpected T_VARIABLE in
/www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46
What is a T_VARIABLE?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Rolf van de Krol wrote:
Does anybody know what this error can meen?
Parse error: parse error, unexpected T_VARIABLE in
/www/htdocs/rolfvand/thinkquest/browsercheck.php on line 46
What is a T_VARIABLE?
Could be an unclosed quote, or a number of other things. Post a few
lines around line 46 and we
More info about the parse error of my previous post:
The lines 45-46:
$mysql_query = INSERT INTO
sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,avail
height) ;
$mysql_query .=
VALUES('$sessionid','$ver','$agent','$bwinf',$scrwidth,$scrheight,$availwid
th,$availheight);
The
[snip]
More info about the parse error of my previous post:
The lines 45-46:
$mysql_query = INSERT INTO
sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,a
vail
height) ;
$mysql_query .=
VALUES('$sessionid','$ver','$agent','$bwinf',$scrwidth,$scrheight,$avai
lwid
[snip]
That's not the problem.
I want the last for values aren't enclosed with single quotation marks.
I think it's a weird problem.
This lines executed on the server of my ISP give this error.
The same lines executed on my server on my localhost (Apache 1.3.29, PHP
4.3.2, MySQL 3.? and Win2K)
Jay Blanchard wrote:
[snip]
More info about the parse error of my previous post:
The lines 45-46:
$mysql_query = INSERT INTO
sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,a
vail
height) ;
$mysql_query .=
Jay Blanchard wrote:
[snip]
More info about the parse error of my previous post:
The lines 45-46:
$mysql_query = INSERT INTO
sessions(sessionid,ver,agent,bwinf,screenwidth,screenheight,availwidth,a
vail
height) ;
$mysql_query .=
T_VARIABLE refers to a variable token (e.g. $foo) found in your file
when the PHP parser was expecting something else.
the very common typo; e.g.: (note the end of line 3 below)
?
$foo = 'hello world';
echo $foo
$bar = $foo;
?
PHP parser token overview:
http://www.phpbuilder.com/manual/tokens.php
Hello Raditha and all,
Thanks for the replies ... I reviewed all my code with Zend Studio and
the syntax was correct everywhere ... so I tried running the
application from the command line:
$ php donate.php
and it worked fine, so looking through the code we saw that there was a
short-tag in
Bruno,
This often occurs when there is no closing bracket } for a conditional
statement or a loop.
hth
Hugh
- Original Message -
From: Bruno Mattarollo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 2:51 AM
Subject: Re: [PHP] parse error, unexpected $
Parse
Hello,
I am having a strange problem with PHP and I can't really find a proper
answer, maybe someone have seen this before and can give me a hint.
I have a series of files (originally developed by another colleague)
installed on a server with PHP 4.2.2 and I get this error:
Parse error: parse
Hi Bruno,
The line number is misleading the error is generally above the line
that's reffered to. try commenting out sections of the code. If you have
an IDE it will be able to point out the error. If you don't have an IDE
some text editor that is capable of syntax highlighting will also help.
Error:
Parse error: parse error, expecting `']'' in
/usr/local/apache/htdocs/UP/index.php on line 871
Line 871:
mysql_query(INSERT INTO domainregistrations (domain,type,years,price)
VALUES
Perhaps it doesn't like the fact that you don't have quotes around your
array keys?
--Sam
Tyler Longren wrote:
Error:
Parse error: parse error, expecting `']'' in
/usr/local/apache/htdocs/UP/index.php on line 871
Line 871:
mysql_query(INSERT INTO domainregistrations
Sorry, should have mentioned that I tried quoting them already. That
gives a T_VARIABLES parse error.
Thanks for the reply,
Tyler
On Mon, 2003-12-22 at 12:30, Sam Masiello wrote:
Perhaps it doesn't like the fact that you don't have quotes around your
array keys?
--Sam
Tyler Longren
[snip]
Sorry, should have mentioned that I tried quoting them already. That
gives a T_VARIABLES parse error.
Thanks for the reply,
Tyler
[/snip]
What happens if you comment out the mysql statement and just echo the
variables?
echo $_POST[domainregister_domain$i]
Tyler Longren wrote:
Error:
Parse error: parse error, expecting `']'' in
/usr/local/apache/htdocs/UP/index.php on line 871
('$_POST[domainregister_domain$i]',
If you're going to be creating array keys like that, break out of the
string to do it.
(' . $_POST['domainregister_domain' . $i] . ', ...
Hi Matt,
I put this right above like 871:
print brbr$_POST[domainregister_domain$i]brbr;
So now that print line is 871. It produces the exact same error as
the mysql_query() line.
The reason I'm doin it like this is cuz I'm dynamically generating
forms, and lots of the fields are the same,
Doing this fixed it:
mysql_query(INSERT INTO domainregistrations (domain,type,years,price)
VALUES
('$_POST[domainregister_domain]$i','$_POST[domainregister_type]$i','$_POST[domainregister_years]$i','$_POST[domainregister_price]$i'));
I just moved the $i to the outside of the [] and it works now.
[snip]
I put this right above like 871:
print brbr$_POST[domainregister_domain$i]brbr;
So now that print line is 871. It produces the exact same error as
the mysql_query() line.
[/snip]
I should have mentioned this in my last email. You should try a
print_r of the $_POST array.
print pre;
Tyler Longren wrote:
Hi Matt,
I put this right above like 871:
print brbr$_POST[domainregister_domain$i]brbr;
So now that print line is 871. It produces the exact same error as
the mysql_query() line.
The reason I'm doin it like this is cuz I'm dynamically generating
forms, and lots of the
Hi Guys,
Sorry to trouble you on a saturday night (at least in The Netherlands...)..
Get a parse error on line 42, but i can't see what is causing the trouble. (Parse
error: parse error in /home/.sites/95/site92/web/admin/editreis.php on line 42)
if(is_array($_POST['accomodatieid'])) {
On Sat, 15 Nov 2003 22:38:07 +0100, you wrote:
Get a parse error on line 42, but i can't see what is causing the trouble. (Parse
error: parse error in /home/.sites/95/site92/web/admin/editreis.php on line 42)
if(is_array($_POST['accomodatieid'])) {
foreach($_POST['accomodatieid'] as $Key =
Frank Keessen wrote:
Hi Guys,
Sorry to trouble you on a saturday night (at least in The Netherlands...)..
Get a parse error on line 42, but i can't see what is causing the trouble. (Parse error: parse error in /home/.sites/95/site92/web/admin/editreis.php on line 42)
--- David Otton [EMAIL PROTECTED] wrote:
I can't be bothered to figure out a test case, but you apparently have
a SQL injection risk with your code. You're assuming that the data from
the client is correct.
This is a very good point. To highlight an example in the sample code you
provided
: Re: [PHP] Parse error?
--- David Otton [EMAIL PROTECTED] wrote:
I can't be bothered to figure out a test case, but you apparently have
a SQL injection risk with your code. You're assuming that the data from
the client is correct.
This is a very good point. To highlight an example
I'm trying to give PEAR a try and am currently following it's tutorial at:
http://pear.php.net/manual/en/package.database.db.intro-fetch.php
Now when I put this code into a PHP file I get a parse error on line 49
which has:
while ($row = $result-fetchRow()) {
I don't see what would cause the
On 9/5/03 1:50 PM, Mike Zornek [EMAIL PROTECTED] wrote:
I'm trying to give PEAR a try and am currently following it's tutorial at:
http://pear.php.net/manual/en/package.database.db.intro-fetch.php
Now when I put this code into a PHP file I get a parse error on line 49
which has:
while
Ok, the reason I was getting this error seems to be related to Safari on
OS X. When I copy code segments in Safari and paste them in BBEdit they
generally looked ok, although there were extra spaces inserted in some
places. I then turned on show invisible characters and it made it even
more clear
Hi,
I keep getting Parse Error on line 36, but I can't figure out why...
relevant code:
35: // Initialize MySQL database
36: $h =
mysql_connect('localhost','localhost',constant(mysql_user),constant(mysql
_password));
37: mysql_select_db('mjec_mjecnet', $h);
using PHP v. 4.3.2
Thanks,
Greetings learned PHP(eople);
My HTML :
--
input type=input class=input name=usernamebox value=Enter user
name../inputbr
input type=radio name=useroption value=addAdd User/inputbr
input type=radio name=useroption value=editEdit User/inputbr
input type=radio name=useroption
From: Chris Blake [EMAIL PROTECTED]
[snip]
//If Delete User is selected--
if ( $_REQUEST['useroption'] == 'delete')
{
[snip]
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
Hello,
my name is octavio, Im new to this news group,
I have a problem, Im getting the following error message:
Parse error: parse error, unexpected $end in
c:\appserv\www\octavio\user_data.php on line 63
What is this? I have looked all the source code and at the end of file there
is nothing
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);
Try this...
$sql = INSERT INTO personnel (firstname, lastname, nick, email, salary)
VALUES ('$first','$last','$nickname',);
- Original Message -
From: Brent Lee [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 10:02 AM
Subject: [PHP] Parse error
I'm new to PHP
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);
Hi!
I am receiving a parse error in the following code. The file is located at
http://www.historiadelpais.com.ar/ppal_bio.php
Anyone can help me?
Thanks!
Ezequiel
html
head
titleBiografias/title
/head
body background=images/StyleGreenMarble_Bg.jpg
?php
$db = mysql_connect(localhost,
On Friday 03 January 2003 10:27 am, Ezequiel Sapoznik wrote:
echo(p align=centerimg border=0 src=images/banner_chico_bio.jpg
width=274 height=43/p);
you have embedded double quotes inside a string delimited by double quotes.
use single quotes to delimit the string (since nothing inside is a
You need to esape your quotes in the HTML
as in
echo(table border=0 width=125 height=27);
should be
echo(table border=\0\ width=\125\ height=\27\);
Mike
*** REPLY SEPARATOR ***
On 02/01/2003 at 11:27 PM Ezequiel Sapoznik wrote:
Hi!
I am receiving a parse error in
Or, another option is to use single-quotes in the HTML:
echo(table border='0' width='125' height='27');
That way you can include variables in there if you see fit (since the
string itself is still double-quoted), and you don't have to worry about
escpaing the double-quotes.
-Dan
On Thu, 2
You have numerous errors in that code. Your DB connection line is
messed up, the username and password either need to be a quoted string,
a variable representing that string, or a constant. Your database
selection needs to be quoted. You need to escape out the double quotes
that you want to
;
}
?
-Original Message-
From: Stuart Dallas [mailto:stuart;stut.net]
Sent: Wednesday, October 30, 2002 11:29 AM
To: Andres, Cyrille
Cc: Jonathan Sharp; PHP List; php
Subject: Re: [PHP] parse error
On Wednesday, Oct 30, 2002, at 19:21 Europe/London, Andres, Cyrille
wrote:
thx, but I still have
Hello everybody,
maybe I am dumb , I dunnow, I have a parse error here and I don't understand
why :
$fp=fopen(temp/$userfile_name[$i-1],w+);
the error I get is : Parse error: parse error, expecting `']'' in
D:\Data\WebSSL\tm\RFP\upload2.php on line 61
THANX !!! :(((
try:
$fp = fopen('temp/'.$userfile_name[($i-1)], w+);
-js
Andres, Cyrille wrote:
Hello everybody,
maybe I am dumb , I dunnow, I have a parse error here and I don't understand
why :
$fp=fopen(temp/$userfile_name[$i-1],w+);
the error I get is : Parse error: parse error, expecting
thx, but I still have the same error
I think I have a poltergheist in my computer !!!
-Original Message-
From: Jonathan Sharp [mailto:js-lists;sharpmedia.net]
Sent: Wednesday, October 30, 2002 11:13 AM
To: Andres, Cyrille
Cc: PHP List; php
Subject: Re: [PHP] parse error
try:
$fp = fopen
11:13 AM
To: Andres, Cyrille
Cc: PHP List; php
Subject: Re: [PHP] parse error
try:
$fp = fopen('temp/'.$userfile_name[($i-1)], w+);
-js
Andres, Cyrille wrote:
Hello everybody,
maybe I am dumb , I dunnow, I have a parse error here and I don't
understand
why :
$fp=fopen(temp
PROTECTED]
To: Jonathan Sharp [EMAIL PROTECTED]
Cc: PHP List [EMAIL PROTECTED]; php [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 2:21 PM
Subject: RE: [PHP] parse error
thx, but I still have the same error
I think I have a poltergheist in my computer !!!
-Original Message-
From
++;
echo /td/tr
/tablebr;
}
?
-Original Message-
From: Stuart Dallas [mailto:stuart;stut.net]
Sent: Wednesday, October 30, 2002 11:29 AM
To: Andres, Cyrille
Cc: Jonathan Sharp; PHP List; php
Subject: Re: [PHP] parse error
On Wednesday, Oct 30, 2002, at 19:21 Europe/London, Andres
Hello!
My problem is a Parse Error in the last line of the script. I checked all
the brackets { and semicolons ; but I did`nt find any error.
Perhaps you can help me.
Cu
Thomas
Here is the Code:
?php
$_custom_enable_custom_auth = true;
$_custom_db_name = 'horde';
$_custom_db_host =
On Friday 16 August 2002 14:13, Thomas Meinke wrote:
Hello!
My problem is a Parse Error in the last line of the script. I checked all
the brackets { and semicolons ; but I did`nt find any error.
Perhaps you can help me.
Try matching up your '' and .
--
Jason Wong - Gremlins Associates -
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
Hi:
On Thu, Jul 25, 2002 at 02:40:28PM -0600, Jas wrote:
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.
The way you posted it here, it's hard to tell which line is which.
Layout your script
Ok, I noticed a couple things.
One: There's no } ending your elseif statement.
Two (and the big one): Why all the opening brackets before your isset()
functions? I'm not sure if you're trying to do some nested logic in there,
but if so it will be much more readable if you use nested if
elseif ((!isset($HTTP_SESSION_VARS['clk']) ||
(!isset($HTTP_SESSION_VARS['holy_cow']) ||
(!isset($HTTP_SESSION_VARS['ipaddy']) ||
(!isset($HTTP_SESSION_VARS['a']))
Your parenthesis don't match up, if I can count correctly today.
---John Holmes...
--
PHP General Mailing List
PHP 3.0 (I know I don't control it)
Getting Parse error on last line of code which is just html
Here is php code on page
?php
If ('GET' == $HTTP_SERVER_VARS['REQUEST_METHOD']) {
$MailToAddress = '[EMAIL PROTECTED]';
$MailSubject = 'Get Involved List';
?
?php
exit;
}
?
?
If
[snip]
Getting Parse error on last line of code which is just html
Here is php code on page ...
[/snip]
Check your curly braces, this is the most often cause of a last line error.
You either have too many or not enough.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To
On Tuesday 23 July 2002 00:32, Dean Ouellette wrote:
PHP 3.0 (I know I don't control it)
Getting Parse error on last line of code which is just html
mail($MailToAddress,$MailSubject,$Message,$MailFromAddress); // don't
have to quote vars on parms } ?
All right I've used the help that I've gotten before about this and edited this
function of code I have. Initially the code was meant to mail out a post to every
email that was listed in the database. The problem was that it sent all the emails in
the TO: section of the email. Now being
Dear Anonymous Person:
To solve your problems and get prompt, accurate, friendly help from this
list please...
1) Write readable code. By that I mean use nesting. That way we, and
might I add, you, can quickly understand the logic of your script.
2) Turn line wrapping on in your email
Sorry I was too sleepy to realize the Red and BOLD wouldn't come through on the list.
Here is the message again but I was smart enough this time to comment those section.
All right I've used the help that I've gotten before about this and edited this
function of code I have. Initially the
]
To: [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 7:53 PM
Subject: [PHP] Parse Error in my Mail Function -UPDATED
Sorry I was too sleepy to realize the Red and BOLD wouldn't come through on
the list. Here is the message again but I was smart enough this time to
comment those section.
All right I've used
On Fri, Jun 07, 2002 at 01:37:22PM -0400, Analysis Solutions wrote:
To solve your problems and get prompt, accurate, friendly help from this
list please...
Oh, and might I add
5) Don't repeatedly post your question to the list.
Geez,
--Dan
--
PHP classes that make web
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then Anti-Blank declared
now I am getting a parse error on lines 30. Included are the original
Which is line 30?
- --
Nick Wilson // www.explodingnet.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
the small details of reading the error message.
Anti-Blank
- Original Message -
From: Analysis Solutions [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 12:37 PM
Subject: Re: [PHP] Parse Error in my Mailing Code
Dear Anonymous Person:
To solve your problems
.;}
- Original Message -
From: Chris Knipe [EMAIL PROTECTED]
To: Anti-Blank [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 12:40 PM
Subject: Re: [PHP] Parse Error in my Mail Function -UPDATED
The problem being now I am getting a parse error on lines 30.
Line 29, 30, and 31
101 - 200 of 366 matches
Mail list logo