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

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

Set Categories
I am creating a submission form for somebody to come in and submit products. These products are sep

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.

exclude characters from counting?
Hello, I wanted to ask if you have a string like:
Code: $my_s='ASRGREGTGTR----REGREGRE+++RRRRRR..

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

Will an XHTML DOCTYPE interfere with my PHP if I'm not experienced enough?
I've read this article here: http://friendlybit.com/html/why-xhtml-is-a-bad-idea/

In a nutshe

parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which wher

Trying to add functions to table
I have this list of characters and I'm trying to figure out what I have to do to put the results of

How to Create a Dynamic table
col1 col2 date1 date2 date3 date4..........
a b v1 v2 v3 v4

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