25.05.2012, 19:10
Hi Guys! I have some problems with my php code... I don't know what's wrong. Please help me! REP ++
pawn Код:
Notice: Undefined index: name in D:\wampserver\www\form.php on line 20 Call Stack #TimeMemoryFunctionLocation 10.0003378784{main}( )..\form.php:0 ">
PHP код:
<?php include("style/header.php");
function sec($data) {
$data = trim(htmlentities(strip_tags($data)));
if (get_magic_quotes_gpc()){
$data = stripslashes($data);
}
$data = mysql_real_escape_string($data);
return $data;
}
?>
<center><form action="<?php $_SERVER['PHP_SELF'];?>" method="post">
<b><p><font color="#000000" size="3">Type here your username from the server!</font></p></b>
<input type="text" name="name" class='bg' /></br>
<input type="submit" />
</form></center>
<center><b><p><font color="#000000" size="3"><u>Dynamic Signature Type (1)</u></font></b></center>
<center><img src="1.php?p=<?php echo sec($_POST["name"]); ?>"></center>
<center><b><p><font color="#000000" size="3"><u>Dynamic Signature Type (2)</u></font></b></center>
<center><img src="2.php?p=<?php echo sec($_POST["name"]); ?>"></center>
<center><b><p><font color="#000000" size="3"><u>Dynamic Signature Type (1) Codes: URL/BB/HTML</u></font></b></center>
<center><textarea cols="70" rows="2" readonly onclick="javascript:select();">http://samp.insideplay.ro/1.php?p=<?php echo sec($_POST["name"]); ?></textarea>
<textarea cols="70" rows="2" readonly onclick="javascript:select();">[img]http://samp.insideplay.ro/1.php?p=<?php echo sec($_POST["name"]); ?>[/img]</textarea>
<textarea cols="70" rows="2" readonly onclick="javascript:select();"><img src="http://samp.insideplay.ro/1.php?p=<?php echo sec($_POST["name"]); ?>"/></textarea>
<center><b><p><font color="#000000" size="3"><u>Dynamic Signature Type (2) Codes: URL/BB/HTML</u></font></b></center>
<center><textarea cols="70" rows="2" readonly onclick="javascript:select();">http://samp.insideplay.ro/2.php?p=<?php echo sec($_POST["name"]); ?></textarea>
<textarea cols="70" rows="2" readonly onclick="javascript:select();">[img]http://samp.insideplay.ro/2.php?p=<?php echo sec($_POST["name"]); ?>[/img]</textarea>
<textarea cols="70" rows="2" readonly onclick="javascript:select();"><img src="http://samp.insideplay.ro/2.php?p=<?php echo sec($_POST["name"]); ?>"/></textarea>
</center>
<?php include("style/footer.php");?>