All Questions
35
questions
10
votes
4
answers
837
views
Listing products from a database
I've this function to list products from database by category. I'm using prepared statements, but wouldn't this make it pretty pointless to use them?
...
7
votes
2
answers
1k
views
PDO wrapper structure
Is this PDO wrapper structure dynamic? Can using self:: rather than $this cause problems?
...
5
votes
1
answer
144
views
Storing and confirming user input
I am a beginner, and I'm trying to secure a sign-login system on my website. Is my code good/enough to prevent SQL injection?
THIS IS THE SIGN FILES
This is the index.php that takes user input:
...
5
votes
2
answers
1k
views
Inserting users using PDO prepared statements
I made a small script to update fields in a database. I'm using PDO to connect to MySQL. All the business logic of PHP is in the top half of the file, and the form is at the bottom.
Here is the full ...
5
votes
1
answer
386
views
Tools for transferring data from an API to a database
I explain everything on my current code but this question is more general "HOW TO" work correctly with this in this case but even next time.
I have 4 methods in my class, each does something but in ...
5
votes
1
answer
2k
views
PHP Login Authentication with BCrypt
I have a php authentication script and everything works fine, but I'm very unsure about the way I programmed it (I hardcoded some things). I was hoping stack could look through this and point out any ...
4
votes
1
answer
22k
views
Converting entire table to JSON data. Is there a better way?
Building a 'card' database: I'm simply learning to take input data and store to database. Incorporating JSON, PDO, SQL, and enforcing my general coding skills through PHP, hopefully.
...
4
votes
2
answers
205
views
Using a transaction to create account records
This is my first time using commit and rollback. I just need to know if this is a proper execution of the functions for this particular situation:
...
4
votes
3
answers
345
views
PHP Signup & Login
I want everything to be well and secure with my authentication code. I've done many signup and login systems before but just for testing purposes, and didn't take into consideration all the security ...
4
votes
1
answer
448
views
PDO Database wrapper [closed]
The subject is this small project - PHP/MySQL Database wrapper
The three main goals of this projects are:
Easy way to map database columns to object properties
Simple solution to insert or update ...
3
votes
1
answer
1k
views
PHP + PDO - Inserting data on the table with a loop
First of all i made a simple code to insert data on my table, with the information from this code i made a loop to insert data on another table for a notification system.
I'm new to PHP and i think ...
3
votes
1
answer
806
views
Does PDO::quote helps me to protect me against sql injection?
I have to process raw sql user input with Laravel. I've backed them up as follows:
...
3
votes
1
answer
220
views
Fetching and formatting content from a database
I've wrote this script to fetch and format content from my DB. It also counts how many result there are and separates them into pages. I'm barely learning PHP and MySQL so I don't know much about ...
3
votes
1
answer
250
views
Code Reiview for an PHP PDO Queries? is there a better way to do it?
so this is my code for a equipping an item in my game dev't:
...
2
votes
2
answers
108
views
Checking a user's emails using an ID
I'm trying to do this:
Getting user's ID based on his email name.
Using that user_id to check all his emails that have been sent for him so far.
...