/    Sign up×
Community /Pin to ProfileBookmark

Using a variable from javascript in php?

Hi,

I am using some javascript on a php page to select colours so I can use my page to write a stylesheet. I have it working to the point that I can display the stylesheet text on the page. But I want to either write it to a file, or store it in a mysql database. Does anyone know how I can take the variable from javascript so I can use it with some php code on the same page?

Thanks in advance.

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@JonaJun 14.2004 — [font=arial]Populate a hidden input field with JavaScript and have the form submitted through JavaScript but to the same page, and if the hidden input is not empty, write the stylesheet to a CSS file.[/font]
Copy linkTweet thisAlerts:
@TaipanauthorJun 15.2004 — Thanks for that, I'll give it a try.
Copy linkTweet thisAlerts:
@JonaJun 15.2004 — [font=arial]You're welcome, and good luck![/font]
×

Success!

Help @Taipan 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.4,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

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