UCP help MYSQL Dont EDIT/DELETE User

[php]<?
//
// YourGame.su
//
include “config.php”;
$type = strip($_GET[‘type’]);
if($_SESSION[‘Name’])
{
if(intval($_SESSION[‘Priv’])!=10 && $_SESSION[‘Name’] == “Medzvel_Aa” || intval($_SESSION[‘Priv’])!=10 && $_SESSION[‘Name’] == “Medzvel_Aa”)
{
echo “შენ არ გაქვს ამის უფლება!.”;
return true;
}
$nick = mysql_real_escape_string($_SESSION[‘Name’]);
$_SESSION[‘TryLogin’] = 0;
echo "


</form
"; if($_POST["edit"]) { if($row[$mysql_online_string] == 1) $online = "სტატუსი"; else $online = "Ваш статус"; $uname=$_POST["edit"]; $wh=mysql_query("SELECT * FROM $mysql_users_table WHERE $mysql_user_string='$uname'"); if ($who=mysql_fetch_array($wh)) { echo <<<HERE
სახელი Новое значение
მოთამაშის სახელი (არ იცვლება!) {$online} მოთამაშის ადმინ-ლეველი ადმინ პაროლი დადონატებული თანხა ელ-ფოსტა მოთამაშის იპ-დაცვა (არ იცვლება) ბანი პაროლი
როდესაც დააჭერთ წაშლას აქაუნთი წაიშლება 3 წამში
HERE; } else {echo 'ესეთი ნიკით არ არის მოთამაშე';} } if (isset($_POST['save'])) { $name=$_POST['hname']; // $mysql_user_string $admin=$_POST['padmin']; // $mysql_admin_string $donate=$_POST['pdonate']; // $mysql_donate_string $email=$_POST['pemail']; // $mysql_mail_string $dostup=$_POST['pdostup']; // $mysql_mail_string $ban=$_POST['pban']; // $mysql_ban_string $password=$_POST['password']; if($password == "42470220180") { mysql_query("UPDATE accounts SET pAdmin='$admin', pDonateRank='$donate', pEmail='$email', pDostup = '$dostup', pLocked = '$ban' WHERE Name='$name'") or die(mysql_error()); echo "აქაუნტი {$name} წარმატებით შეიცვალა!"; } else echo "პაროლის შეცვლა წარმატებით შეიცვალა"; } else if (isset($_POST['delete'])) { $name=$_POST['name']; if (mysql_query("DELETE FROM accounts WHERE Name='$name'")) { echo "შენ წარმატებით წაშალე ექაუნთი {$name}
მოითმინეთ 3 წამი."; echo ""; } } mysql_close(); } else { $showError=true; echo '
'; echo 'სახელი_გვარი:
'; echo 'პაროლი:
'; echo '
'; echo ' შეცვლა '; } echo ""; if($showError) { $_SESSION['TryLogin']++; echo '-
'; } [/php]THIS IS SETSTAT CODE BUT IT DOESNT WORK HELP ME PLEASE

Your code is obsolete. It has been completely removed from PHP. You need to use PDO with prepared statements.

Well, first, you need to put your code into the tags when you post code. It helps us a lot. Just press the PHP button above when you post and place your code between the tags.

Next, as Kevin said you have to update your code to at lease MySQLi or PDO. Since MySQL will not be supported on most servers once they are updated. Your code will just stop working at some point.

I did notice that you used SESSION variables, but, did not start the session. You need to add system_start(); function as the first PHP line on the page if you plan to use the SESSION array…

I skipped over this for the shear fact of, it looks like a code dump. I don’t think they want to learn, they just posted waiting for someone to fix it for them. The addition of the deprecated code only compounded that. On top of that, it looks like a series of copy and pasted code with slight modifications.

Sponsor our Newsletter | Privacy Policy | Terms of Service