I have a comment/feedback page on my website and after I enter the information and hit submit I would like the same page to refresh with the new information added, but instead it is being redirected. I know very little about php. The web page is [url]http://www.dancleary.com/feedback.php
What’s happening is that there is something about your php installation that is causing aberrant behavior on the part of php. Here’s what is happening:
When you browse to [url]http://www.dancleary.com/feedback.php
feedback.php calls head-inc.php and comments.php using include statements.
comments.php uses the value in the global server variable called $_SERVER[‘PHP_SELF’] for the url of the page that will be displayed when the user clicks on submit. When the comments.php code is executed that variable should contain “feedback.php” because feedback.php is the currently executing script.
Instead, that variable contains “
/talkback/comments.php
“. For some reason your php system is setting the value of
that variable incorrectly.
I did another test…I changed feedback.php to set a variable. The contents of that variable should carry through to head-inc.php and comments.php. In other words if I set variable $x = ‘1’ in feeback.php, in comments.php if i print that variable it should print the number 1. But it doesn’t, the variable shows as empty (not set). I have never seen this behavior