All Questions
13 questions
4
votes
2
answers
217
views
Security of post submission, picture upload and post fetch
I am a newbie and have been following a tutorial I bought on Udemy. But I was told it is old and teaches bad code practices. I used this in some code from my old projects. Now I'd like to know how ...
3
votes
2
answers
431
views
Implementation of a Custom Database Class
Following Database Class is what I'm using as a wrapper to connect with MySqli in a application, and below the class is how i'm implementing it currently I'm not sure if this is the right way to ...
1
vote
1
answer
4k
views
PHP handle array when query database with one-to-many relationship
Well, I am writing a web service using PHP to return data from a DB in JSON format. I need to query 3 tables, which have a one-to-many relationship, like shown below:
...
2
votes
1
answer
1k
views
PHP/MySQLi code for registration/login form
The following code works, I just want to know if there are any suggestions as to how I can make it better or more secure.
config.php:
...
4
votes
1
answer
704
views
Database connection wrapper class
I am trying to create a PHP / MySQLi wrapper class that uses prepared statements, the goal of the class is to create a connection to the Database, then INSERT / <...
4
votes
1
answer
734
views
Website user password verification
I have a login web page where a user enters their email and password and I need to check if:
the entered email exists in the DB and
the entered password matches the hashed one from the db.
The ...
3
votes
1
answer
250
views
Calling a MySQL procedure with an arbitrary parameter on a GoDaddy website
I'm deploying a PHP project, and I always try to use prepared statements, but unfortunately, GoDaddy does not have the mod mysqlnd which I use it for the function ...
6
votes
1
answer
3k
views
Doing a roll back with multiple MySQLI prepared statement
This is my code for doing a roll back with multiple MySQLI prepared statement.
I want to know if anything is wrong with the code.
...
6
votes
2
answers
253
views
How is my injection protection?
What do I need to do to prevent injections? In addition, if I have any statement/parameter errors, please tell me.
...
4
votes
3
answers
161
views
Inline PHP IP access log
For a website, I've got some inline PHP, posted below. It's supposed to log traffic to the website, and it does its job fine. But at the end of the day, I'm not even close to a PHP developer, and ...
5
votes
2
answers
8k
views
My database class extends MySQLi
The following is a small class I extended MySQLi with. I'm going to use this in my upcoming projects, but my main reason to do this class is learning, so I would like to submit this for your review, ...
5
votes
1
answer
859
views
Arithmetic quiz using PHP5 and mySQLi
I would very much appreciate a general review of my PHP code which grabs information from a mySQL database and also inserts some information into the database.
Overview :
Users go to /main.php and ...
8
votes
1
answer
580
views
MySQLi_Recordset: blending SPL and Statement/Query results
I've made a SPL-based class named "Recordset" that wraps both MySQLi_STMT and MySQLi_Result objects and allows treating either as a 3-dimensional array. It requires PHP5.3+.
I'm pretty bummed about ...