Hey there,
When I post a form, i've got into the habit of using something similiar to:
if($_POST['submit'])
{
// Process Results
} else {
// Show Form
}
Now, on the server i used to be hosted on, which was running linux, I could do that, and set $php_self in the form properties:
eg:
<form method="post" action="<?php echo $PHP_SELF?>">
And my scripts would work fine. However, now, when I do it, they don't keep the ?parameter=(s), they Just have the filename.
In other words.. if I had a form, and the page was index.php?action=addnews, and I then clicked submit, instead of the form sending the info to index.php?action=addnews, it would send it to "index.php", and because then the addnews script was not included, the function to add the news would not trigger.
Does anyone know how to fix this without having to go and recode every instance of $PHP_SELF to a manual filename?
Thanks,
uNF 🙂