After submitting a form to its self I get a blank page
I have a form that submits to itself and when I submit I get a header and the background but no content on the page, nothing below title in the html. It doesnt write to my database either, no erro开发者_Go百科rs, and the styles are there.
I think it has to do with my mysql connection.
I've uploaded everything here https://www.yousendit.com/download/bHlCVWRuTkFTRTUzZUE9PQ
This is for my project as I learn php and mysql and this is a wall I cant get past. Please help!
In index.php file you have:
require_once "quoteit-functions.php";
require_once "quoteit-post.php";
and than you have in quoteit-post.php file:
require_once "quoteit-functions.php";
remove that line because that file is automatic included in that file, instance is used from index.php file.
This was the solution via my teacher late last night:
The main problem that you don't see anything displayed was because you close the connection in quoteit-post.php - and that's before you attempt to reuse "$db" to display and do the count. I moved it out to index.php.
精彩评论