Use css variable embedded in php file

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

woodrosealion
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

Hi,

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 https://secure.xxxxxxxx.com/phpc/extsig ... 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; */
color:#333;
background:#fff;
/* css3 */
-webkit-border-radius:20px;
-moz-border-radius:20px;
border-radius:20px;
margin: 0 auto;

Doesn't seem to be working, any advice ?

Return to “PHP coding => General”

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron