Use css variable embedded in php file

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Wed Feb 05, 2014 2:56 pm

Use css variable embedded in php file

Postby woodrosealion » Wed Feb 05, 2014 6:50 pm


I would like to pickup a color variable from a url and use that variable for the css within the php file.

I have a URL ... 6&c=57B6FF
My php pulls out the c as the color variable
$formcolor = $_GET['c'];

and I would like to use that variable in the css

.rectangle-speech-border {
border:10px solid #'.$formcolor.';
/*text-align:center; */
/* css3 */
margin: 0 auto;

Doesn't seem to be working, any advice ?

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 8 guests