 |
ช่วยดูโคดข้างล่างหน่อยนะครับ ......... โคดนี้เมื่อปิดค่า register_Global=off แล้วเราจะรับค่า โคคคข้างนล่างนี้ยังไงนะครับ |
|
 |
|
|
 |
 |
|
โคดนี้เมื่อปิดค่า register_Global=off แล้วเราจะรับค่า โคคคข้างนล่างนี้ยังไงนะครับ ช่วยหน่อยนะครับ
if($submit) {
echo "<h3>User ·Õè·èÒ¹µéͧ¡ÒÃä´é¶Ù¡¡Ó˹´àÃÕºÃéÍÂáÅéÇ</h3>";
echo "<table width=100%>";
$i=1;
while ($i <= $max) {
$x = 1;
$b = $pre;
while ($x < 4) {
$a = rand(65,122);
if (($a > 64 and $a < 91) or ($a > 96 and $a < 123 )) {
$b = $b.chr($a);
$x = $x+1;
}
}
$x = 1;
while ($x < 5) {
$a = rand(48,57);
$b = $b.chr($a);
$x = $x+1;
}
#random password
$x = 1;
while ($x < 9) {
$a = rand(48,122);
if (($a > 64 and $a < 91) or ($a > 96 and $a < 123 ) or ($a > 47 and $a < 58)) {
$c = $c.chr($a);
$x = $x+1;
}
}
#end random password
##### Inset to Table With Check User
#################
$check = 0;
$result = mysql_query("SELECT * FROM radcheck where UserName='$b'");
while ($row=mysql_fetch_array($result)) {
if (($row["UserName"]='$name') and ($row["Attribute"]='Password')) {
echo "<br>User found!!!";
echo "<br>Id: ",$row["id"];
echo "<br>User: ",$row["UserName"];
echo "<br>Password: ",$row["Value"];
echo "<br><b>äÁè·Ó¡ÒÃà¾ÔèÁ User ãËé";
$check++ ;
}
}
# echo "Check : ",$check;
if ($check ==0) {
##########
echo "<tr><td>User : <font color=blue>",$b," </font></td><td>Password : <font color=blue>",$c,"</font></td></tr>";
$adacc = mysql_query("insert into radcheck Values('0','$b','Password','==','$c')");
$adc=mysql_query($adacc);
$adgrp = mysql_query("insert into usergroup Values('0','$b','$choose')");
$adc=mysql_query($adgrp);
######
}
################
$i = $i+1;
$c = '';
}
echo "</table>";
printf("<html><meta http-equiv='refresh' content='5; url=index.php'>");
}
else {
#endif áá
print ("<center><table border=0>");
print ("<form method=post action=\"$PHP_SELF\">");
print ("<tr><td>µéͧ¡ÒõÑÇÍÑ¡ÉùÓ˹éÒ : </td><td><input type=\"text\" name=\"pre\" value=\"\" size=1></tr></td>");
print ("<tr><td>¨Ó¹Ç¹ account ·Õèµéͧ¡ÒÃÊÃéÒ§ : </td><td><input type=\"text\" name=\"max\" value=\"\" size=5></td></tr>");
echo "<tr><td align=center>Group : </td>";
echo "<td>";
echo "<select name=\"choose\" size=1>";
/*******
$rply = mysql_query("SELECT * FROM radgroupreply group by GroupName");
while ($row1=mysql_fetch_array($rply)) {
$gname = $row1["GroupName"];
echo "<option value=\"$gname\">$gname";
}
**********/
#########
$str1 = mysql_query("SELECT GroupName FROM radgroupcheck group by GroupName");
while ($row1=mysql_fetch_array($str1)) {
$str2 = mysql_query("SELECT GroupName FROM radgroupreply group by GroupName");
while ($row2=mysql_fetch_array($str2)) {
if ($row1["GroupName"] != $row2["GroupName"]) {
$g=1;
}
}
if ($g) {
$gname = $row1["GroupName"];
echo "<option value=\"$gname\">$gname";
}
}
$str3 = mysql_query(" select radgroupreply.GroupName from radgroupreply left join radgroupcheck on radgroupreply.GroupName = radgroupcheck.GroupName where radgroupcheck.GroupName is NULL group by radgroupreply.GroupName");
while ($row3=mysql_fetch_array($str3)) {
$gname = $row3["GroupName"];
echo "<option value=\"$gname\">$gname";
}
#########
echo "</select></td></tr>";
print ("<tr><td align=center><input type=\"submit\" name=\"submit\" value=\"OK\"><td><input type=\"reset\" name=\"reset\" value=\"Reset\"></td></tr></form>");
print ("</table></center>");
}
?>
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
15 Jan 2547 10:44:23 |
By :
vorrasak |
View :
3371 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมว่าคุณดูนี่ดีกว่าครับ
$_GET["Var"
$_POST["var"]
$_COOKIE ["var"]
$_SESSION["var"]
ผมบอกไม่ถูเหมือนกัน เพราะ code มันเยอะเกินครับ
|
 |
 |
 |
 |
Date :
15 Jan 2547 11:57:08 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|