![]() |
Why isnt my close statement working?
Quote:
This is on my Create of the CRUD system I'm putting together :Oh crap Any pointers please? |
You are redirecting to index.php and exit()'ing in the event of success, so you never get to that code nor the mysqli_close.
It's also better to not using a closing ?> *at the end of the file*. If you press enter or a space after ?> for instance in your config.php file which you are including at the top, your header() line might fail because a space or linebreak has already been sent to the output buffer. |
Quote:
So should I just get rid of those then or do something with the redirection? This is behind a .htaccess protected directory so I'm not all that concerned about closing out the connection at this moment in time if I don't need to in order to get this working lol |
Why are you still using mysqli in 2021?
|
Quote:
|
Quote:
Yes, its really old, the standard thing to use has been PDO now for almost a decade. But TBH, if your just doing crud, it might be better to just use a headless CMS like strapi.io |
Quote:
|
Quote:
One thing about PDO vs mysqli is that PDO has like a dozen db drivers, mysqli just does mysql. Switching, if you ever have to, will be a lot easier and quicker on PDO. |
Quote:
|
All times are GMT -7. The time now is 11:32 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123