Hey people,
Bit of a query, I'm having trouble echo'ing $_SERVER['PHP_SELF'];.
When I echo it as part of a form, It doesn't seem to work and just takes me back to the homepage which is not where I am on the site.
The way round it that I have at the moment is by doing this:
<?php
//Previous stuff...
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data" name="delcom">
<?php
//Rest of form...
?>
Is there a reason why I would have to do that to get it to work?
I try to echo it after a IF statement that checks to see if there are any entries in a database - does it not work within an IF statement?
Thanks.