PHP Code:
$t=1;
?>
<form method="post" action="">
<table border="1" align="center">
<tr>
<th>Username:</th>
<th>Password:</th>
<th>Email:</th>
<th>Rank:</th>
</tr>
<?
$l=40;
while($t<=$l)
{
$uservar="user".$t;
$rankvar="rank".$t;
$passvar="pass".$t;
$emailvar="email".$t;
echo "
<tr>
<th><input type=text size=20 name=$uservar value=$uservar></th>
<th><input type=password name=$passvar value=1234></th>
<th><input type=text name=$emailvar value=$emailvar></th>
<th><select name=$rankvar>";
$i=0;
$j=1;
for($i=$j; $i>=1; $i--)
{
getRankByNum();
}
$t++;
echo
"</select></th>
</tr>";
}
?>
<tr>
<th align="center" colspan="4"><input type="submit" name="ad" value="Mass Add Members"></th>
</tr>
</table></form>
<?php
if($_POST['ad'])
{
$user=$_POST['$uservar'];
$pass=$_POST['$passvar'];
$email=$_POST['emailvar'];
$rankvar=$_POST['rankvar'];
if($user || $pass || $email || $rankvar)
{
$i=0;
$j=40;
for($i=$j; $i>=0; $i--)
{
include("dbconnect.php");
$pQuery="insert into members values ('','$user','$pass','$rankvar','$email','$aim','','1','','$recruiter','','$today','','','','','','','','','','','','','','','','','','','','','0')";
echo "Query".$t." is".$pQuery;
//$LQuery="INSERT INTO logs Values('','$rank','$recruiter','sucessfully recruited $username on','$today','Recruitment')";
//$rQuery="update members set recruits=recruits+1 where username='".$_SESSION['user']."'";
$result=mysqli_query($con,$pQuery);
//$result=mysqli_query($con,$LQuery);
//$result=mysqli_query($con,$rQuery);
if(!$result)
{
echo "<font color=".$fontcolor.">Error:".mysqli_connect_errno();
echo "<br/><font color=".$fontcolor.">Error2:".mysqli_error($con);
}
else
{
echo "<font color=".$fontcolor."><br/><br/>Member Add to Clan<br/>
The Recruits Login information is as follows:<br/>
<br/>
Username: $user <br/>
Password: $pass <br/>
<br/>
<br/>
Please Make Sure the Recruit Logins and Changes his password
</font>";
//echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=index.php?cmd=console\">";
mail("$email", "Welcome to $ClanName!", "$username
Welcome to $ClanName! You are now, the newest member of our great clan!
____________________________________________________________
Here is your information:
User Name: $username
Password: $password
Ensure you don't lose this information. If you have a problem with loggin in, please
feel free to contact an officer and they can assist you.
____________________________________________________________");
}
}
//rest of button code
}
}
So How can i go about fixing this Problem all the button does is say the button is all undefined i have tried to echo back the queryy but doesnt do anything else
Bookmarks