Hi

I am new to PHP... Was just playing with the code to see what I can do and I
ran into a weird problem.

I have this code in a .php file:

<?php
if ($dataSuffix == "pass1") {
  $notes = array(0 => array("message" => "Quantitative Studies (3 hrs)",
"display" => 1, "url" =>
"DCTS_RequirementsDetails.php?req=QS&amp;status=Unselected", "target" =>
"_self"),
        
array("message" => "Integrative Studies (3 hrs)",  "display" => 1, "url" =>
"DCTS_RequirementsDetails.php?req=IS&amp;status=Unselected", "target" =>
"_self")); 
} else if ($dataSuffix == "pass2") {
  $notes = array(0 => array("message" => "Integrative Studies (3 hrs)",
"display" => 1, "url" =>
"DCTS_RequirementsDetails.php?req=IS&amp;status=Unselected", "target" =>
"_self")); 
} else if ($dataSuffix == "pass3") {
  $notes = array(0 => array("message" => "Integrative Studies (3 hrs)",
"display" => 1, "url" =>
"DCTS_RequirementsDetails.php?req=IS&amp;status=Unselected", "target" =>
"_self")); 
} else if ($dataSuffix == "pass4") {
  $notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => "")); 
} else if ($dataSuffix == "pass5") {
  $notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => "")); 
} else if ($dataSuffix == "pass6") {
  $notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => "")); 
} else if ($dataSuffix == "pass11") {
  $notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => "")); 
} else if ($dataSuffix == "pass12") {
  $notes = array(0 => array("message" => "None", "display" => 0, "url" =>
"", "target" => "")); 
}
?>
<div class="PERT_Sidebar">
        <h3>Reminders</h3>
        <h5>You need to select electives for the following
requirements:</h5>
        <ol>
<?php
  foreach ($notes as $note) {
?>
          <li><?php if ($note[display] != 0) { ?><a href="<?php echo
$note[url]?>" target="<?php echo $note[target] ?>"><?php } ?><?php echo
$note[message] ?><?php if ($note[url] != "") { ?></a><?php } ?></li>
<?php
  }
?>
        </ol>
</div>

That's to fake up a DB for now so the code loops through it and makes the
<li></li> blocks... Figured I'd get to know a bit of php before I added
mySql to the mix.

Now this works fine when I run it locally on my desktop with Apache2/PHP5...
But when I copy it to my laptop, It gives a very strange error message...

--
Notice: Use of undefined constant display - assumed 'display' in
C:\Inetpub\wwwroot\dcts\includes\sidebar_notes.php on line 28

Notice: Use of undefined constant message - assumed 'message' in
C:\Inetpub\wwwroot\includes\sidebar_notes.php on line 28
None
Notice: Use of undefined constant url - assumed 'url' in
C:\Inetpub\wwwroot\includes\sidebar_notes.php on line 28
--

Why would this throw up such an error message? It seems very strange to
me... Changing file permissions seems to affect this... When I grant all
permissions to everyone I get this error... Otherwise I get a 404.

I installed PHP5 from the installer for windows and got this to work as a
CGI under IIS on my laptop... Could that be causing any problems?

TIA for your answers...

Reply via email to