mysql_real_escape_string making variable equal nothing


Posted on 16th Feb 2014 07:03 pm by admin

i post a form and i post the variable:
Code: $var = $_POST[variable];then i echo $var its what i submitted the variable to be.
then i add the mysql_real_escape_string() function to it
spell it correctly too
Code: $var = mysql_real_escape_string($_POST[variable]);then i echo the variable it equals nothing?
why?
is it because i havent added a mysql query on yet or what?

No comments posted yet

Your Answer:

Login to answer
316 Like 44 Dislike
Previous forums Next forums
Other forums

error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the struc

Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

Get last modified date of web page
Hai All,

In php how can i get last modified date of a give web page . I have tried to g

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: function createthumb($name,$filename,$n

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

Referential Integrity problem when inserting into 2 tables at same time
Hello Everyone,

Im relativity new to PHP and MySQL and i have come up against a problem. i h

Chat Box in PHP
I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Mes

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash