Skip to main content

All Questions

Tagged with
1 vote
0 answers
56 views

PHP PDO prepared statement with IN [closed]

Here's my code: ...
neubert's user avatar
  • 111
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
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
1 vote
1 answer
83 views

Reduce database touches for one to many data pull

I have the following function which works properly and returns all of the rows from a specific table, then loops through each row to add data related to it as a subarray. ...
GrumpyCrouton's user avatar
1 vote
1 answer
101 views

Displaying a paginated list of forum topics using PHP PDO [closed]

Can someone tell me if this code is safe? Can be sql-injected or something else hacked? Code get some rows from db and show in pages with pagination... if i can improve let me know and show me how, ...
No Name's user avatar
  • 21
1 vote
1 answer
62 views

Insert and update SQL entries for posts to be accessed by up to 3 other users

At first, I have this HTML I use here: body { text-align: center; } ...
Toleo's user avatar
  • 113
1 vote
2 answers
525 views

PHP PDO statements

I wrote a piece of code. and to be honest it seems a bit messy so I would like some opinions on it, and if I can make it cleaner. Or if there are better ways to do it: ...
H. Brendan's user avatar
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
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
1 vote
5 answers
1k views

A like/unlike system using MySQL and PDO

I have created a Like/Unlike system. The user clicks one to indicate a "like", and clicks again to "unlike" it. Currently I do that like this: ...
stack's user avatar
  • 143
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
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
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
1 vote
2 answers
142 views

Storing, fetching, and deleting battle simulation results

my connection code: ...
Brained Washed's user avatar
2 votes
1 answer
353 views

Updating only certain fields on a database row

I have data that I want to insert in a database. Sometime a piece of data is already in the database, so I just want to update the fields that changed. For example, if I insert these rows one after ...
Jonas Schmid's user avatar