If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.
But what is the fucking actual error? Get the error log open, find the real problem, this gives me nothing.
Maybe your db credentials are invalid?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.
I do not understand what is the error in my code.
in my case the error appears when there are players to sell or buy offline.
if there are no players in offline work correctly.
Dude, wtf? Do you even have access to your website's error log? You know, the one in /var/log/nginx/yourdomain-error.log or /var/log/apache2/yourdomain-error.log?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.
Yeah, not helpful. Try my code and get access to your error log. I have accounted for offline traders.
Just change the dbname/login/password in the file.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.
You better work on polishing your HTML/PHP skills now. The previous script was really badly written.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.
$dbcon = new mysqli('host', 'username', 'password', 'database'); if (mysqli_connect_error()){ error_log('Failed to connect to the database. Error: [' . mysqli_connect_errno() . '] ' . mysqli_connect_error()); die();}
inside a different file and require it in this script. It's basic stuff.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.