/    Sign up×
Community /Pin to ProfileBookmark

How to secure variable in Javascript code with PHP?

I have variable within web site page and need to secure as there is e-mail within javascript tag like:
var subMail = “[email protected]“;

How to put global variable with PHP to this kind of javascript tags?

Is it possible with PHP within javascript code or submit button will not detect this variable?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@sstalderFeb 21.2008 — So you are wanting to hide that email address from the javascript code? You can't.

You can use PHP to send the email, then no one can see the email address, but not if your using javascript(for some reason).
×

Success!

Help @toplisek 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.12,
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,
)...