Re: [PHP] Parse errors

2012-03-19 Thread tamouse mailing lists
On Sun, Mar 18, 2012 at 2:18 PM, Tim Streater wrote: > On 18 Mar 2012 at 17:46, Simon J Welsh wrote: > >> This is expected. The error doesn't occur to the second file is included, so >> everything in the first included file is parsed and run before execution is >> halted. > > Simon, > > Thanks fo

Re: [PHP] Parse errors

2012-03-18 Thread Tim Streater
On 18 Mar 2012 at 17:46, Simon J Welsh wrote: > This is expected. The error doesn't occur to the second file is included, so > everything in the first included file is parsed and run before execution is > halted. Simon, Thanks for that. Looks like I should be able to catch most places where an

Re: [PHP] Parse errors

2012-03-18 Thread Simon J Welsh
On 19/03/2012, at 6:32 AM, Tim Streater wrote: > After recently omitting a semicolon from the end of a statement, and having > the result be a JavaScript error in an odd place, I'm trying to pin down just > what PHP does with such errors. I made a small test script to run at CLI, > which does s

Re: [PHP] Parse question

2011-01-21 Thread Ron Piggott
On Jan 21, 2011, at 6:52 PM, Ron Piggott wrote: Would someone write me a syntax so all the web site addresses in $data turn into links $data = “Visit our web site http://www.site.com, http://www.secondsite.org and http://www.thirdsite.info.”; My desired results for what I am asking fo

Re: [PHP] Parse question

2011-01-21 Thread Nicholas Kell
On Jan 21, 2011, at 6:52 PM, Ron Piggott wrote: > > Would someone write me a syntax so all the web site addresses in $data turn > into links > > $data = “Visit our web site http://www.site.com, http://www.secondsite.org > and http://www.thirdsite.info.”; > > My desired results for what I am

Re: [PHP] Parse question

2011-01-21 Thread Joshua Kehn
On Jan 21, 2011, at 7:52 PM, Ron Piggott wrote: > > Would someone write me a syntax so all the web site addresses in $data turn > into links > > $data = “Visit our web site http://www.site.com, http://www.secondsite.org > and http://www.thirdsite.info.”; > > My desired results for what I am a

Re: [PHP] Parse info from 1,000 files to file

2010-06-04 Thread tedd
At 5:03 PM -0700 6/3/10, Jim Lucas wrote: Sam Smith wrote: > Can someone briefly point me to the functions I'll need to parse some > information from thousands of files in a single directory and then > prepare the extracted info into a single file for SQL import? > > Like file() or readfile(

Re: [PHP] Parse info from 1,000 files to file

2010-06-03 Thread Jim Lucas
Sam Smith wrote: > Can someone briefly point me to the functions I'll need to parse some > information from thousands of files in a single directory and then > prepare the extracted info into a single file for SQL import? > > Like file() or readfile() and some regex and writefile?? > > Thanks >

Re: [PHP] Parse info from 1,000 files to file

2010-06-02 Thread Andre Polykanine
Hello Sam, Consider using opendir(), readdir(), fopen(), file_get_contents(), fwrite(). -- With best regards from Ukraine, Andre Skype: Francophile; Wlm&MSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Origin

RE: [PHP] Parse question

2010-05-13 Thread Lawrance Shepstone
-Original Message- From: Ron Piggott [mailto:ron.pigg...@actsministries.org] Sent: 13 May 2010 06:34 AM To: PHP General Subject: [PHP] Parse question If $message_body contains: $message_body="You are subscribed using u...@domain. To update"; How do I capture just the e-mail address? R

Re: [PHP] Parse question

2010-05-13 Thread Cemal Eker
Check this out. http://www.regular-expressions.info/email.html --- “Talk is cheap. Show me the code” - Linus Torvalds On Thu, May 13, 2010 at 7:34 AM, Ron Piggott wrote: > > If $message_body contains: > > $message_body="You are subscribed using u...@domain. To update"; > > How do I capture jus

Re: [PHP] Parse a string containing name and email

2010-03-06 Thread Kevin Kinsey
Don wrote: Hi, I am pulling email values out of a database and the format is as follows: John Smith I need to parse the string into two variables as such $name = John Smith $email = john.sm...@somedomain.com What would be the easiest way to do this? Thanks. [36] Sun 07.Mar.2010 0:27:35 [

Re: [PHP] parse date field

2010-01-14 Thread Michael Kjeldsen
On 01/14/2010 11:01 AM, John Taylor-Johnston wrote: How do I parse a date field from mysql? I was hoping this would work: $mydata->birthday = "2007-02-13"; #What month is it? echo date("F", $mydata->birthday); #What year is it? echo date("Y", $mydata->birthday); What am I missing? All I get is

Re: [PHP] parse date field

2010-01-14 Thread John Taylor-Johnston
Super, thanks. 5:14 a.m. - My head is fogging :p vikash wrote: Use strttotime() function. This will work as intended. $mydata->birthday = strtotime("2007-02-13"); #What month is it? echo date("F", $mydata->birthday); #What year is it? echo date("Y", $mydata->birthday); On Thu, Jan 14, 2010 at

Re: [PHP] parse date field

2010-01-14 Thread Lester Caine
John Taylor-Johnston wrote: How do I parse a date field from mysql? I was hoping this would work: $mydata->birthday = "2007-02-13"; This just stores a string to the variable $mydata->birthday - where did you define $mydata->birthday as a data object? $mydata->birthday = date("2007-02-13");

Re: [PHP] parse date field

2010-01-14 Thread vikash . iitb
Use strttotime() function. This will work as intended. $mydata->birthday = strtotime("2007-02-13"); #What month is it? echo date("F", $mydata->birthday); #What year is it? echo date("Y", $mydata->birthday); - -- Vikash Kumar http://vika.sh On Thu, Jan 14, 2010 at 3:31 PM, John Taylor-Johnston <

Re: [PHP] Parse Question Using list()

2009-10-02 Thread Gerardo Benitez
> > Use the tool that PHP provides for such problems. > > http://php.net/fgetcsv fgetcsv is very useful, here a example: $num fields in line $row: \n"; $row++; for ($c=0; $c < $num; $c++) { echo $data[$c] . "\n"; } } fclose($handle); ?> -- Gerardo Benitez

Re: [PHP] Parse Question Using list()

2009-10-01 Thread Jim Lucas
c...@hosting4days.com wrote: On Oct 1, 2009, at 5:02 PM, Ben Dunlap wrote: You could tackle this in a couple of different ways. Either split your string into an array first: $line = fgets($handle); $columns = explode(",", trim($line)); Thanks Ben - the explode() command worked great! Use

Re: [PHP] Parse Question Using list()

2009-10-01 Thread c...@hosting4days.com
On Oct 1, 2009, at 5:02 PM, Ben Dunlap wrote: You could tackle this in a couple of different ways. Either split your string into an array first: $line = fgets($handle); $columns = explode(",", trim($line)); Thanks Ben - the explode() command worked great! - Now a bit of another pro

Re: [PHP] Parse Question Using list()

2009-10-01 Thread Ben Dunlap
> $line = fgets($handle); > > list($col1, $col2, $col3) = $line; [8<] > echo "c1 is $col1 and c2 is $col2 and c3 is $col3".''; // this shows > just 1st char of each field That's odd, I would have expected $col1, $col2, and $col3 to be NULL. That's what I get when I try to assign a string to list()

Re: [PHP] Parse error: syntax error, unexpected '>'

2009-09-23 Thread Fernando Castillo Aparicio
lighting if you haven't one. It would warn you from most of these mistakes. And an xhtml issue: to use an empty tag, you use and not De: Fernando Castillo Aparicio Para: Haig Davis ; php-general@lists.php.net Enviado: miércoles, 23 de septiembre, 2009

Re: [PHP] Parse error: syntax error, unexpected '>'

2009-09-23 Thread Ashley Sheridan
On Wed, 2009-09-23 at 07:18 -0700, Haig Davis wrote: > echo " ".$row['melID']." name="\".$row['melID].\""/input> "; You're escaping in the wrong places. The \ escapes the character following it, so what you are doing here, in line 2, is breaking out of the string with a regular " and then printing

Re: [PHP] Parse error: syntax error, unexpected '>'

2009-09-23 Thread Fernando Castillo Aparicio
You missed a double quote here: echo " \n"; De: Haig Davis Para: php-general@lists.php.net Enviado: miércoles, 23 de septiembre, 2009 16:18:17 Asunto: [PHP] Parse error: syntax error, unexpected '>' Good morning Everyone, I'm have trouble wi

Re: [PHP] Parse ini file problem

2009-05-21 Thread Jim Lucas
Thodoris wrote: I am trying to parse an ini conf file using parse_ini_file but fails without returning something. I found this which is probably the reason: http://bugs.php.net/bug.php?id=44544 (the $ in the values) The problem is that this file has more than 7500 lines so it's kind of diffi

RE: [PHP] Parse domain from URL

2007-06-08 Thread Brad Fuller
Tijnema wrote: > On 6/7/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> Robin Vickery wrote: >>> In that case you can't do it just by parsing alone, you need to use >>> DNS. >>> >>> >> function get_domain ($hostname) { >>> dns_get_record($hostname, DNS_A, $authns, $addt); return >>> $authns[0][

Re: [PHP] Parse domain from URL

2007-06-07 Thread Tijnema
On 6/7/07, Brad Fuller <[EMAIL PROTECTED]> wrote: Robin Vickery wrote: > In that case you can't do it just by parsing alone, you need to use > DNS. > > function get_domain ($hostname) { > dns_get_record($hostname, DNS_A, $authns, $addt); return > $authns[0]['host']; } > > print get_domain("w

RE: [PHP] Parse domain from URL

2007-06-07 Thread Brad Fuller
Robin Vickery wrote: > In that case you can't do it just by parsing alone, you need to use > DNS. > > function get_domain ($hostname) { > dns_get_record($hostname, DNS_A, $authns, $addt); return > $authns[0]['host']; } > > print get_domain("www.google.com") . "\n"; print > get_domain("googl

Re: [PHP] Parse domain from URL

2007-06-07 Thread Daniel Brown
On 6/7/07, Robin Vickery <[EMAIL PROTECTED]> wrote: On 06/06/07, Brad Fuller <[EMAIL PROTECTED]> wrote: > Daniel Brown wrote: > > On 6/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: > >> > >> I need to strip out a domain name from a URL, and ignore subdomains > >> (like www) > >> > >> I can use par

Re: [PHP] Parse domain from URL

2007-06-07 Thread Robin Vickery
On 06/06/07, Brad Fuller <[EMAIL PROTECTED]> wrote: Daniel Brown wrote: > On 6/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> >> I need to strip out a domain name from a URL, and ignore subdomains >> (like www) >> >> I can use parse_url to get the hostname. And my first thought was to >> take th

RE: [PHP] Parse domain from URL

2007-06-06 Thread Stefan Wixfort
> From: Brad Fuller [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 06, 2007 5:44 PM > Subject: [PHP] Parse domain from URL > > Hey guys, > > I'm faced with an interesting problem, and wondering if there's an easy > solution. > > I need to strip out a domain name from a URL, and ignore subdom

RE: [PHP] Parse domain from URL

2007-06-06 Thread Brad Fuller
Daniel Brown wrote: > On 6/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: >> Hey guys, >> >> I'm faced with an interesting problem, and wondering if there's an >> easy solution. >> >> I need to strip out a domain name from a URL, and ignore subdomains >> (like www) >> >> I can use parse_url to ge

Re: [PHP] Parse domain from URL

2007-06-06 Thread Daniel Brown
On 6/6/07, Brad Fuller <[EMAIL PROTECTED]> wrote: Hey guys, I'm faced with an interesting problem, and wondering if there's an easy solution. I need to strip out a domain name from a URL, and ignore subdomains (like www) I can use parse_url to get the hostname. And my first thought was to take

Re: [PHP] Parse domain from URL

2007-06-06 Thread Robert Cummings
On Wed, 2007-06-06 at 11:43 -0400, Brad Fuller wrote: > Hey guys, > > I'm faced with an interesting problem, and wondering if there's an easy > solution. > > I need to strip out a domain name from a URL, and ignore subdomains (like > www) > > I can use parse_url to get the hostname. And my first

RE: [PHP] parse error

2007-05-04 Thread Brad Sumrall
Maybe not The following passes me on without error, but does not actually log me on? Put in a fake name, and it still passes me on to the index page. I took this straight off the phpbb help files? Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

RE: [PHP] parse error

2007-05-04 Thread Brad Sumrall
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 9:43 PM To: Brad Sumrall Subject: Re: [PHP] parse error }else{ Brad Sumrall wrote: > Hi folk, I am writing a login in script and get the following: > > Parse error: parse error, unexpected T_ELSE in > /home/content/c/

RE: [PHP] parse error

2007-05-04 Thread Brad Sumrall
PROTECTED] Sent: Friday, May 04, 2007 9:43 PM To: Brad Sumrall Subject: Re: [PHP] parse error }else{ Brad Sumrall wrote: > Hi folk, I am writing a login in script and get the following: > > Parse error: parse error, unexpected T_ELSE in > /home/content/c/u/t/cuteirka/html/commonlogin_ne

Re: [PHP] Parse error on a basic call?

2007-04-28 Thread Edward Vermillion
On Apr 28, 2007, at 9:08 PM, Brad Sumrall wrote: $SESSION = get_include_contents'/phpbb/login.php'; I pulled this tright out of the text book. I am trying to pull a phpbb session on an outside page. Any suggestions? Here is the error! Parse error: parse error, unexpected T_CONSTANT

Re: [PHP] Parse error help.., thanks..

2007-03-30 Thread Ian
Thanks very much for the help, Davi,, no more such errors.. :) Ian "Davi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Em Sexta 30 Março 2007 18:55, Ian escreveu: > Parse error: syntax error, unexpected ';' in > /hxxx/x/domains/x.com/public_html/blog/labels.php on line 15 >

Re: [PHP] Parse error help.., thanks..

2007-03-30 Thread Ian
Hehe.., didn't i told i am poor in this, actually, never learn PHP before.. :) No more such errors anymore thank you Tijnema! =) Ian ""Tijnema !"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 3/30/07, Ian <[EMAIL PROTECTED]> wrote: >> Hi everyone, i am new to PHP, but not a

Re: [PHP] Parse error help.., thanks..

2007-03-30 Thread Tijnema !
On 3/30/07, Ian <[EMAIL PROTECTED]> wrote: Hi everyone, i am new to PHP, but not a programmer.., i got this php code to workout on something on my blog, but it seems that it gives me the following error: Parse error: syntax error, unexpected ';' in /hxxx/x/domains/x.com/public_html/blog/

Re: [PHP] Parse error help.., thanks..

2007-03-30 Thread Davi
Em Sexta 30 Março 2007 18:55, Ian escreveu: > Parse error: syntax error, unexpected ';' in > /hxxx/x/domains/x.com/public_html/blog/labels.php on line 15 > > http://.x.com/labels'); 2 define('SEARCH_DIR','//x/domains/x.com/public_html/blog/labels'); 3 define('THIS_FIL

Re: [PHP] Parse

2007-03-14 Thread Richard Lynch
No space in the function name 'phpinfo' If that's not it, show us your source code. On Wed, March 14, 2007 9:53 am, al phillips wrote: > I keep getting a parse error line x > when trying view php info() > Can you help please? > > > - > Be a PS3 game guru. >

Re: [PHP] Parse

2007-03-14 Thread Németh Zoltán
2007. 03. 14, szerda keltezéssel 07.53-kor al phillips ezt írta: > I keep getting a parse error line x > when trying view php info() > Can you help please? no, if you don't post the exact error message and your code here btw, it is probably a typo in your code at line x, but we cannot see it

Re: [PHP] Parse

2007-03-14 Thread Andrei
al phillips wrote: > I keep getting a parse error line x > when trying view php info() > Can you help please? > > > - > Be a PS3 game guru. > Get your game face on with the latest PS3 news and previews at Yahoo! Games. > . > > And the code you use would lo

Re: [PHP] Parse Errors with 5.2 on Linux

2006-11-07 Thread Robert Cummings
On Tue, 2006-11-07 at 21:18 +, Stut wrote: > Richard Lynch wrote: > > I never have understood why it was kosher to leave the final ?> off, > > for example, so maybe that changed. :-) [I doubt it] > > Certainly hasn't changed, and I hope it never does. Having to find an > errant space or carr

Re: [PHP] Parse Errors with 5.2 on Linux

2006-11-07 Thread Stut
Richard Lynch wrote: I never have understood why it was kosher to leave the final ?> off, for example, so maybe that changed. :-) [I doubt it] Certainly hasn't changed, and I hope it never does. Having to find an errant space or carriage return at the end of an include file that is one of ne

RE: [PHP] Parse Errors with 5.2 on Linux

2006-11-07 Thread Michael Caplan
: Michael Caplan Cc: php-general@lists.php.net Subject: Re: [PHP] Parse Errors with 5.2 on Linux On Tue, November 7, 2006 11:30 am, Michael Caplan wrote: > I just installed PHP 5.2 on a linux server (compiled from source), and > am having some strange problems with a script that is reporting a &

Re: [PHP] Parse Errors with 5.2 on Linux

2006-11-07 Thread Richard Lynch
On Tue, November 7, 2006 11:30 am, Michael Caplan wrote: > I just installed PHP 5.2 on a linux server (compiled from source), and > am having some strange problems with a script that is reporting a > fatal > parse error: > > Parse error: syntax error, unexpected $end in > /xxx/xxx/xxx/functions.php

Re: [PHP] parse text file

2006-07-23 Thread Benjamin Adams
Thanks, fgets works great didn't know the function before. On Mon, 2006-07-24 at 01:56 +0530, Sameer N Ingole wrote: > Joe Wollard wrote: > > Benjamin, > > > > Use the file() function, it will read a file then return each line as > > a new element in an array. > > http://php.net/file > And if fil

Re: [PHP] parse text file

2006-07-23 Thread Stut
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joe Wollard wrote: > Use the file() function, it will read a file then return each line as > a new element in an array. > http://php.net/file This will not read the file "one line at a time". Try http://php.net/fgets. - -Stut > On 7/23/06, Benjamin

Re: [PHP] parse text file

2006-07-23 Thread Sameer N Ingole
Joe Wollard wrote: Benjamin, Use the file() function, it will read a file then return each line as a new element in an array. http://php.net/file And if file is big (biiig) then you want http://php.net/fgets -- Sameer N. Ingole http://weblogic.noroot.org/ --- Better to light one candle tha

Re: [PHP] parse text file

2006-07-23 Thread Joe Wollard
Benjamin, Use the file() function, it will read a file then return each line as a new element in an array. http://php.net/file - Joe On 7/23/06, Benjamin Adams <[EMAIL PROTECTED]> wrote: how would I read a file one line at a time: something like that, I'm cofused on if I use fread, somethin

Re: [PHP] parse error

2006-07-10 Thread Paul Novitski
At 08:11 AM 7/10/2006, Schalk wrote: I am getting the following error:* Parse error*: parse error, unexpected $ in */home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php* on line *69 In my code the last line i.e. ?> is marked as line 69 I don't see anything wrong with t

Re: [PHP] parse error

2006-07-10 Thread Schalk
Thanks everyone. Jochem Maas wrote: Schalk wrote: Greetings All, Please have a look at the following code: your missing a closing brace some where - by the looks of things not in the code you sent. if ($numrows < 1) // the member does not exist { include ($adminfolderpath."/

Re: [PHP] parse error

2006-07-10 Thread Jochem Maas
Schalk wrote: > Greetings All, > > Please have a look at the following code: > your missing a closing brace some where - by the looks of things not in the code you sent. > if ($numrows < 1) > // the member does not exist > { >include ($adminfolderpath."/include/headeradmin.php"); >echo

Re: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Mark Sargent
Hi All, sorry, found it. Forgot the ; after $age++. Cheers. Mark Sargent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Bagus Nugroho
how about like this --- $insert = "INSERT INTO age (age_label) VALUES ('$age')"; --- From: Mark Sargent [mailto:[EMAIL PROTECTED] Sent: Sat 03-Jun-2006 10:02 To: PHP List Subject: [PHP] Parse error: syntax error, unexpected '}' Hi All, can anone see what's w

Re: [PHP] Parse error: syntax error, unexpected '}'

2006-06-02 Thread Rick Emery
Quoting Mark Sargent <[EMAIL PROTECTED]>: Hi All, can anone see what's wrong with the below code? I get this error, *Parse error*: syntax error, unexpected '}' in */usr/local/apache2/htdocs/moviedata2.php* on line *18 * $age=1; while($age<=100) { $insert = "INSERT INTO age (age_label) VALUES

Re: [PHP] Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in

2006-05-25 Thread Mark Sargent
Mark Sargent wrote: Hi All, I get the error for line 15 for this code, "; 18 echo "$_SESSION['text']"; 19 echo ""; 20 ?> I have put ' ' quotes around the " " quotes for each font attribute so that the parser doesn't think the echo is finished too early. Is that wrong? I know that

Re: [PHP] Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in

2006-05-25 Thread Ryan Creaser
Mark Sargent wrote: Hi All, I get the error for line 15 for this code, "; 18 echo "$_SESSION['text']"; 19 echo ""; 20 ?> I have put ' ' quotes around the " " quotes for each font attribute so that the parser doesn't think the echo is finished too early. Is that wrong? I know t

Re: [PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Mark Sargent
Chris wrote: Since there aren't actually 18 lines this isn't the real code.. true, as I only posted the php code The problem is here: echo $currentValue "\n"; it should be echo $currentValue . "\n"; or echo $currentValue , "\n"; thanx to all. The book is Beginning PHP, Apache, MySQL, We

Re: [PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Chris
Mark Sargent wrote: Hi All, this code, "; echo "My favourite flavours are:"; foreach ($flavour as $currentValue) { //these lines will execute as long as there is a value in $flavour echo $currentValue "\n"; } ?> gives this, *Parse error*: syntax error, unexpected T_CONS

Re: [PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Robin Vickery
On 24/05/06, Mark Sargent <[EMAIL PROTECTED]> wrote: Hi All, this code, "; echo "My favourite flavours are:"; foreach ($flavour as $currentValue) { //these lines will execute as long as there is a value in $flavour echo $currentValue "\n"; } ?> gives this, *Parse er

Re: [PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Stut
Mark Sargent wrote: Hi All, this code, "; echo "My favourite flavours are:"; foreach ($flavour as $currentValue) { //these lines will execute as long as there is a value in $flavour echo $currentValue "\n"; } ?> gives this, *Parse error*: syntax error, unexpected T_CONS

Re: [PHP] Parse Error on SQL Insert [Solved]

2006-04-08 Thread Tom Chubb
the field in the DB isn't numeric this would be > > '{$_POST['model']}' > > > > Dan > > > > --- > > http://chrome.me.uk > > > > > > -Original Message- > > From: Joe Henry [mailto:[

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Joe Henry
field in the DB isn't numeric this would be > '{$_POST['model']}' > > Dan > > --- > http://chrome.me.uk > > > -Original Message- > From: Joe Henry [mailto:[EMAIL PROTECTED] > Sent: 07 April 2006 20:53 > To: php-gener

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Satyam
e" <[EMAIL PROTECTED]> To: "'Joe Henry'" <[EMAIL PROTECTED]>; ; <[EMAIL PROTECTED]> Sent: Friday, April 07, 2006 9:56 PM Subject: RE: [PHP] Parse Error on SQL Insert Backticks (`) encapsulate table or database names I was thinking maybe if t

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Ray Hauge
On Friday 07 April 2006 12:56, Chrome wrote: > Of course if the field in the DB isn't numeric this would be > '{$_POST['model']}' > > Dan That's what I was thinking. Even if data is a number, I still generally put quotes around it to make sure I don't have an issue. -- Ray Hauge Programmer/Sys

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread John Nichel
Tom Chubb wrote: Complete code... $insertSQL = "INSERT INTO cars (model, `year`, details, price, image1, image2, image3, forsale) VALUES ($_POST['model'], $_POST['year'], $_POST['details'], $_POST['price'], $_FILE['image']['name'][0], $_FILE['image']['name'][1], $_FILE['image']['name'][2], $

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Brad Bonkoski
thanks for the clarification, I guess the other solution would be to avoid using names with special meaning for column names... -B Ray Hauge wrote: On Friday 07 April 2006 12:53, Joe Henry wrote: On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: $insertSQL = "INSERT INTO cars (model,

RE: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Chrome
#x27;]}' Dan --- http://chrome.me.uk -Original Message- From: Joe Henry [mailto:[EMAIL PROTECTED] Sent: 07 April 2006 20:53 To: php-general@lists.php.net; [EMAIL PROTECTED] Subject: Re: [PHP] Parse Error on SQL Insert On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: &

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Ray Hauge
On Friday 07 April 2006 12:53, Joe Henry wrote: > On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: > > $insertSQL = "INSERT INTO cars (model, `year`, details, price, image1, > > Not sure if this is your problem, but those look like backticks around year > instead of single quotes. Should there eve

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Tom Chubb
Complete code... http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> Untitled Document Model: Year: Details: Price: Image1:

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Joe Henry
On Friday 07 April 2006 1:37 pm, Tom Chubb wrote: > $insertSQL = "INSERT INTO cars (model, `year`, details, price, image1, Not sure if this is your problem, but those look like backticks around year instead of single quotes. Should there even be quotes there? HTH -- Joe Henry www.celebrityacces

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread Brad Bonkoski
why do you have single quotes around year? -B Tom Chubb wrote: I'm working on an insert record page with a multiple file upload script of which I understand the fundamentals. However, on submission I am getting the following error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPAC

Re: [PHP] Parse Error on SQL Insert

2006-04-07 Thread John Nichel
Tom Chubb wrote: I'm working on an insert record page with a multiple file upload script of which I understand the fundamentals. However, on submission I am getting the following error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STR

Re: [PHP] parse a Makefile

2006-04-03 Thread Kevin Kinsey
Benjamin D Adams wrote: I'm trying to parse a Makefile, (FreeBSD Ports) I plan on dumping the Makefile vars to a MySQL Database. Would I parse the make file like a ini file? Or would I have to use something different? Maybe someone knows a tool that can do this for me? Thanks Ben Try fil

Re: [PHP] parse a Makefile

2006-04-03 Thread Peter Hoskin
Makefile's are not ini files. ini files have the structure [section] variable=value [section2] variable2=value2 Makefiles have the structure variable=value Benjamin D Adams wrote: I'm trying to parse a Makefile, (FreeBSD Ports) I plan on dumping the Makefile vars to a MySQL Database. Would I

RE: [PHP] Parse Error

2006-02-21 Thread Emmanuel Job
o: php-general@lists.php.net Subject: Re: [PHP] Parse Error Ray Cantwell wrote: > Hi all, > I am a noob and super confused right now. I have some really simple code > and i am getting an error that reads: > *Parse error*: syntax error, unexpected T_VARIABLE in > */var/www/mysql_up.php*

Re: [PHP] Parse Error

2006-02-21 Thread benifactor
- Original Message - From: "Ray Cantwell" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 21, 2006 1:27 PM Subject: [PHP] Parse Error > Hi all, > I am a noob and super confused right now. I have some really simple code > and i am getting an error that reads: > *Parse error*: syntax er

Re: [PHP] Parse Error

2006-02-21 Thread John Nichel
Ray Cantwell wrote: Hi all, I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in */var/www/mysql_up.php* on line here is the code: Test MySQL Terminate your php lines with a

Re: [PHP] Parse Error

2006-02-21 Thread Ray
Jay Blanchard wrote: [snip] I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in */var/www/mysql_up.php* on line here is the code: Test MySQL Thanks. did i say i was a n00b

Re: [PHP] Parse Error

2006-02-21 Thread Claudio Corlatti
Hi, you need to finish every line with ; $host="localhost" ; $user="ray" ; $password="*" ; Bye Ray Cantwell wrote: Hi all, I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in

Re: [PHP] Parse Error

2006-02-21 Thread Kevin Waterson
This one time, at band camp, Ray Cantwell <[EMAIL PROTECTED]> wrote: > $host="localhost" > $user="ray" > $password="*" these need to be terminated with ; $host = 'localhost'; etc etc Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed

Re: [PHP] Parse Error

2006-02-21 Thread Ray Hauge
On Tuesday 21 February 2006 14:27, Ray Cantwell wrote: > Hi all, > I am a noob and super confused right now. I have some really simple code > and i am getting an error that reads: > *Parse error*: syntax error, unexpected T_VARIABLE in > */var/www/mysql_up.php* on line > > here is the code: > > >

RE: [PHP] Parse Error

2006-02-21 Thread Jay Blanchard
[snip] I am a noob and super confused right now. I have some really simple code and i am getting an error that reads: *Parse error*: syntax error, unexpected T_VARIABLE in */var/www/mysql_up.php* on line here is the code: Test MySQL http://www.php.net/) To unsubscribe, visit: http://www.php.

Re: [PHP] parse string

2006-01-19 Thread Ron Eggler (Paykiosks)
Am Donnerstag, den 19.01.2006, 16:42 -0600 schrieb Richard Lynch: > G. I forgot PHP Object printing was so primitive, even under > var_dump. :-( > > function walkout($object, $indent = 0){ > if (is_object($object) or is_array($object)){ > foreach($object as $k => $v){ > echo str_r

Re: [PHP] parse string

2006-01-19 Thread Richard Lynch
G. I forgot PHP Object printing was so primitive, even under var_dump. :-( function walkout($object, $indent = 0){ if (is_object($object) or is_array($object)){ foreach($object as $k => $v){ echo str_repeat(' ', $indent), $k, ' => '; walkout($v, $indent + 1); } } el

Re: [PHP] parse string

2006-01-19 Thread Ron Eggler (Paykiosks)
[snipped everything] Okay, If I'm gonna dump $xml i get a huge output put can't fin category in there: [Output] object(SimpleXMLElement)#1 (1) { ["SKUlisting"]=> object(SimpleXMLElement)#3 (3) { ["globalInfo"]=> object(SimpleXMLElement)#4 (0) { } ["carrierInfo"]=> array(15)

Re: [PHP] parse string

2006-01-19 Thread Richard Lynch
Then var_dump($xml) and see what's in there. The data you want is in there somewhere -- you just need to figure out where it is. On Thu, January 19, 2006 3:10 pm, Ron Eggler (Paykiosks) wrote: > Am Donnerstag, den 19.01.2006, 13:51 -0600 schrieb Richard Lynch: >> On Thu, January 19, 2006 12:08

Re: [PHP] parse string

2006-01-19 Thread Ron Eggler (Paykiosks)
Am Donnerstag, den 19.01.2006, 13:51 -0600 schrieb Richard Lynch: > On Thu, January 19, 2006 12:08 pm, Ron Eggler (Paykiosks) wrote: > > > distributor="EWI" > > discontinued="false" cardtype="PIN" transactionType="PURC"> > . > . > . > > > > [/xml] > > > > and I wanna read information out of it by

Re: [PHP] parse string

2006-01-19 Thread Richard Lynch
On Thu, January 19, 2006 12:08 pm, Ron Eggler (Paykiosks) wrote: > distributor="EWI" > discontinued="false" cardtype="PIN" transactionType="PURC"> . . . > > [/xml] > > and I wanna read information out of it by: > [php] > $xml = simplexml_load_string($data); > /* a few other things like parsing xm

Re: [PHP] parse string

2006-01-19 Thread Ron Eggler (Paykiosks)
yup, I finally got it parsed by simple XML, thank you! but I got a problem, my xml-string returns many parts like this one: [xml] https://www.pinsprepaid.com/image.aspx?name=c38-reconex_logo.gif"; upc="870368000420"> Refer to the Reconex brochure for complete terms and condition

Re: [PHP] parse string

2006-01-18 Thread Richard Lynch
Simple XML *should* give you all the info somewhere in its data structures. If not, there are at least 2 or 3 other XML parsers that have been built s extensions to PHP over the years. Plus there is at least one XML parser in PEAR, and probably one or more in PECL. A quick search on http://php.n

Re: [PHP] Parse error: parse error, unexpected T_ELSE

2005-04-26 Thread Petar Nedyalkov
On Tuesday 26 April 2005 11:10, Mark Sargent wrote: > Prathaban Mookiah wrote: > >Mark, > > > >Back to basics budy!! > > > >> 25 if ($myrow = mysql_fetch_array($result)); { > > > >should be > > > >> 25 if ($myrow = mysql_fetch_array($result)) { > > > >Note that extra semicolon? > > > > > >P

Re: [PHP] Parse error: parse error, unexpected T_ELSE

2005-04-26 Thread Mark Sargent
Prathaban Mookiah wrote: Mark, Back to basics budy!! 25 if ($myrow = mysql_fetch_array($result)); { should be 25 if ($myrow = mysql_fetch_array($result)) { Note that extra semicolon? Prathap -- Original Message --- From: Mark Sargent <[EMAIL PROTECTED]> To:

Re: [PHP] Parse error: parse error, unexpected T_ELSE

2005-04-26 Thread Prathaban Mookiah
Mark, Back to basics budy!! > 25 if ($myrow = mysql_fetch_array($result)); { should be > 25 if ($myrow = mysql_fetch_array($result)) { Note that extra semicolon? Prathap -- Original Message --- From: Mark Sargent <[EMAIL PROTECTED]> To: php-general@lists.php.net

Re: [PHP] parse error, unexpected T_CLASS

2005-04-20 Thread Kim Briggs
On 4/20/05, Jochem Maas <[EMAIL PROTECTED]> wrote: >> Dasmeet Singh wrote: >> BTW.. pls suggest some good editor.. I use notepad currently.. > http://www.php-editors.com/ > http://www.google.com/search?hl=en&lr=&q=good+editor+for+php&btnG=Search > > choose one. > This can take a long time, I k

Re: [PHP] parse error, unexpected T_CLASS

2005-04-20 Thread Jochem Maas
Dasmeet Singh wrote: ... Get some decent editor with syntax highlighting ditto. :-) Thanks.. That was really silly.. BTW.. pls suggest some good editor.. I use notepad currently.. OFFS. http://www.php-editors.com/ http://www.google.com/search?hl=en&lr=&q=good+editor+for+php&btnG=Search choose one.

Re: [PHP] parse error, unexpected T_CLASS

2005-04-19 Thread Jason Barnett
Dasmeet Singh wrote: > Jay Blanchard wrote: >> [snip] >> echo (" $row[1] Location- $row[4] >> Property Type- $ptypeMin Price- $row[9] "); >> >> it gives an error.. >> >> Parse error: parse error, unexpected T_CLASS in >> /home/real/public_html/functions.php on line 162 >> >> Any idea..why? Prob

  1   2   3   4   5   >