Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 402 results for
mysql-escape-string
- Page 1
mysql escape string
Programming
Web Development
16 Years Ago
by desiguru
How do i
escape
a
string
that includes a lot of ' and " Here is my sql inser query's some part [code] VALUES ('','$_POST[FileID]','$_POST[FileAddress]','$_POST[Name]','$_POST[Requirements]','$_POST[DateAdded]','$_POST[Size]','$_POST[Changes]')"; [/code]
Re: mysql escape string
Programming
Web Development
16 Years Ago
by compdoc
ok its better if you assign a variable to each $_POST and use the variable in the insert query like so. [code] //example $FileID = $_POST['FileID']; $FileAddress = $_POST['FileAddress']; $Name = $_POST['Name']; $Requirements = $_POST['Requirements']; $DateAdded = $_POST['DateAdded']; $Size = $_POST['Size']; $Changes = $_POST['Changes'];…
Re: mysql escape string
Programming
Web Development
16 Years Ago
by buddylee17
You could also cleanse the complete post array: [code=php] <?php @extract($_POST); foreach($_POST as $key => $value){ mysql_real_escape_string($value); } //now do specific cleansing and insert query [/code]
Still getting MySQL/PHP Warnings
Programming
Web Development
14 Years Ago
by terrymold
… of errors/warnings: [CODE]Warning: mysql_real_escape_string() [function.
mysql
-real-
escape
-
string
]: Can't connect to
MySQL
server on 'localhost' (10061) in E:\domains\t…\php_newsletter\news_insert_record.php on line 7 Warning: mysql_real_escape_string() [function.
mysql
-real-
escape
-
string
]: A link to the server could not be established in…
get an extra ? in the field after mysql updating
Programming
Web Development
16 Years Ago
by Taosun
… me with a little php and
mysql
problem occurred to the CMS i am… //echo $q; return $this->query($q); } function
escape
($
string
) { if(version_compare(phpversion(),"4.3.0")=="-1…") { return mysql_escape_string($
string
); } else { return mysql_real_escape_string($
string
); } }[/code] when I do …
Re: get an extra ? in the field after mysql updating
Programming
Web Development
16 Years Ago
by Taosun
… = NOW(), "; else $q.= "`$key`='".$this->
escape
($val)."', "; } $q = rtrim($q, ', ') .… by update function [CODE]function
escape
($
string
) { if(version_compare(phpversion(),"4…quot;-1") { return mysql_escape_string($
string
); } else { return mysql_real_escape_string($
string
); } }[/CODE] when I do …
mysql_escape_string
Programming
Web Development
11 Years Ago
by ahmad.albab.87
hi, seems mysql_escape_string was deprecated ([http://php.net/manual/en/function.
mysql
-
escape
-
string
.php](http://php.net/manual/en/function.
mysql
-
escape
-
string
.php)) is there any alternative method? hope php developers can share with me. tq
Re: mysql_escape_string
Programming
Web Development
11 Years Ago
by IIM
… in the [link](http://php.net/manual/en/function.
mysql
-
escape
-
string
.php) you have provided > Warning >…or PDO_MySQL extension should be used. See also
MySQL
: choosing an API guide and related FAQ for … http://www.php.net/manual/en/function.mysqli-
escape
-
string
.php mysqli_escape_string — Alias of mysqli_real_escape_string() So both are…
mysqli_real_escape_string is not working properly
Programming
Web Development
9 Years Ago
by Maryam_7
… (mysqli_connect_errno()) { //echo "Failed to connect to
MySQL
:
escape
string
connection " . mysqli_connect_error(); }else{ //echo "
escape
string
connection works properly"; } // Check connection if…
Converting mysql class to sqlite class
Programming
Web Development
11 Years Ago
by JACOBKELL
…to convert
mysql
class …function af() { return mysql_affected_rows(); } function error($
string
="") { $error = mysql_error(); if…mysql_insert_id(); } function
escape
($
string
){ if(!$this->link) return addslashes($
string
); return mysql_real_escape_string($
string
); } function …
textarea value to mysql using php
Programming
Databases
13 Years Ago
by eoliva
… form to submit the value and finally store to a
mysql
database table. Here is what I have, I am sure… corresponds to your
MySQL
server version for the right syntax to use near 'description) VALUES('this a real
escape
string
test')' at line…
Re: slow PHP AJAX MySQL - database example w3schools
Programming
Web Development
11 Years Ago
by kanoy83
hi guys, thanks for the reply. i managed to remove the 'real
escape
string
' and use mysqli, but i stumble now to
MySQL
JOIN. let u know the progress. cheers!
slow PHP AJAX MySQL - database example w3schools
Programming
Web Development
11 Years Ago
by kanoy83
…. i use this script from w3schools it works with real
escape
string
. But my problem is it is slow displaying the table…
Deleting item when your admin
Programming
Web Development
14 Years Ago
by Imratzio
…["manager"]);//filter everything but numbers and letters //run
mySQL
query to be sure that this person is an admin…($_POST['product_name'])) { //makes sure user has pressed the submit form //
mysql
escape
string
function to filter the data before sending to the database…
Re: PHP MySQL database query using variable passed in hyperlink query string
Programming
Web Development
14 Years Ago
by phpology
…;'"; [/CODE] [URL="http://php.net/manual/en/function.
mysql
-real-
escape
-
string
.php"]http://php.net/manual/en/function…
Re: mysql_real_esc_str expecting string
Programming
Web Development
16 Years Ago
by LoveSquid
Check this section: [URL="http://www.php.net/manual/en/function.
mysql
-real-
escape
-
string
.php"]http://www.php.net/manual/en/function.
mysql
-real-
escape
-
string
.php[/URL] Hopefully someone more skilled can actually help you.
Re: How to do the checking before insert into mysql by csv file?
Programming
Web Development
14 Years Ago
by vibhaJ
You can use mysql_real_escape_string function before inserting data in
mysql
. [URL="http://in2.php.net/manual/en/function.
mysql
-real-
escape
-
string
.php"]http://in2.php.net/manual/en/function.
mysql
-real-
escape
-
string
.php[/URL]
Re: PHP MySQL 5.0 stored procedure
Programming
Web Development
14 Years Ago
by mazeroth
You have to
escape
special characters. One way to do this is to user addslashes for example: [CODE]query("call store_proc('addslashes($param1)')");[/CODE] If you are using
mysql
, you can use their mysql_real_escape_string instead: [url]http://us2.php.net/manual/en/function.
mysql
-real-
escape
-
string
.php[/url]
Re: basic: fetch id and data in PHP MySQL
Programming
Web Development
12 Years Ago
by broj1
…/manual/en/book.mysqli.php) extension instead of the older
mysql
exstension to deal with database If you use a web… using [mysqli_real_escape_string](http://php.net/manual/en/mysqli.real-
escape
-
string
.php) $name = mysqli_real_escape_string($_POST['name']); $query = "SELECT * FROM tablename …
Re: Connection of PHP and mysql
Programming
Web Development
8 Years Ago
by cereal
…,$conn); $conn = mysqli_num_rows($result); Add the connection parameter to the
escape
functions, reverse the parameters in the query function and, in…); Docs to read: * http://php.net/manual/en/mysqli.real-
escape
-
string
.php * http://php.net/manual/en/function.error-reporting.php
Re: PHP Trouble saving FPDF as Mysql Blob and Retrieve it
Programming
Web Development
14 Years Ago
by dennishall
Did you see teh info about MEDUIMBLOB vs. BLOB and teh
escape
string
. Those 2 items fixed the fpdf corrunption issue in that post.
Re: PHP Trouble saving FPDF as Mysql Blob and Retrieve it
Programming
Web Development
14 Years Ago
by red_ruewei
[QUOTE=dennishall;1337439]Did you see teh info about MEDUIMBLOB vs. BLOB and teh
escape
string
. Those 2 items fixed the fpdf corrunption issue in that post.[/QUOTE] thanks for responds.will look it now
Re: How To Send MYSQL Data To An Email
Programming
Web Development
3 Months Ago
by Dani
…lets me see you are using PHP's deprecated
mysql
library instead of its replacement, the mysqli library.…
MySQL
injection bug on line 16. You absolutely want to use [real_escape_string()](https://www.php.net/manual/en/mysqli.real-
escape
-
string
….php) as so (my example code uses the
MySQL
instead of the MySQLi library…
Re: Can't get mysql transaction to complete
Programming
Web Development
12 Years Ago
by LastMitch
… way of getting this code to execute the
mysql
queries. I stop using `
MYSQL
` and I'm using `MYSQLI`. Just update the….net/manual/en/function.
mysql
-query.php Read this about` mysql_real_escape_string()`: http://php.net/manual/en/function.
mysql
-real-
escape
-
string
.php What `CMS…
Re: Form Into MYSQL Problem
Programming
Web Development
13 Years Ago
by RMelnikas
Smeagel13 thanks that worked and thank your for the help with the real
escape
string
just new to sql
Re: mysql error
Programming
Web Development
16 Years Ago
by MVied
…;)[/code] When seperating a variable from text in a PHP
string
, you always concatenate with a period. So this part of… practice to use them if you're checking for a
string
. Numbers are better to leave out of quotes. The … using single quotes throughout the
string
. Do not mix and match. You do not need to
escape
the single quotes because they…
Re: mySQL query error?
Programming
Web Development
15 Years Ago
by digital-ether
…/manual/en/function.
mysql
-query.php[/url] Also make sure to quote the
string
you send as well as
escape
them with mysql_real_escape_string…
Re: Creating a search which collects data from MYSQL Database and displays.
Programming
Web Development
15 Years Ago
by Will Gresham
… them through [URL="http://php.net/manual/en/function.
mysql
-real-
escape
-
string
.php"]mysql_real_escape_string[/URL] first. Also, with Postcodes people…
Re: get an extra ? in the field after mysql updating
Programming
Web Development
16 Years Ago
by diafol
… you still get the '?' you know it's not the
escape
function. In addition, it shouldn't really matter, but through…
Re: Still getting MySQL/PHP Warnings
Programming
Web Development
14 Years Ago
by mazeroth
… work you need to have an active connection to a
mysql
database. Make sure you are connected to the db and…
1
2
3
7
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC