Skip to main content

All Questions

Tagged with
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? ...
user avatar
7 votes
2 answers
1k views

PDO wrapper structure

Is this PDO wrapper structure dynamic? Can using self:: rather than $this cause problems? ...
Khalid Okiely's user avatar
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: ...
irtexas19's user avatar
  • 173
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 ...
Tania Rascia's user avatar
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 ...
Andurit's user avatar
  • 245
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 ...
Michael Benneton's user avatar
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. ...
Qwiso's user avatar
  • 73
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: ...
John Beasley's user avatar
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 ...
Abed Shatila's user avatar
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 ...
sasa's user avatar
  • 165
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 ...
mario's user avatar
  • 249
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: ...
Phillipp Schwarz's user avatar
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 ...
Carlos Arturo Alaniz's user avatar
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: ...
Viscocent's user avatar
  • 166
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. ...
stack's user avatar
  • 143

15 30 50 per page