PHP (variables?) not fully functional on XAMPP 1.7.1

Problems with the Windows version of XAMPP, questions, comments, and anything related.

PHP (variables?) not fully functional on XAMPP 1.7.1

Postby flappy_dog » 12. June 2009 23:41

Hello:
I recently updated my Xampp to 1.7.1 after years of using 1.4.16

After installation I tried to preview a site I was already working on and noticed some operations with 'ifs', variables and 'echos' don't work.
For instance:
I had set up a page with different contents to act like different pages. So when a link is clicked, the page content changes depending on the variable called. So:
Code: Select all
<div id="subnav">
      <a href="students.php?stuff=admission" class="<?php if($stuff==admission||$stuff==application){echo "current";}?>">Admission</a>
      <a href="students.php?stuff=graduation" class="<?php if($stuff==graduation){echo "current";}?>">Graduation</a>
</div>

works with
Code: Select all
<?php
   if($stuff=="admission"){?>
   
      <h3>Pre-admission Requirement</h3>
      <p>The requirement for admission into any diploma programs is five(5) credit passes of Senior School...</p>
      <h3>
      <a href="students.php?stuff=application">Online Application Form</a><br/>
      <a href="#">Download Application Form</a>
      </h3>

   <?php }
   else if($stuff=="graduation"){?>
   
      <h3>Graduation Requirements</h3>
      <ol>
         <li>NABTEB Examination is taken by at the end of each program.</li>
         <li>Certificate will be issued to candidate upon successful completion ...</li>
      </ol>
      
   <?php }
   else if($stuff=="application"){ ?>
...ETC.

This used to work fine but, it seems the variables don't respond anymore. I think it's the variables because a form I set up in a different page will not echo variables previously entered (it is set up to check for errors before sending to server). So a code like this
Code: Select all
<p>Phone number: <input type="text" name="areacode" maxlength="3" size="1" value="<?php echo $areacode;?>" class="<?php if($errorareacode==true){echo "error";}?>"/>

highlights the input every time because it actually loses the info entered previously, whether or not it was correct.

Also, I'm sure its the new xampp because the site works fine in my other computer which still runs 1.4.16
I have tried re-installing it using the 3 methods possible but the problem continues. I'm wondering if it is a PHP 5.2.9 update on 'how-to' that I'm missing. :?

NOTE: I'm a basic user.
PLEASE HELP... :D
User avatar
flappy_dog
 
Posts: 3
Joined: 12. June 2009 23:09
Location: Calgary, Alberta

Re: PHP (variables?) not fully functional on XAMPP 1.7.1

Postby Wiedmann » 13. June 2009 00:58

I'm wondering if it is a PHP 5.2.9 update on 'how-to' that I'm missing.

It was a PHP 4.2.0 update...:
http://de.php.net/manual/en/language.va ... ternal.php
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: PHP (variables?) not fully functional on XAMPP 1.7.1

Postby flappy_dog » 13. June 2009 02:44

Thank You!

I guess xampp is forcing newbies like me to correct bad habits. :D
User avatar
flappy_dog
 
Posts: 3
Joined: 12. June 2009 23:09
Location: Calgary, Alberta


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests