- Joined
- Apr 12, 2009
- Messages
- 1,260
- Reaction score
- 239
Insert Text in TextBox:
Click Sumbit to Display what's wrriten:
Click Sumbit to Display what's wrriten:
PHP:
<?php
require('George.php');
$George = new George();
/* Output message (popup/normal) */
$George->Output("Welcome to George Class", 0, 255, 255, 600, 0);
/* Connect to website by name */
//$George->ConnectTo("http://www.google.com");
/* Label */
$George->Output("Insert Text", 255, 0, 0, 651, 20);
/* Textbox */
//$George->TextBox("TextBox1", 604, 35);
/* Button */
$George->Button("TextBox1", "Sumbit", 610, 36, 653, 60);
$George->Output2($TextBox1);
?>
PHP:
<?php
class George
{
function RGBToHex($r, $g, $b)
{
if(($r == "0") && ($g == "0") && ($b == "0")) return '#FFFFFF';
$hex = "#";
$hex.= str_pad(dechex($r), 2, "0", STR_PAD_LEFT);
$hex.= str_pad(dechex($g), 2, "0", STR_PAD_LEFT);
$hex.= str_pad(dechex($b), 2, "0", STR_PAD_LEFT);
return $hex;
}
function Output($szText, $r, $g, $b, $left, $top)
{
$color = $this->RGBToHex($r, $g, $b);
echo "<font color='$color' style='position:absolute; left:$left; top:$top;'>$szText</font>";
}
function Output2($szText)
{
echo "<script type='text/javascript'>alert('{$szText}');</script>";
}
function ConnectTo($szText)
{
header("Location: $szText");
}
function TextBox($szName, $left, $top)
{
echo
"<form method='post' action=''>".
"<input type='text' name='{$szName}' id='text' style='position:absolute; left:$left; top:$top;'/>".
"</form>";
}
function Button($szName, $szSecondName, $left, $top, $left2, $top2)
{
echo
"<form method='post'>".
"<input type='text' name='{$szName}' id='text' style='position:absolute; left:$left; top:$top;'/>".
"<input type='submit' name='Enter' id='Enter' value='{$szSecondName}' style='position:absolute; left:$left2; top:$top2;'/>".
"</form>";
}
}
?>
Attachments
You must be registered for see attachments list