[PHP] Parse error: parse error, unexpected T_ELSE

2005-04-26 Thread Mark Sargent
Hi All,
again, I'm following an example from webmonkey,
http://webmonkey.wired.com/webmonkey/99/21/index3a_page2.html?tw=programming
and I'm changing only what's relevant to me. I haven't altered the code 
basics, though. But I get the error regarding else. I don't see what 
it is. Anyone..? Cheers.

Mark Sargent.
*Parse error*: parse error, unexpected T_ELSE in 
*/var/www/html/phpmysqltable.php* on line *41*

25 if ($myrow = mysql_fetch_array($result)); {
26
27 echo table border=1\n;
28
29 echo trtdProduct Name/tdtdProduct Model 
Number/tdtdProduct
30 Serial Number/td/tr\n;
31
32 do {
33
34 printf(trtd%s/tdtd%s/tdtd%s/td/tr\n, 
$myrow[product_name], $myrow[product_model_number],
35 $myrow[product_serial_number]);
36
37 } while ($myrow = mysql_fetch_array($result));
38
39 echo /table\n;
40
41 } else {
42
43 echo Sorry, no data is available for that request;
44
45 }

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


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
Sent: Tue, 26 Apr 2005 16:01:24 +0900
Subject: [PHP] Parse error: parse error, unexpected T_ELSE

 Hi All,
 
 again, I'm following an example from webmonkey,
 
 http://webmonkey.wired.com/webmonkey/99/21/index3a_page2.html?tw=programming
 
  and I'm changing only what's relevant to me. I haven't altered the 
 code basics, though. But I get the error regarding else. I don't 
 see what it is. Anyone..? Cheers.
 
 Mark Sargent.
 
 *Parse error*: parse error, unexpected T_ELSE in 
 */var/www/html/phpmysqltable.php* on line *41*
 
  25 if ($myrow = mysql_fetch_array($result)); {
  26
  27 echo table border=1\n;
  28
  29 echo trtdProduct Name/tdtdProduct Model 
 Number/tdtdProduct
  30 Serial Number/td/tr\n;
  31
  32 do {
  33
  34 printf(trtd%s/tdtd%s/tdtd%s/td/tr\n, 
 $myrow[product_name], $myrow[product_model_number],
  35 $myrow[product_serial_number]);
  36
  37 } while ($myrow = mysql_fetch_array($result));
  38
  39 echo /table\n;
  40
  41 } else {
  42
  43 echo Sorry, no data is available for that request;
  44
  45 }
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
--- End of Original Message ---

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



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: php-general@lists.php.net
Sent: Tue, 26 Apr 2005 16:01:24 +0900
Subject: [PHP] Parse error: parse error, unexpected T_ELSE
 

Hi All,
again, I'm following an example from webmonkey,
http://webmonkey.wired.com/webmonkey/99/21/index3a_page2.html?tw=programming
and I'm changing only what's relevant to me. I haven't altered the 
code basics, though. But I get the error regarding else. I don't 
see what it is. Anyone..? Cheers.

Mark Sargent.
*Parse error*: parse error, unexpected T_ELSE in 
*/var/www/html/phpmysqltable.php* on line *41*

25 if ($myrow = mysql_fetch_array($result)); {
26
27 echo table border=1\n;
28
29 echo trtdProduct Name/tdtdProduct Model 
Number/tdtdProduct
30 Serial Number/td/tr\n;
31
32 do {
33
34 printf(trtd%s/tdtd%s/tdtd%s/td/tr\n, 
$myrow[product_name], $myrow[product_model_number],
35 $myrow[product_serial_number]);
36
37 } while ($myrow = mysql_fetch_array($result));
38
39 echo /table\n;
40
41 } else {
42
43 echo Sorry, no data is available for that request;
44
45 }

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

--- End of Original Message ---
 

Hi All,
yep, basics are good, hence my following the tut at webmonkey(so I can 
learn the basics), and I obviously missed that little error. Cheers.

P.S. Some people are mailig me direct. That's great, but, I'd prefer you 
reply in here, so all can see/comment. Cheers, again.

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


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?
 
 
 Prathap
 
 
 -- Original Message ---
 From: Mark Sargent [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Sent: Tue, 26 Apr 2005 16:01:24 +0900
 Subject: [PHP] Parse error: parse error, unexpected T_ELSE
 
 Hi All,
 
 again, I'm following an example from webmonkey,
 
 http://webmonkey.wired.com/webmonkey/99/21/index3a_page2.html?tw=programm
 ing
 
  and I'm changing only what's relevant to me. I haven't altered the
 code basics, though. But I get the error regarding else. I don't
 see what it is. Anyone..? Cheers.
 
 Mark Sargent.
 
 *Parse error*: parse error, unexpected T_ELSE in
 */var/www/html/phpmysqltable.php* on line *41*
 
  25 if ($myrow = mysql_fetch_array($result)); {
  26
  27 echo table border=1\n;
  28
  29 echo trtdProduct Name/tdtdProduct Model
 Number/tdtdProduct
  30 Serial Number/td/tr\n;
  31
  32 do {
  33
  34 printf(trtd%s/tdtd%s/tdtd%s/td/tr\n,
 $myrow[product_name], $myrow[product_model_number],
  35 $myrow[product_serial_number]);
  36
  37 } while ($myrow = mysql_fetch_array($result));
  38
  39 echo /table\n;
  40
  41 } else {
  42
  43 echo Sorry, no data is available for that request;
  44
  45 }
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 --- End of Original Message ---

 Hi All,

 yep, basics are good, hence my following the tut at webmonkey(so I can
 learn the basics), and I obviously missed that little error. Cheers.

 P.S. Some people are mailig me direct. That's great, but, I'd prefer you
 reply in here, so all can see/comment. Cheers, again.

Some people have intelligent mail agents that rely on mailing list headers. 
And since you use Reply-To header that's not been overwritten by the 
mainling-list daemon, we replied (me too) directly to you. Remove the 
Reply-To and you'll have no worries.


 Mark Sargent.

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgpiM6dmv3CQl.pgp
Description: PGP signature