Hey there,
I have a question about PHP but it also fits in here because of the Conquer Database.
I wanna change some stuff through PHP. Only wanna look the Username up so I can change the rest. Don't wanna change the Username.
Code for the page:
Only wanna look the Username up so I can change the rest.
I have a question about PHP but it also fits in here because of the Conquer Database.
I wanna change some stuff through PHP. Only wanna look the Username up so I can change the rest. Don't wanna change the Username.
Code for the page:
PHP Code:
<?php include("include/header.php"); ?>
<div id="abouttitleblank"></div>
<div id="abouttext">
<div align="center" style="height:600px;">
<?php
if(isset($_SESSION['User_Name'])) {
if(isset($_SESSION['User_Pass'])) {
}
?>
<form action="?op=ChangeUser" method="post">
<div align="center">User Changer<br />
<br />
</div>
<table width="306" border="0" align="center">
<tr>
<td width="130" class="liteoption">Username: </td>
<td width="166"><input name="newCP" type="text" class="liteoption" id="newCP" size="15" maxlength="13" /></td>
</tr>
<tr>
<td width="130" class="liteoption">CPs: </td>
<td width="166"><input name="CP" type="text" class="liteoption" id="CP" size="15" maxlength="13" /></td>
</tr>
<tr>
<td width="130" class="liteoption">Silver: </td>
<td width="166"><input name="Money" type="text" class="liteoption" id="Money" size="15" maxlength="13" /></td>
</tr>
<tr>
<td width="130" class="liteoption">Vip: </td>
<td width="166"><input name="Vip" type="text" class="liteoption" id="Vip" size="15" maxlength="13" /></td>
</tr>
<tr>
<td width="130" class="liteoption">Reborn: </td>
<td width="166"><input name="Reborn" type="text" class="liteoption" id="Reborn" size="15" maxlength="13" /></td>
</tr>
<tr>
<td width="130" class="liteoption">Level: </td>
<td width="166"><input name="Level" type="text" class="liteoption" id="Level" size="15" maxlength="13" /></td>
</tr>
</table>
<p align="center">
<input type="submit" class="liteoption" name="submit" value="Change it" />
</p></form>
</p>
<br />
<?php
if(isset($_POST['submit'])) {
$mdfive = $_POST['Username']; //Change User
$mdfive = $_POST['CP'];
$mdfive = $_POST['Money'];
$mdfive = $_POST['Vip'];
$mdfive = $_POST['Reborn'];
$mdfive = $_POST['Level'];
$results = mysql_query("UPDATE `characters` GET Username = '".$mdfive."'");
$results = mysql_query("UPDATE `characters` SET CP = '".$mdfive."'");
$results = mysql_query("UPDATE `characters` SET Money = '".$mdfive."'");
$results = mysql_query("UPDATE `characters` SET Vip = '".$mdfive."'");
$results = mysql_query("UPDATE `characters` SET Reborn = '".$mdfive."'");
$results = mysql_query("UPDATE `characters` SET Level = '".$mdfive."'");
if(!$results) {
echo('Result: Password could not be changed.');
} else {
echo('Result: Passwords changed successfully!');
}
}
?>
<br />
<a href="user_controlpanel.php">Back To User CMD</a>
<?php } ?>
</div>
</div>
<div id="newscontent"></div>
<?php include("include/footer.php"); ?>