i have this in the script
<?php
include("BDMySQL.class.php");
?>
<b>ACCOUNT EDITING</b>
<?php
if($status=="account") {
?>
<form name="form1" method="post" action="index.php?page=account&status=edit">
/* here goes the form
</form>
<?php
}
if($status=="verificar") {
?>
<br>
Editing Result <br><br>
<?php
include("ARUser.class.php");
if($name!="") {
if($address!="") {
if($zip_cod1!="" && $zip_cod!="") {
if($email != "") {
if($password != "" && $rpassword!="") {
if($password==$rpassword) {
$user = new ARUser();
if($user->editUser($email, $password, $name, $address, $zip_cod)) {
echo "The account has been updated successfully!!!<br><br>";
} else {
echo "Problems with editing the account!!!<br>";
}
$user->endARUser();
} else {
echo "ERROR: The two passwords are not the same...<br>";
}
} else {
echo "ERROR: You have to fill the password fields...<br>";
}
} else {
echo "ERROR: You have to fill the email field...<br>";
}
} else {
echo "ERROR: You have to fill the zip code field...<br>";
}
} else {
echo "ERROR: You have to fill the address field...<br>";
}
} else {
echo "ERROR: You have to fill the name field...<br>";
}
}
?>
BDMySQL.class.php is for the database connection
ARUser.class.php has the functions to query/select/update, etc the table users.
thanks in advance.