I decided to learn php. I went to library and I borrowed a book “PHP 5 Unleashed”. After that I installed wamp (apache, mysql and php) and I tried to run an example from the book.
Everything works fine when I run an example on the javanus.com server but I got the following error on localhost: You don’t have permission to access /php5_unleashed_code/5/< on this server.
I found out that %3C is presented in the URL instead of listing5_5.php (http://localhost/php5_unleashed_code/5/%3C?submit=1&username=user_input_name).
The reason is in the next statement: <FORM ACTION=”<?=$_SERVER['PHP_SELF']?>” METHOD=GET>
It works if I modified the statement above with <FORM ACTION=”/php5_unleashed_code/5/listing5_5.php” METHOD=GET>.
I tried to echo $_SERVER['PHP_SELF'] and I got the following value: /php5_unleashed_code/5/listing5_5.php
I modified the code as:
<FORM ACTION=”<?php echo $_SERVER['PHP_SELF']?>” METHOD=GET>
…mission completed. Another problem solved.
