View file public_html/editac.php

File size: 1.67Kb
<html>
<title>Edit Account</title>
<?php include "inc/def.php"; ?>
<?php include "inc/usrchk.php";
if($guest==1) {
header("location:index.php");
} ?>

<?php include "inc/header.php";
PRINT "<div class='line'>Edit Account Settings</div>";
$getu = mysql_query("SELECT * FROM users WHERE user='$user'");
$getu1 = mysql_fetch_array($getu);
$id = $getu1['id'];

if((isset($_POST['mail']))&&(isset($_POST['pp']))&&(isset($_POST['site']))) {
$mail = secure('mail');
$pp = secure('pp');
$site= secure('site');

$laston=secure('laston');
$do=mysql_query("UPDATE users SET mail='$mail',paypal='$pp',laston='$laston',site='$site' WHERE id='$id'");

if($do) {
print "<div class='done'>Edited Successfully !</div>";
} else {
print "<div class='prob'>UNABLE TO EDIT !</div>";
}

}


$laston=$getu1['laston'];
$mail = $getu1['mail'];
$paypal = $getu1['paypal'];
$site= $getu1['site'];?>

<form action="editac.php" method="post">

<div class="uright">
<label for="user">Email Address :</label><br />
<input size="30" maxlength="40" type="text" name="mail" value="<?php echo $mail; ?>" />
</div>



<div class="uright">
<label for="user">Mobile Number :</label><br />
<input size="30" maxlength="40" type="text" name="laston" value="<?php echo $laston; ?>" />
</div>
<div class="uright">
<label for="user">Moneybooker (or) Paypal id:</label><br />
<input size="30" maxlength="80" type="text" name="pp" value="<?php echo $paypal; ?>" /><br/>
</div>

<div class="uright">
<label for="user">Wapsite :</label><br />
<input size="30" maxlength="40" type="text" name="site" value="<?php echo $site; ?>" />
</div>


<div class="uright">
<input type="submit" value="Edit" />
</div>


</form>

<?php include "inc/footer.php"; ?>
</html>