...

View Full Version : Help with Output colors for Forms



ommoi
10-20-2012, 05:29 AM
Hey guys,
I need a little help here. For some reason, I can't get the font color of the input as red. Here's what I have so far:

The initial input page:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>Data Input</title>

</head>

<body bgcolor="white">
<form style="color:red" action="function.php" method="GET">
<br> Input any word or phrase:
<input size="big" type="text" name="word" value="">
<br><input type ="submit" value="submit">
</form>
<br><a href="index.php">Home</a>
</html>





The output page: (I want only what the user input is to be red)


<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>echo</title>
</head>
<body>
<?php
print "<h1>You have input: ";
if (isset($_GET['word']))
echo strtoupper($_GET['word']);

?>
</body>
</html>



Any ideas?

mlseim
10-20-2012, 06:02 AM
echo "<span style='color:#ff0000;'>".strtoupper($_GET['word'])."</span>";

ommoi
10-20-2012, 06:21 AM
Thanks for your help! :)

Do you know of a way to get it to work by implementing it into the 1st code rather than the 2nd code?

Inigoesdr
10-20-2012, 06:31 AM
Add your style tag to the input tag instead of the form.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum