All Questions
Tagged with mysql-real-escape-string database
10 questions
3
votes
1
answer
19k
views
mysql_real_escape_string not working for me [duplicate]
When I try to do a mysql_real_escape_string for a login system, it does not record the variable from the form. If I do
$username = $_POST['username'];
and echo it, it displays, but when I do
$...
0
votes
0
answers
63
views
string replace in PHP is not working [duplicate]
I need to insert (for example: "ABC") to my wamp db. I'm using str_replace method for this. Code is as shown below:
$currAddr=str_replace(array("'","\"", """),"'",htmlspecialchars($...
1
vote
1
answer
2k
views
Using mysql_real_escape_string return empty
I use mysql_real_escape_string to escape $this->piVars.
....de/index.php?searchGenre=5
$searchGenre = mysql_real_escape_string($this->piVars[searchGenre]);
$result = $GLOBALS['TYPO3_DB']->...
0
votes
2
answers
432
views
real_escape_string not cleaning up entered text
I thought the proper way to "sanitize" incoming data from an HTML form before entering it into a mySQL database was to use real_escape_string on it in the PHP script, like this:
$newsStoryHeadline = ...
0
votes
2
answers
201
views
php real_escape_string(), query not working anymore
I want to be able to add and update certain information. Now it was all working fine untill I found out the script no longer works when there's quotation marks in the text being sent to the database.
...
0
votes
3
answers
236
views
mysql_real_escape_string error
I'm getting Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'username'@'localhost' (using password: NO)
Here's my code..
<?php
include 'config.php';...
-1
votes
1
answer
3k
views
PHP mysql_real_escape_string or alternative with PDO
I'm trying to migrate a lot of old PHP mysql prodecural function like mysql_query, mysql_real_escape_string etc. into PDO with minimum effort. I don't want to rewrite every old DB function. The reason ...
11
votes
6
answers
29k
views
PHP mysql_real_escape_string returns empty string
I'm trying to work a bit of security and sanitization into my databases application (for a class). to start off with, i'm trying to use mysql_real_escape_string, but whenever i use it, it always ...
0
votes
1
answer
258
views
How can I allow only HTML into my database?
I'm trying to allow the user to input only HTML into a form, and on submit, store it into the database. I've been trying to use mysql_real_escape_string, but the PHP I put into the form with the HTML ...
1
vote
2
answers
2k
views
apostrophe in mysql/php
i'm trying to learn php/mysql.
inserting data into mysql works fine but inserting those with apostrophe is generating an error. i tried using mysql_real_escape_string, yet this doesn't work.
would ...