Re: [PHP] syntax error

2008-07-21 Thread Eric Butera
On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote: On a system with php4 and mysql 4.x I had these lines: require(../db-config); // includes $dbhost, $buname, $dbpass $db = mysql_connect($dbhost, $dbuname, $dbpass); mysql_select_db($dbname,$db); $sql = SELECT

Re: [PHP] syntax error

2008-07-21 Thread Aschwin Wesselius
Eric Butera wrote: On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote: On a system with php4 and mysql 4.x I had these lines: require(../db-config); // includes $dbhost, $buname, $dbpass $db = mysql_connect($dbhost, $dbuname, $dbpass);

Re: [PHP] syntax error

2008-07-21 Thread Eric Butera
On Mon, Jul 21, 2008 at 7:55 AM, Aschwin Wesselius [EMAIL PROTECTED] wrote: Eric Butera wrote: On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote: On a system with php4 and mysql 4.x I had these lines: require(../db-config); // includes $dbhost, $buname, $dbpass

Re: [PHP] syntax error

2008-07-21 Thread Aschwin Wesselius
Eric Butera wrote: On Mon, Jul 21, 2008 at 7:55 AM, Aschwin Wesselius [EMAIL PROTECTED] wrote: Probably the mysql extension is not found or not loaded (due to not being compiled with the right path or the default path in PHP is not the right one). Happened to me a couple of times. --

Re: [PHP] syntax error

2008-07-21 Thread Eric Butera
On Mon, Jul 21, 2008 at 8:32 AM, Aschwin Wesselius [EMAIL PROTECTED] wrote: Oh my. I'm so sorry. You're absolutely right. I mixed these two. I'm a bit side-tracked today. Thanks for pointing that out. -- Aschwin Wesselius It's no problem, I got scared I was spreading propaganda!

Re: [PHP] syntax error

2008-07-21 Thread Daniel Brown
On Mon, Jul 21, 2008 at 7:24 AM, Ronald Wiplinger [EMAIL PROTECTED] wrote: Try this: $result = mysql_query($sql,$db) or die(mysql_error()); -- /Daniel P. Brown Better prices on dedicated servers: Intel 2.4GHz/60GB/512MB/2TB $49.99/mo. Intel 3.06GHz/80GB/1GB/2TB $59.99/mo. Dedicated

Re: [PHP] syntax error

2008-07-21 Thread Daniel Brown
Please keep replies on list for all to benefit and be able to assist. On Mon, Jul 21, 2008 at 5:47 PM, Ronald Wiplinger [EMAIL PROTECTED] wrote: On Tue, Jul 22, 2008 at 1:51 AM, Daniel Brown [EMAIL PROTECTED] wrote: Try this: $result = mysql_query($sql,$db) or die(mysql_error());

[PHP] syntax of sprintf

2008-05-20 Thread Sudhakar
until i started using the techniques for avoiding sql injection, i have been using a normal insert and select sql query which worked fine. i have a registration page where a user enters their username and if this already exists i display a message by executing a select query and if the username

Re: [PHP] syntax of sprintf

2008-05-20 Thread Chris
the select query is $selectqueryusername = sprintf(Select username from individuals where username='%s', mysql_real_escape_string($username)); The syntax is fine. $result = mysql_query($selectqueryusername); if (!$result) { echo Error! *** . mysql_error(); } also for insert query if

[PHP] syntax of sprintf

2008-05-18 Thread Sudhakar
until i started using the techniques for avoiding sql injection, i have been using a normal insert and select sql query which worked fine. i have a registration page where a user enters their username and if this already exists i display a message by executing a select query and if the username

Re: [PHP] syntax of sprintf

2008-05-18 Thread Ólafur Waage
Try this one $sSQL = sprintf(SELECT username FROM individuals WHERE username='%s', mysql_real_escape_string($username)); $query = mysql_query($sSQL); if($query !== false) { // do something } 2008/5/18 Sudhakar [EMAIL PROTECTED]: until i started using the techniques for avoiding sql injection, i

[PHP] Syntax error, where?

2007-05-22 Thread jekillen
Hello again; In my frustration and laziness (tired of probing around to solve syntax errors that are not obvious) I have encountered the following error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in path removed groups_proc.php on line 585 The two lines immediately

[PHP] Syntax error, where? solved

2007-05-22 Thread jekillen
Hello again; (Blush); I was looking at the wrong line. Somehow the line numbers changed on me and the error was actually at a suspect line that I had changed. But the file that was giving the error was a file that was not updated. Now it works, I was trying to do $list_length -1 in the middle of

[PHP] syntax question

2007-03-26 Thread Ross
Can I put post values directly into insert statements? $query = INSERT INTO categories (category_name) VALUES ('$_POST['cat_name']); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] syntax question

2007-03-26 Thread cajbecu
Ross wrote: Can I put post values directly into insert statements? $query = INSERT INTO categories (category_name) VALUES ('$_POST['cat_name']); Yes you can, but it is not secure to do that! use (insecure): $query = INSERT INTO categories (category_name) VALUES

Re: [PHP] syntax question

2007-03-26 Thread Brad Bonkoski
Ross wrote: Can I put post values directly into insert statements? $query = INSERT INTO categories (category_name) VALUES ('$_POST['cat_name']); Yes, although this is not recommended. What is someone puts a single quote in there? Or some other bad characters otherwise... 2

Re: [PHP] syntax question

2007-03-26 Thread tedd
At 3:59 PM +0100 3/26/07, Ross wrote: Can I put post values directly into insert statements? $query = INSERT INTO categories (category_name) VALUES ('$_POST['cat_name']); Open to sql injection. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP

Re: [PHP] syntax question

2007-03-26 Thread Richard Lynch
On Mon, March 26, 2007 9:59 am, Ross wrote: Can I put post values directly into insert statements? $query = INSERT INTO categories (category_name) VALUES ('$_POST['cat_name']); Sure! If you want your webserver to get hacked by the Bad Guys, just go right ahead and do that. [that was

Re: [PHP] syntax question

2007-03-26 Thread itoctopus
Escape it, use either htmlentities (with ENT_QUOTES) or addslashes. -- itoctopus - http://www.itoctopus.com Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, March 26, 2007 9:59 am, Ross wrote: Can I put post values directly into insert statements? $query =

[PHP] Syntax Error

2007-01-07 Thread JD
Can someone help me figure out why I can't run this on MySQL. I get a syntax error. list($qh,$num) = dbQuery(SELECT password AS passwd1, $DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 . FROM $USER_TABLE WHERE username='$username'); $data = dbResult($qh); -- PHP General Mailing List

Re: [PHP] Syntax Error

2007-01-07 Thread Chris
JD wrote: Can someone help me figure out why I can't run this on MySQL. I get a syntax error. list($qh,$num) = dbQuery(SELECT password AS passwd1, $DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 . FROM $USER_TABLE WHERE username='$username'); $data = dbResult($qh); You've already

Re: [PHP] Syntax Error

2007-01-07 Thread Chris
bruce wrote: chris... sure there is.. alot of people don't subscribe to other lists. if you're one who does, simply ignore his post. And if the poster looked at either of the responses he received and replied to the questions asked, then he'd get a much better response.

Re: [PHP] syntax error help

2006-08-21 Thread Richard Lynch
Older version of MySQL does not support subselects. On Sun, August 20, 2006 5:18 am, Bigmark wrote: Can anyone tell me why this works on my localhost but gets an error on my server: ?php $sql = SELECT COUNT(*) FROM leaderboard WHERE points =( SELECT points FROM leaderboard WHERE

[PHP] syntax error help

2006-08-20 Thread Bigmark
Can anyone tell me why this works on my localhost but gets an error on my server: ?php $sql = SELECT COUNT(*) FROM leaderboard WHERE points =( SELECT points FROM leaderboard WHERE username= '$username' ); $result = mysql_query( $sql ) or die ( mysql_error() ); $rank = mysql_result( $result, 0 );

Re: [PHP] syntax error help

2006-08-20 Thread Paul Scott
On Sun, 2006-08-20 at 18:18 +0800, Bigmark wrote: Can anyone tell me why this works on my localhost but gets an error on my server: Try quote your identifiers. SELECT COUNT(*) FROM `leaderboard` WHERE `points` =( SELECT `points` FROM `leaderboard` WHERE `username` = '$username' ); --Paul

Re: [PHP] syntax error help

2006-08-20 Thread chris smith
On 8/20/06, Bigmark [EMAIL PROTECTED] wrote: Can anyone tell me why this works on my localhost but gets an error on my server: ?php $sql = SELECT COUNT(*) FROM leaderboard WHERE points =( SELECT points FROM leaderboard WHERE username= '$username' ); $result = mysql_query( $sql ) or die (

RE: [PHP] syntax error help

2006-08-20 Thread Peter Lauri
@lists.php.net Subject: [PHP] syntax error help Can anyone tell me why this works on my localhost but gets an error on my server: ?php $sql = SELECT COUNT(*) FROM leaderboard WHERE points =( SELECT points FROM leaderboard WHERE username= '$username' ); $result = mysql_query( $sql ) or die

[PHP] syntax highlighting for Shell scripts and C?

2006-05-25 Thread Michelle Konzack
Hello, since I include source sniplets into some of my webpages I like this syntax highlighting for php scripts... because it make scripts more readable. My question is: Does such thing exist for Shell scripts and C? (It would be realy nice) Thanks Michelle Konzack -- Linux-User

Re: [PHP] syntax highlighting for Shell scripts and C?

2006-05-25 Thread Chris
Michelle Konzack wrote: Hello, since I include source sniplets into some of my webpages I like this syntax highlighting for php scripts... because it make scripts more readable. My question is: Does such thing exist for Shell scripts and C? pastebin.com has it and the code is GPL'ed so

RE: [PHP] syntax highlighting for Shell scripts and C?

2006-05-25 Thread Daevid Vincent
Check out Geshi http://qbnz.com/highlighter/ -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, May 25, 2006 5:54 PM To: Michelle Konzack Cc: PHP - General Subject: Re: [PHP] syntax highlighting for Shell scripts and C? Michelle Konzack wrote: Hello

[PHP] Syntax to call a class' methods in your own class

2006-05-24 Thread Graham Anderson
What is the correct syntax for calling methods from other classes into your own class ? Example: Calling the ADODB class with: $this-conn=ADONewConnection('mysql'); This works: $rs= $this-conn-GetAll(SELECT title FROM content WHERE page_id= ?, $id); This fails: while

RE: [PHP] Syntax to call a class' methods in your own class

2006-05-24 Thread Brady Mitchell
This works: $rs= $this-conn-GetAll(SELECT title FROM content WHERE page_id= ?, $id); You can't iterate through an array like you are trying to do. Using the GetAll() function returns an array, you have to use the Execute() function to be able to iterate through $rs like you are trying to

Re: [PHP] Syntax to call a class' methods in your own class

2006-05-24 Thread Graham Anderson
thanks :) that helps g On May 24, 2006, at 3:19 PM, Brady Mitchell wrote: This works: $rs= $this-conn-GetAll(SELECT title FROM content WHERE page_id= ?, $id); You can't iterate through an array like you are trying to do. Using the GetAll() function returns an array, you have to use the

[PHP] Syntax Oddity

2006-05-02 Thread Richard Lynch
Does anybody have a rational explanation for what purpose in life the following syntax is considered acceptable? ?php $query = UPDATE whatever SET x = 1; $query; ? Note that the line with just $query; on it doesn't, like, do anything. I suppose in a Zen-like sort of way, it exists and all,

Re: [PHP] Syntax Oddity

2006-05-02 Thread Martin Alterisio
2006/5/2, Richard Lynch [EMAIL PROTECTED]: Does anybody have a rational explanation for what purpose in life the following syntax is considered acceptable? ?php $query = UPDATE whatever SET x = 1; $query; ? Note that the line with just $query; on it doesn't, like, do anything. I suppose

Re: [PHP] Syntax Oddity

2006-05-02 Thread Dave Goodchild
Hmmm. The only time I ever use anything remotely like that is in a loop or other code are where I don't want anything to happen ie for ($foo=0;$foo=10;$foo++) { On 02/05/06, Martin Alterisio [EMAIL PROTECTED] wrote: 2006/5/2, Richard Lynch [EMAIL PROTECTED]: Does anybody have a rational

Re: [PHP] syntax checking?

2005-11-23 Thread Bing Du
Bing Du wrote: Jay Blanchard wrote: [snip] How should PHP syntax be checked before execution? Anything similar to what option -c does in Perl? % perl -c test.pl [/snip] from the command line /usr/local/bin/php -i myScript.php [/snip] Ooops, sorry, should be an ell l /usr/local/bin/php

RE: [PHP] syntax checking?

2005-11-23 Thread Jay Blanchard
[snip] Even with error_reporting set to E_ALL in php.ini, I still get 'Errors parsing file.php' using the php command with the -l option. Anyway to see more than that? [/snip] Here are some command line options http://us2.php.net/features.commandline You could run it in a browser to get line

Re: [PHP] syntax checking?

2005-11-23 Thread Bing Du
it in a browser to get line numbers and more precise error messages Just found out this web based PHP syntax checking tool http://www.meandeviation.com/tutorials/learnphp/php-syntax-check/, it helped me find the problem. Pretty nice. Bing -- PHP General Mailing List (http://www.php.net

RE: [PHP] syntax checking?

2005-11-23 Thread Jay Blanchard
[snip] Just found out this web based PHP syntax checking tool http://www.meandeviation.com/tutorials/learnphp/php-syntax-check/, it helped me find the problem. Pretty nice. [/snip] Nice find. Tried it and it works pretty well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] syntax checking?

2005-11-23 Thread John Nichel
Jay Blanchard wrote: [snip] Just found out this web based PHP syntax checking tool http://www.meandeviation.com/tutorials/learnphp/php-syntax-check/, it helped me find the problem. Pretty nice. [/snip] Nice find. Tried it and it works pretty well. I get this when I try to check a php

[PHP] syntax checking?

2005-11-22 Thread Bing Du
Hi, How should PHP syntax be checked before execution? Anything similar to what option -c does in Perl? % perl -c test.pl Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] syntax checking?

2005-11-22 Thread Jay Blanchard
[snip] How should PHP syntax be checked before execution? Anything similar to what option -c does in Perl? % perl -c test.pl [/snip] from the command line /usr/local/bin/php -i myScript.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] syntax checking?

2005-11-22 Thread Jay Blanchard
[snip] How should PHP syntax be checked before execution? Anything similar to what option -c does in Perl? % perl -c test.pl [/snip] from the command line /usr/local/bin/php -i myScript.php [/snip] Ooops, sorry, should be an ell l /usr/local/bin/php -l myScript.php -- PHP General Mailing

Re: [PHP] syntax checking?

2005-11-22 Thread Bing Du
Jay Blanchard wrote: [snip] How should PHP syntax be checked before execution? Anything similar to what option -c does in Perl? % perl -c test.pl [/snip] from the command line /usr/local/bin/php -i myScript.php [/snip] Ooops, sorry, should be an ell l /usr/local/bin/php -l myScript.php

[PHP]PHP Syntax Notation

2005-09-27 Thread Lowell Herbert
I'm trying to expand my understanding of PHP by looking at some pre- built code modules. I don't fully understand the syntax $site-Run (); in the following code. Can someone offer a helpful explanation? ?php //define(PB_CRYPT_LINKS , 1); define(_LIBPATH,./lib/); require_once _LIBPATH .

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread Larry E. Ullman
I'm trying to expand my understanding of PHP by looking at some pre- built code modules. I don't fully understand the syntax $site-Run (); in the following code. Can someone offer a helpful explanation? ?php //define(PB_CRYPT_LINKS , 1); define(_LIBPATH,./lib/); require_once _LIBPATH .

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread Mikey
Lowell Herbert wrote: I'm trying to expand my understanding of PHP by looking at some pre- built code modules. I don't fully understand the syntax $site-Run (); in the following code. Can someone offer a helpful explanation? ?php //define(PB_CRYPT_LINKS , 1); define(_LIBPATH,./lib/);

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread Lowell Herbert
On Sep 27, 2005, at 2:16 PM, Mikey wrote: Lowell Herbert wrote: I'm trying to expand my understanding of PHP by looking at some pre- built code modules. I don't fully understand the syntax $site-Run (); in the following code. Can someone offer a helpful explanation? ?php

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread Jasper Bryant-Greene
Lowell Herbert wrote: Thanks for all the responses. I understand that $site is an instance of the class CSite, and that Run() is a function in that class. I do not understand what the operater - means, and what meaning the result of the function Run() has to $site. Clarification

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread A.J. Brown
Lowell, The - operator was taken from the pointer operator in C. It's used to access a method or variable within an INSTANCE of an object, as opposed to the :: operator, which is used to access a static method of a class. Note the difference between a class and an object -- an object is an

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread Lowell Herbert
On Sep 27, 2005, at 4:19 PM, Jasper Bryant-Greene wrote: Lowell Herbert wrote: Thanks for all the responses. I understand that $site is an instance of the class CSite, and that Run() is a function in that class. I do not understand what the operater - means, and what meaning the

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread Andy Pieters
Hi As a complement to the answers you have had here I wish to ammend the following. The Run in the example is a function, and because this function is inside a Class object, it is called a method. A class is a set of variables (properties) and functions (methods) that you can create

[PHP] syntax for multiple boolean

2005-08-27 Thread Ross
I want to check if multiple fields are empty and want to find the best shorthand way to do it. What are the rules with brackets in PHP. if (empty ($fname){ //do something } if (empty ($sname){ //the same thing } if (empty ($address){ //do the same ting again } R. -- PHP General

Re: [PHP] syntax for multiple boolean

2005-08-27 Thread sub
] To: php-general@lists.php.net Sent: Saturday, August 27, 2005 10:42 AM Subject: [PHP] syntax for multiple boolean I want to check if multiple fields are empty and want to find the best shorthand way to do it. What are the rules with brackets in PHP. if (empty ($fname){ //do something

Re: [PHP] syntax for two comparison operators

2005-08-25 Thread Richard Lynch
On Wed, August 24, 2005 6:10 pm, Jordan Miller wrote: Is there a technical reason why PHP does not allow comparison operator expressions like the following: if (2 $x = 4) {} 2 $x = 4 is a valid expression already. 2 $x is evaluated first, and returns true/false true/false is compared

Re: [PHP] syntax for two comparison operators

2005-08-25 Thread Jordan Miller
Good to know about expression evaluation. Writing the expression(s) like that (left-to-right and right-to-left) solves my dilemma... thanks! Jordan On Aug 25, 2005, at 2:44 AM, Richard Lynch wrote: I personally would use: ((2 $x) ($x = 4)) -- PHP General Mailing List

[PHP] syntax for two comparison operators

2005-08-24 Thread Jordan Miller
General question, Is there a technical reason why PHP does not allow comparison operator expressions like the following: if (2 $x = 4) {} I prefer this concise way as it is common for mathematics expressions, and much easier to grasp physically on first glance. From what I can tell,

Re: [PHP] syntax for two comparison operators

2005-08-24 Thread Philip Hallstrom
Is there a technical reason why PHP does not allow comparison operator expressions like the following: if (2 $x = 4) {} I prefer this concise way as it is common for mathematics expressions, and much easier to grasp physically on first glance. From what I can tell, this expression can

[PHP] syntax highlighting your php code on a web page

2005-08-03 Thread Steve Turnbull
Hi Is there a class or some code out there which enables you to print your PHP code to a web page and make it appear with syntax highlighting? As an example of what I am after, have a look here; http://www.phpfreaks.com/phpmanual/page/function.ldap-add.html Please note this is just an example

RE: [PHP] syntax highlighting your php code on a web page

2005-08-03 Thread Jay Blanchard
[snip] Is there a class or some code out there which enables you to print your PHP code to a web page and make it appear with syntax highlighting? As an example of what I am after, have a look here; http://www.phpfreaks.com/phpmanual/page/function.ldap-add.html Please note this is just an

Re: [PHP] syntax error, unexpected T_STRING

2005-07-18 Thread Matthew Weier O'Phinney
* George B [EMAIL PROTECTED] : Jim Moseby wrote: I am trying to connect to a datbase: mysql_select_db ('database') or die (couldnt connect to databse) What is wrong here? This is the error: Parse error: syntax error, unexpected T_STRING in file name on line 12

RE: [PHP] syntax error, unexpected T_STRING

2005-07-18 Thread Jim Moseby
Thanks JM! It was another one of my usual mistakes :P Forgot the semicolon. I don't underestand why you have to put in so many semicolons... Hmm.. Is it a thing from C or something? When I see that T_STRING error, missing semicolon is the first thing I look for. I don't know the history

[PHP] syntax error, unexpected T_STRING

2005-07-18 Thread George B
I am trying to connect to a datbase: mysql_select_db ('database') or die (couldnt connect to databse) What is wrong here? This is the error: Parse error: syntax error, unexpected T_STRING in file name on line 12 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] syntax error, unexpected T_STRING

2005-07-18 Thread Jim Moseby
I am trying to connect to a datbase: mysql_select_db ('database') or die (couldnt connect to databse) What is wrong here? This is the error: Parse error: syntax error, unexpected T_STRING in file name on line 12 -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] syntax error, unexpected T_STRING

2005-07-18 Thread John Nichel
George B wrote: I am trying to connect to a datbase: mysql_select_db ('database') or die (couldnt connect to databse) What is wrong here? This is the error: Parse error: syntax error, unexpected T_STRING in file name on line 12 Are either one of those lines, line 12? -- John C.

Re: [PHP] syntax error, unexpected T_STRING

2005-07-18 Thread George B
Jim Moseby wrote: I am trying to connect to a datbase: mysql_select_db ('database') or die (couldnt connect to databse) What is wrong here? This is the error: Parse error: syntax error, unexpected T_STRING in file name on line 12 -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Syntax Coloring

2005-05-17 Thread Burhan Khalid
and for the automatic highlighting of .phps files. For your console needs, you would need to find an editor that supports PHP highlighting. Almost all unix based editors do. For example, vim does PHP syntax highlighting, as I'm sure Emacs has a mode that does this too (I don't use emacs

[PHP] Syntax Coloring

2005-05-16 Thread hima
Hi all, I am trying to apply syntax coloring to my source code as I type it in unix shell. I work on a mac machine. How do I achieve this. In the php.ini file I see these following lines commented out. ; Colors for Syntax Highlighting mode. Anything that's acceptable in ; font color=??

[PHP] Syntax Highlighting variables not appearing

2005-02-28 Thread Tom Whitbread
Can anyone explain why this is happening. I am using the following code For giving code examples on my website with syntax highlighting $text = 'lt;?php \$my_code = echo 'text text text text'; \$foo = 'bar';; example_function(\$my_code); ?gt'; $body = preg_replace('/lt;(.*?)gt;/es',

Re: [PHP] Syntax Highlighting variables not appearing

2005-02-28 Thread Richard Lynch
Tom Whitbread wrote: Can anyone explain why this is happening. I am using the following code For giving code examples on my website with syntax highlighting $text = 'lt;?php \$my_code = echo 'text text text text'; \$foo = 'bar';; example_function(\$my_code); ?gt'; This is not a valid PHP

Re: [PHP] Syntax highlighting of odd language

2004-11-08 Thread Aaron Gould
M. Sokolewicz wrote: Now, the problem with such a solution is the following. Imagine you have the following keywords: include require in of typof now, when you replace include with span class=highlightedinclude/span, it'll go on, and also replace all instances of in, so you'll end up with

Re: [PHP] Syntax Limitation - dynamic static member access

2004-11-08 Thread Jake Press
Hi all, Just to let everyone know - I've reported this as a bug. http://bugs.php.net/bug.php?id=30716 Fingers crossed :) Yours Sincerely Jake Press -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Syntax problem - dynamic static member access

2004-11-07 Thread Curt Zirzow
You've just hijacked this thread. Please start a new message instead of replying to a message and changing the subject to talk about something else. Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Syntax Limitation - dynamic static member access

2004-11-07 Thread Jake Press
Oops, sorry :( I accidentally hi-jacked another thread. Here are the relevant posts for anyone thats reading: - http://news.php.net/php.general/201395 - http://news.php.net/php.general/201403 - http://news.php.net/php.general/201405 - http://news.php.net/php.general/201410 -

Re: [PHP] Syntax Limitation - dynamic static member access

2004-11-07 Thread Curt Zirzow
* Thus wrote Jake Press: Oops, sorry :( I accidentally hi-jacked another thread. Thanks for taking notice :) Here are the relevant posts for anyone thats reading: - http://news.php.net/php.general/201395 - http://news.php.net/php.general/201403 - http://news.php.net/php.general/201405

[PHP] Syntax problem - dynamic static member access

2004-11-06 Thread Jake Press
Hello All, I am having an interesting syntax problem. :( I have been battling this little bugger for the last week and a half, I have exhausted google and numerous php channels in that time. I am starting to beleive it could be a syntax that is sofar un-documented or an unclear syntax

[PHP] Syntax highlighting of odd language

2004-11-05 Thread Aaron Gould
Could any of you privide some leads in regard to highlighting syntax of an odd language? I have a large amount of snippits of legacy code from our company's primary application. The code used is BBx (a variant of Basic). I'm attempting to show this code on a web page, but with highlighting of

Re: [PHP] Syntax highlighting of odd language

2004-11-05 Thread Bruno B B Magalhães
Aaron, why don't you use a very simle sintax like this one: $code = 'function what() { do oddname; %oddsyntax }'; function highlight_code($code) { $oddsyntax = array('oddsyntax','oddsyntax2','oddsyntax3'); for($i = 0; $i = count($oddsyntax)-1; $i++) { $highlighted_code =

Re: [PHP] Syntax highlighting of odd language

2004-11-05 Thread Aaron Gould
Bruno B B Magalhães wrote: $code = 'function what() { do oddname; %oddsyntax }'; function highlight_code($code) { $oddsyntax = array('oddsyntax','oddsyntax2','oddsyntax3'); for($i = 0; $i = count($oddsyntax)-1; $i++) { $highlighted_code = eregi_replace($oddsyntax[$i],'spam

Re: [PHP] Syntax highlighting of odd language

2004-11-05 Thread M. Sokolewicz
Aaron Gould wrote: Bruno B B Magalhães wrote: $code = 'function what() { do oddname; %oddsyntax }'; function highlight_code($code) { $oddsyntax = array('oddsyntax','oddsyntax2','oddsyntax3'); for($i = 0; $i = count($oddsyntax)-1; $i++) { $highlighted_code =

[PHP] syntax questoin

2004-09-16 Thread Victor C.
Hi, I just started with PHP. (I used to work on ASP a lot) What does the syntax .= do? i see a line of code that says $Msg .= Test is complete I'm thinking it means concatenate $Msg with Test is complete and then store the new string into $Msg Am I right? Thanks. -- PHP General Mailing

RE: [PHP] syntax questoin

2004-09-16 Thread Jay Blanchard
[snip] $Msg .= Test is complete I'm thinking it means concatenate $Msg with Test is complete and then store the new string into $Msg Am I right? [/snip] Yes. You might see $Msg = (no concatenator) somewhere above it in the code...we code long SQL statements and things like e-mail bodies using

Re: [PHP] syntax questoin

2004-09-16 Thread Matt M.
$Msg .= Test is complete I'm thinking it means concatenate $Msg with Test is complete and then store the new string into $Msg Am I right? you are correct, same as: $Msg = $Msg.Test is complete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] syntax questoin

2004-09-16 Thread John Nichel
Victor C. wrote: Hi, I just started with PHP. (I used to work on ASP a lot) What does the syntax .= do? i see a line of code that says $Msg .= Test is complete I'm thinking it means concatenate $Msg with Test is complete and then store the new string into $Msg Am I right? Thanks. It does

[PHP] Syntax Help, Please

2004-06-15 Thread Steve Douville
I've forgotten how to assign something like this... $someStr = EOF bunch of raw non-echo'd html EOF; But can't seem to get the right syntax. Tried looking in the manual, but don't even know what I'm looking for! TIA, Steve

RE: [PHP] Syntax Help, Please

2004-06-15 Thread Rick Fletcher
I've forgotten how to assign something like this... $someStr = EOF bunch of raw non-echo'd html EOF; But can't seem to get the right syntax. Tried looking in the manual, but don't even know what I'm looking for! You're looking for a heredoc.

Re: [PHP] Syntax Help, Please

2004-06-15 Thread janet
In a message dated 6/15/2004 10:20:59 AM Pacific Daylight Time, [EMAIL PROTECTED] writes: I've forgotten how to assign something like this... $someStr = EOF bunch of raw non-echo'd html EOF; But can't seem to get the right syntax. Tried looking in the manual, but don't even know what

Re: [PHP] Syntax Help, Please

2004-06-15 Thread Robin Vickery
On Tue, 15 Jun 2004 13:20:24 -0400, Steve Douville [EMAIL PROTECTED] wrote: I've forgotten how to assign something like this... $someStr = EOF bunch of raw non-echo'd html EOF; But can't seem to get the right syntax. Tried looking in the manual, but don't even know what I'm

[PHP] Syntax error (missing operator) in query expression

2004-04-15 Thread AgfTech Lists
Hi All Following is the INSERT statement I am executing, snip INSERT INTO customer (email, password, handle, fname, lname, company, tax_id, addr1, addr2, city, state, zipcode, country, dayphone, evephone, fax, paymethod, cardname, cardnum, expmonth,expyear ,ship_addr1, ship_addr2,ship_city

Re: [PHP] Syntax error (missing operator) in query expression

2004-04-15 Thread Curt Zirzow
* Thus wrote AgfTech Lists ([EMAIL PROTECTED]): Hi All Following is the INSERT statement I am executing, snip INSERT INTO customer (email, password, handle, fname, lname, company, tax_id, addr1, addr2, city, state, zipcode, country, dayphone, evephone, fax, paymethod, cardname,

Re: [PHP] Syntax error (missing operator) in query expression

2004-04-15 Thread Marek Kilimajer
This answers it all: http://sk.php.net/addslashes#28429 AgfTech Lists wrote: Hi All Following is the INSERT statement I am executing, snip INSERT INTO customer (email, password, handle, fname, lname, company, tax_id, addr1, addr2, city, state, zipcode, country, dayphone, evephone, fax,

Re: [PHP] Syntax error (missing operator) in query expression

2004-04-15 Thread AgfTech Lists
Got it from there! Thanks! Regards Aman On Thu, 2004-04-15 at 18:27, Marek Kilimajer wrote: This answers it all: http://sk.php.net/addslashes#28429 AgfTech Lists wrote: Hi All Following is the INSERT statement I am executing, snip INSERT INTO customer (email, password,

[PHP] syntax for printing multi-dimensional arrays

2004-03-23 Thread Bob Pillford
Hi all I am having problems printing members of an array that has two dimensions and am wondering if someone can help me with the syntax required to do this. If i have the follwing code: ?php $test=array('test1'='a','test2'='b'); print $test[test1]; ? I get 'a' echoed to the screen as

[PHP] syntax for printing multi-dimensional arrays

2004-03-23 Thread Bob Pillford
Just found the answer so please disregard this. Cheers Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] syntax for printing multi-dimensional arrays

2004-03-23 Thread Tom Rogers
Hi, Tuesday, March 23, 2004, 8:03:05 PM, you wrote: BP Hi all BP I am having problems printing members of an array that has two BP dimensions and am wondering if someone can help me with the syntax BP required to do this. BP If i have the follwing code: BP ?php BP

[PHP] Re:[SOLVED] [PHP] Syntax

2004-02-14 Thread PETCOL
Thanks John, John Nichel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] PETCOL wrote: snip This line is whats causing me all the greif: echo option value=$_POST[Country];selected\n$_POST[Country];/option\n; Parse error: parse error, expecting `','' or `';''

[PHP] syntax help

2004-02-13 Thread bob pilly
Hi all I have a problem that is probably just a lack of php syntax knowledge on my part and hopefully someone can help me out. I have an array and i want to query a database for each value in that array. I then want to store that result as a new variable called $array[value]total. see code

Re: [PHP] syntax help

2004-02-13 Thread Richard Davey
Hello bob, Friday, February 13, 2004, 12:10:06 PM, you wrote: bp $array=array(Flyer,Email,Phone); bp $array_len=count($array); bp for($i=0;$i$array_len;$i++){ bp $query=select count(score) from test_table bp where source = '$array[$i]'; bp $result=mssql_query($query,$numero); bp

[PHP] Syntax

2004-02-13 Thread PETCOL
Hi People, PHP Newbie here again. trying to get HTML and PHP to work together really stumps me at times, I'm trying to output a selection from a form as so: option value=ArubaAruba/option ?php if (isset($_POST[Country])) { echo option

<    1   2   3   4   >