Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Drop Down Executes Query On Post? Reply To: Drop Down Executes Query On Post?

#170636
__
Participant

Sorry no I don’t mean nothing is displayed I mean the page just refreshes with the container, nav elements, dropdown and submit button but it doesn’t fetch the data.

ah.

I thought post would execute the query?

No, POST sends form data from the browser to the server.

There are no errors in the code, error reporting is on.

Odd. In the code you posted (in your gist), you never execute the query you chose. $result is not defined anywhere before you try to fetch from it. This would cause an error. Are you sure your error reporting is set high enough (E_ALL or better)?

$formValue=array();
foreach ($_POST as $key => $value) {
$formValue[$key] = strip_tags($value);
$usercomments = nl2br($_POST['usercomments']);
$_SESSION['post_vars'][$key] = $value;
}

I don’t follow why you are doing all this …?
It doesn’t seem related to the problem we are talking about.

I did notice, looking back over your code, that you were printing the results (the star ratings) before you actually started your HTML markup (doctype, <head>, etc.). This might have something to do with the problem, but you’d probably still see the results (they would just be in the wrong place).