Author Topic: Parse error  (Read 8464 times)

0 Members and 1 Guest are viewing this topic.

Offline Axel

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Parse error
« on: March 20, 2003, 02:21:48 PM »
Hallo,

ich include in die Temlates auch eine Navi. Da klappt auch.
Sobald ich jedoch die Zeilen inder Navi mittels

Code: [Select]

<?php
$color 
"";
if &
#40;$mark == "3"&#41;
&#123;
$color "bgcolor=\"#FF9900\"";
&
#125;
else 
&
#123;
$color "";
&
#125;
?>

  <tr>
    <td height="17" colspan="3"
    <?php 
    
echo $color 
    ?>

    >


je nach Wert farbig machen möchte, erhalte ich

Code: [Select]

Parse error: parse error in /pfad/includes/template.php(133) : eval()'d code on line 383



Auch mit der eigentlich üblichen schreibweise:

Code: [Select]

    <td height="17" colspan="3"  <?php  echo $color ?>>


erhalte ich gleiche Fehlermeldung.

Wie könnte ich das lösen?
Gruß
Axel

PS. Ich kann kein englisch - I cannot English

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Parse error
« Reply #1 on: March 20, 2003, 02:36:56 PM »
sorry for english respond.
u MUST put open ( <?php ) and closing ( ?> ) php tags ALONE in the line, and without ANYTHING, not even spaces on same line.
here is how your code should looks like:
 
Code: [Select]
<?php 
$color 
""
if &
#40;$mark == "3"&#41; 
&#123; 
   
$color "bgcolor=\"#FF9900\""
&
#125; 
else 
&
#123; 
$color ""
&
#125; 
?>

  <tr>
    <td height="17" colspan="3"
<?php
    
echo $color 
?>

    >
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Axel

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Parse error
« Reply #2 on: March 20, 2003, 03:07:04 PM »
Sorry, but I speak no English.¶

Where is the difference to my first variant?¶
Gruß
Axel

PS. Ich kann kein englisch - I cannot English

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Parse error
« Reply #3 on: March 20, 2003, 03:27:10 PM »
wrong:
correct:
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Axel

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Parse error
« Reply #4 on: March 20, 2003, 03:40:35 PM »
Ok.  :?

In addition, it does not function in such a way unfortunately.
The error message remains the same.  :(
Gruß
Axel

PS. Ich kann kein englisch - I cannot English

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Parse error
« Reply #5 on: March 20, 2003, 03:53:43 PM »
ops...missed the mistake:
Quote
echo $color;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Axel

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Parse error
« Reply #6 on: March 20, 2003, 05:07:35 PM »
Thanks.  :D

That was the error.  :wink:
Gruß
Axel

PS. Ich kann kein englisch - I cannot English