PDA

View Full Version : question dont know what to call it


MrTickles
09-15-2002, 04:30 PM
If i knew the name for what i want to do I woulda searched for an answer first, but I have no clue what to search for to find an answer to this.


I want to add:

style="background-color:<?php echo"$color1"?>; border: 1 solid <?php echo"$color3" ?>">

To this piece code:

<INPUT NAME=\"fileup$num\" TYPE=\"file\" >

Ive tried a bunch of things I keep getting an unexpected T_VARIABLE error.

It is a file upload button.(just like the one below) I want to change the backgorund color of the textbox and of the browse button itself.

Any help would be great thanks
:)

craigh@mac.com
09-15-2002, 10:13 PM
why don't you try using PHP to print the style definition into a css class in the head of your doc and then refer to the class in the button...


<HTML>
<HEAD>
<STYLE TYPE="text/css">
.mystyle {
background-color: <? echo $color1 ?>;
border: 1px solid <? echo $color3 ?>;
}
</STYLE>
</HEAD>
<BODY>
<?
print ("<INPUT NAME=\"fileup$num\" TYPE=\"file\" class='mystyle'>");
?>

c q
09-28-2002, 04:31 PM
why....it shud work just fine your way too...
methinks the err is


echo("$color");
note the brackets around your vars.