Helo! When I add the code:<form action="<?php echo $PHP_SELF;?>" method="post" > to a html script, I get the error message "You don't have permission to access /< on this server." I tried to modify the action code using print instead of echo and $_SERVER['PHP_SELF'] instead of $PHP_SELF, but still doesn't work. I use WAMP by the way!Do I have to modify the php.ini, maybe!? Please help!
Check the source code of the HTML when you open the PHP file from your browser, what does it show in the form action? stupid question but, are you sure you are saving the file as .php? seems like the PHP is not getting rendered at all..
I strogly condemn this word "stupid"...if someone is new to any field he not stupid he is just inexperienced.
Looks like your file type is .html, it should be .php and try echo $_SERVER['PHP_SELF'] instead of $PHP_SELF Hope it will help. You can write html on php file but you cant do the opposite to make it work properly Thanks
Helo! Here is my HTML code: <html> <?php if (!empty($_POST['tipp'])) { print "Az utolso tipp: ".$_POST['tipp']""; } ?> <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" > <input type="submit" value="rendben"> <p> Ide irja tippjet:<input type="text" name="tipp"/> </p> </form> </html> I saved it as 2.html, when I type it to the browser a textfield appears, then I write some text there, and when I press Rendben(Submit), the error message appears. I think this should clarify what the problem is! I will try to make changes according to your suggestions. Thanx p.s. (I started learning php 2 weeks ago)