All Questions
Tagged with mysql sql-injection
24
questions
10
votes
4answers
1k views
Inserting 1 line into my SQL database
This is for adding code into my table really easily, however it will be called 2000+ times per second, so I need to know if this is the most efficient code to add a row to the database.
...
7
votes
2answers
2k views
User registration and login
I am doubtful about the security of my PHP code. I am new to programming, but want to learn how to secure things, protect my databases from SQL injection, and other best practices. I'd like to know if ...
6
votes
1answer
343 views
mysql_safe_query()
I have been thinking of a sql-injection free implementation in dynamic languages. Here's what I came with. All the code was written just for fun and learning purposes.
I would like to share it and ...
5
votes
2answers
2k views
Possible SQL injection vulnerability searching for a product by ID?
I want to be sure that this isn't vulnerable to SQL injection. If yes, then how can it be improved?
...
4
votes
2answers
174 views
Injections and query
I made a class that connects to my DB and inserts some values. Is it secure or how can I protect this further from injections? The object declaration will come from variables with POST from a form, ...
4
votes
1answer
81 views
Possibility of SQL Injection
I am requesting a review of a portion of a 600 lines of code. This portion of the code process a filter that is farther down the page. It takes in the parameters and formats them into a query. Now I ...
3
votes
2answers
452 views
Confirming safety of SQL injection
I believe with everyone's help on Stack Overflow, I got my code safe guarded from SQL injection. I'm trying to confirm that is correct, just in case I misinterpreted the help and advice I received.
<...
3
votes
2answers
978 views
Increase view counter with each page view
My question is similar to before, but now the code has changed completely. I would like to understand if this code is vulnerable to mysql injection.
...
3
votes
4answers
2k views
using $_POST array to prepare PDO statement with variables
I have been developing a little, private Blog Site to make notes/ stories of pen and paper rpg games available for me and my players.
This is my first project. As I am new to coding in PHP and MySQL ...
3
votes
1answer
891 views
PHP code to insert phone number and IP address into a table if not already present
I am currently coding a PHP script that connects to a database and inserts a phone number and IP address if either item is not present in the table. I believe I have completed it and it is working but ...
3
votes
1answer
213 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 ...
2
votes
1answer
97 views
Does this PDO process look protected from SQL injection?
Does this process look protected from SQL injection attacks?
Is there something I could possibly change to make it more protected?
...
2
votes
2answers
224 views
Inserting e-mail subscribers into MySQL
I'm new to Python and I am learning database connections from here.
This is the code I am using to insert e-mail subscribers into a table:
...
2
votes
1answer
136 views
Inserting a record into a MySQL table using PDO
Already many days I'm documenting about the SQL Injection. I was wondering if the code I wrote is vulnerable in some of its parts.
...
2
votes
1answer
435 views
Simultaneously searching listings by attributes such as category, title, postcode
Is the code below safe from SQL injection?
...
1
vote
1answer
761 views
How safe is my MySQL query?
I am using PDO for the first time in my project. In my previous project someone suggested me to use PDO as my queries were wide open to inject. I am pasting a sample code of my project. Can you ...
1
vote
2answers
111 views
Security concern for SQL Injections/XSS
This question is everywhere, and I looked at many answers. A lot suggest using mysql_real_escape_string but that isn't an option, since it's depreciated now.
...
1
vote
1answer
215 views
Product inventory database
I just finished writing a program which working with a database. Throughout the process when working with people to get past some of the hurdles I faced I was ridiculed for my SQL statements. I have ...
1
vote
0answers
77 views
HTML file with a submit form
I have an HTML file that contains a submit form, which asks the users the fill in their personal info:
then it will post and store into the DB by method of PHP SQL:
...
0
votes
1answer
64 views
Link shortening script
I wrote this script for a link shortener just for fun.
Is it safe, or is it very easy to inject SQL have other security shortcomings? Also, do you have any tips against MySQL injection?
I don't know ...
-1
votes
2answers
142 views
Validating users with MySQL
One of my friends told me that my validate.php file has some problems with SQL injections. Please feel free to commit it on GitHub.
...
-1
votes
2answers
230 views
Search for a transaction
Could you have a quick look over my code to see if it's safe from SQL injection etc.. and suggest any amendments?
...
-1
votes
2answers
105 views
My Script Inserts users into a database and hashes the password, I need to know how to prevent SQL injection with Procedural-Oriented MySQLi [closed]
My script works but I just want to know how I can protect myself from SQL injection with Procedural Oriented MySQLi. Most of the tutorials are about Object-Oriented MySQLi and I'm not familiar with it ...
-1
votes
1answer
106 views
Improving PHP Security of Login
One of my github issues is below. I am having some problems with my security, is there anything that I should or need to improve. Here is an example of code that I use, but throughout the script there ...