Nic nie dało
Może wstawię całą podstronę:
Kod
<?php
session_start();
include "../polacz.php";
$opcja = trim($_REQUEST["opcja"]);
if ($opcja=="zmien" and $_SESSION["zalogowany"]=="tak") {
$user_login = htmlspecialchars(stripslashes(trim($_POST["user_login"])), ENT_QUOTES);
$user_email = htmlspecialchars(stripslashes(trim($_POST["user_email"])), ENT_QUOTES);
$user_imie = htmlspecialchars(stripslashes(trim($_POST["user_imie"])), ENT_QUOTES);
$user_nazwisko = htmlspecialchars(stripslashes(trim($_POST["user_nazwisko"])), ENT_QUOTES);
$user_kpx = htmlspecialchars(stripslashes(trim($_POST["user_kpx"])), ENT_QUOTES);
$user_stanowisko = htmlspecialchars(stripslashes(trim($_POST["user_stanowisko"])), ENT_QUOTES);
$user_telefon = htmlspecialchars(stripslashes(trim($_POST["user_telefon"])), ENT_QUOTES);
$user_organizacja = htmlspecialchars(stripslashes(trim($_POST["user_organizacja"])), ENT_QUOTES);
$user_grupa = htmlspecialchars(stripslashes(trim($_POST["user_grupa"])), ENT_QUOTES);
$user_poziom = htmlspecialchars(stripslashes(trim($_POST["user_poziom"])), ENT_QUOTES);
$user_status = htmlspecialchars(stripslashes(trim($_POST["user_status"])), ENT_QUOTES);
if (mysql_select_db($mysql_baza)) {
$wynik = mysql_query("UPDATE users
SET user_email='$user_email', user_imie='$user_imie', user_nazwisko='$user_nazwisko', user_kpx='$user_kpx', user_stanowisko='$user_stanowisko', user_telefon='$user_telefon', user_organizacja='$user_organizacja', user_grupa='$user_grupa', user_poziom='$user_poziom', user_status='$user_status' WHERE user_id='$_GET[user_id]'");
} else echo "Nie mo¿na po³¹czyæ siê z baz¹";
if ($wynik) {
echo "<center><span style=\"color:green;\">Dane zosta³y zmienione</span><br /></center>";
// $_SESSION["user_id"]=$user_id;
}
else echo "<center><span style=\"color:red;\">Dane <b>nie</b> zosta³y zmienione!</span><br /></center>";
}
if ($opcja=="" and $_SESSION["zalogowany"]=="tak") {
$dane=mysql_fetch_assoc(mysql_query("select * from users where user_id='$_GET[user_id]'"));
echo <<<KONIEC
<form action="index.php?str=edytuj&opcja=zmien&user_id={$dane['user_id']}" method="post">
<table align="center" valign="center" border="1">
<tr>
<td colspan="2" align="center"><strong>EDYCJA UZYTKOWNIKA</srong></td>
</tr>
<tr>
<td align="right" width="170"><strong>Login: </strong></td>
<td align="left"><strong>{$dane['user_login']}</strong></td>
</tr>
<tr>
<td align="right" width="170"><strong>Adres Email: * </strong></td>
<td align="left"><input name="user_email" type="text" value="{$dane['user_email']}" size="50" /></td>
</tr>
<tr>
<td align="right" width="170"><strong>Imiê: </strong></td>
<td align="left"><input name="user_imie" type="text" value="{$dane['user_imie']}" size="50" /></td>
</tr>
<tr>
<td align="right" width="170"><strong>Nazwisko: </strong></td>
<td align="left"><input name="user_nazwisko" type="text" value="{$dane['user_nazwisko']}" size="50" /></td>
</tr>
<tr>
<td align="right" width="170"><strong>Numer KPX: </strong></td>
<td align="left"><input name="user_kpx" type="text" value="{$dane['user_kpx']}" size="50" maxlength="5" /></td>
</tr>
<tr>
<td align="right" width="170"><strong>Stanowisko: </strong></td>
<td align="left"><input name="user_stanowisko" type="text" value="{$dane['user_stanowisko']}" size="50" /></td>
</tr>
<tr>
<td align="right" width="170"><strong>Numer Telefonu: </strong></td>
<td align="left"><input name="user_telefon" type="text" value="{$dane['user_telefon']}" size="50" maxlength="10" /></td>
</tr>
<tr>
<td align="right" width="170"><strong>Komórka Organizacyja: </strong></td>
<td align="left"><input name="user_organizacja" type="text" value="{$dane['user_organizacja']}" size="50" /></td>
</tr>
<tr>
<td align="right" width="170"><strong>Grupa U¿ytkowników: </strong></td>
<td align="left"><select align="left" name='user_grupa' value="{$dane['user_grupa']}" class='textbox'>
<option value = "101">Test 1</option>
<option value = "102">Test 2</option>
<option value = "103">Test 3</option>
</select></td>
</tr>
<tr>
<td align="right" width="170"><strong>Poziom Dostepu: </strong></td>
<td align="left"><select name='user_poziom' value="{$dane['user_poziom']}" class='textbox'>
<option value = "10">U¿ytkownik</option>
<option value = "11">Administrator</option>
<option value = "12">Super Administrator</option>
</select></td>
</tr>
<tr>
<td align="right" width="170"><strong>Zablokowany: </strong></td>
<td align="left"><select name='user_status' class='textbox'>
<option value="1" <?php if({$dane['user_status']} == '1') echo(' selected'); ?>Tak</option>
<option value="0" <?php if({$dane['user_status']} == '0') echo(' selected'); ?>Nie</option>
</select></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" value="Zapisz Zmiany" /></td>
</tr>
</table>
</form>
KONIEC;
} else {
echo "<center><img src='../img/head.gif' width='970' height='93' /><center>";
echo "<br><br><br><br><br><br><br><br><br>";
echo "<center><b>Jesteś niezalogowany lub nie masz uprawnień do zawartości tej strony !</b></center></br >";
echo "<center><b>Za chwilę nastąpi przekierowanie...</b></center></br >";
echo "<meta http-equiv='refresh' content='3;URL=../' />";
}
?>