/    Sign up×
Community /Pin to ProfileBookmark

adding mysql_real_escape_string

When i am preparing my data for insertion into the database i am adding mysql_real_escape_string, but how do i add it to the [b]about_me[/b] part.

[code=php]//retrieve form data in a variable
$firstname = mysql_real_escape_string($_POST[‘firstname’]);
[b]$about_me[/b] = ‘?’;[/code]

there is no text field called, about_me. I am just giving about_me a value of “?” so that it will be inserted into the database (it will be used later on) But just incase someone tries to mess around with my code i want to add mysql_real_escape_string infront of it
Edit/Delete Message

thanks

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@JDM71488Jun 27.2007 — If your PHP script declares and intializes $about me with '?' that is what it will be when it is inserted into the database.
×

Success!

Help @jack_23 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...