Jump to content

Why wont this work?


jwilh

Recommended Posts

[code]<p style="color:White">
<div ALIGN=CENTER><h3><?php
if (isset($_POST['name'])){
echo "
Welcome <B>$_POST[name] !</B>\n";
};
?></p></div></h3>[/code]

I have messed around with this for awhile and I cant figure it out. The color will not show up white like I want it to. All my other codes that are written like this show up just fine so what could be the problem with this one?
Link to comment
https://forums.phpfreaks.com/topic/26280-why-wont-this-work/
Share on other sites

You most likely have a style sheet or something that is overwriting this white color.  Try putting that tage INSIDE of the "<B>" tags to see if that helps the situation.  If not please run the script on your site, view the source, and then paste that into here so that we can see the actual script that php is writing out.
Link to comment
https://forums.phpfreaks.com/topic/26280-why-wont-this-work/#findComment-120189
Share on other sites

Ok that did not work, so here is all the code. WARNING: Kinda Messy  ;D

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>Sic-Site Testing</title>
</head>

<body background="/php/upload/backtile.gif">
<DIV ALIGN=CENTER><img src="/php/upload/Default.jpg"></DIV>


<div ALIGN=CENTER><img src="/php/image.php" border="1"></div>




<div ALIGN=RIGHT>
<p style="color:White"><i>
<?php
echo date("d M Y");
echo "<br>";
  $d=date("D");
  if ($d=="Fri")
echo "Have a nice weekend!";
    else
echo "Have a nice day!";
echo "<BR>";
?>
</p></div></i>

<p style="color:White">
<div ALIGN=CENTER><h3><?php
if (isset($_POST['name'])){
echo "
Welcome <B>$_POST[name] !</B>\n";
};
?></p></div></h3>

<form name="myName" action="" method="post">
<p style="color:White">Name: </p><input type="text" name="name" value="" /><br />
<input type="submit" name="submit" value="Submit" />
</form>



<br>
<BR>
<br>
<BR><br>
<BR>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file"><p style="color:White">Filename:</p></label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form></p>


</body>
</html>[/code]

Link to comment
https://forums.phpfreaks.com/topic/26280-why-wont-this-work/#findComment-120192
Share on other sites

the html is in there lol, that is all of it. but i will give u only the html if thats what u want  :)

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>Sic-Site Testing</title>
</head>

<body background="/php/upload/backtile.gif">
<DIV ALIGN=CENTER><img src="/php/upload/Default.jpg"></DIV>


<div ALIGN=CENTER><img src="/php/image.php" border="1"></div>




<div ALIGN=RIGHT>
<p style="color:White"><i>
06 Nov 2006<br>Have a nice day!<BR>

</p></div></i>

<p style="color:White">
<div ALIGN=CENTER><h3></p></div></h3>

<form name="myName" action="" method="post">
<p style="color:White">Name: </p><input type="text" name="name" value="" /><br />
<input type="submit" name="submit" value="Submit" />
</form>



<br>
<BR>
<br>
<BR><br>

<BR>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file"><p style="color:White">Filename:</p></label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form></p>


</body>
</html>[/code]
Link to comment
https://forums.phpfreaks.com/topic/26280-why-wont-this-work/#findComment-120197
Share on other sites

[code]<div ALIGN=RIGHT>
<p style="color:White"><i>
06 Nov 2006<br>Have a nice day!<BR>

</p></div></i>[/code]

NOTICE you're closing the italics tag AFTER you close everything else
probably has a lot to do with it

[code]<div ALIGN=RIGHT>
<p style="color:White">
<i>
06 Nov 2006<br>Have a nice day!<BR>
</i><!-- Close the Italics tag beforehand -->
</p></div>[/code]
Link to comment
https://forums.phpfreaks.com/topic/26280-why-wont-this-work/#findComment-120378
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.