/    Sign up×
Community /Pin to ProfileBookmark

build a newsletter

Llo

which is the best/safest way to build a newsletter?
Put input (=email address) in my MySQL db?

Thanks

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@pyroDec 14.2003 — I'm assuming you are asking about security, rather than actually HOW to do it, so I'd recommend passing the input into the database through [URL=http://us4.php.net/manual/en/function.stripslashes.php]stripslashes()[/URL] (so they can not execute DB commands) and [URL=http://us4.php.net/manual/en/function.htmlspecialchars.php]htmlspecialchars()[/URL] (for when the data is read out of the DB and printed on the page).
Copy linkTweet thisAlerts:
@Bobby_SauthorDec 14.2003 — [i]Originally posted by pyro [/i]

stripslashes (so they can not execute DB commands) [/QUOTE]

What do you meen with this?

I've taken a look at the php site but can't see the use of it.

Soory for asking, but I'm new to this.

Is it for cleaning the input so crackers can't harm my DB.

I don't know much about DB security. :rolleyes:
Copy linkTweet thisAlerts:
@pyroDec 14.2003 — That is because most servers have [url=http://us3.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc]magic_quotes_gpc[/url] turned on. The htmlspecialchars is doing most of the work... And yes, it is to disallow potential hackers from using ' and " which could be security concerns.
×

Success!

Help @Bobby_S 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...