aresgodofwar Posted December 15, 2004 Posted December 15, 2004 im making this block for phpnuke so that i can just type in a hex code and the color will be displayed. it's not working, and i was wondering if anyone can help me. here is the code: <html><body><center><?$color=$_post['color'];echo '<table border="0" width="50" height="50">';echo '<tr>';echo '<td bgcolor=$color></td>';echo '</tr></table>';echo '<form action="Text1.php" method="post">';echo '<input type="text" name="color" size="5">';echo '</center>';?></body></html>someone was telling me this may require Javascript, but php is dynamic, so i thought this would work?
aresgodofwar Posted December 15, 2004 Author Posted December 15, 2004 (edited) ok. got this working in a page by itself, but the block for phpnuke is another story. http://www.lothclan.com/test/Hex_Color.php to see working sample. here is my code: <html><body><?$form_block="<form method=\"POST\" action=\"$_SERVER[PHP_SELF]\"><input type=\"text\" name=\"hexcolor\" size=5 value=\"$_POST[hexcolor]\"></form>";echo "<table border=\"0\" width=\"50\" height=\"50\">";echo "<tr>";echo "<td bgcolor=\"$_POST[hexcolor]\">";echo "</td>";echo "</tr></table>";echo "$form_block";?></body></html> Edited December 16, 2004 by aresgodofwar
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now