Your script possibly relies on a session side-effect which existed
until PHP 4.2.3. Please be advised that the session extension does
not consider global variables as a source of data, unless
register_globals is enabled. You can disable this functionality and
this warning by setting session.bug_compat_42 or
session.bug_compat_warn to off, respectively.
już godzine gmeram w kodzie i nic znaleśc nie mogę, domuślam sie że problem tkwi gdzies w tych częsciach kodu:
<?php { $username = $row['username']; if (preg_match('/username/', $_SERVER['REQUEST_URI']) && preg_match('/form=true/', $_SERVER['REQUEST_URI'])) { $_SESSION['name'] = $row['name']; $_SESSION['surname'] = $row['surname']; $_SESSION['pass1'] = $row['password']; $_SESSION['pass2'] = $row['password']; $_SESSION['phone'] = $row['phone']; $_SESSION['domena'] = $row['goto']; $_SESSION['alias'] = $row['username']; } if (preg_match('/rem/', $_SERVER['REQUEST_URI']) && preg_match('/mailbox/', $query) && $_SESSION['check'] == true ) { } if (preg_match('/edit/', $_SERVER['REQUEST_URI']) && preg_match('/mailbox/', $query) && !preg_match('/username/', $_SERVER['REQUEST_URI'])) { echo "<td id = 'edit'>"."<a href='".$_SERVER['PHP_SELF']."?opcja=edit&form=true&username=".$username_rpl."'>Edit</a>".'</td>'; } } ?>
lub tudziesz
<?php $user = $_REQUEST['username']; $mailbox = array($_SESSION['name'], $_SESSION['surname'], $_SESSION['pass1'], $_SESSION['pass2'],$_SESSION['phone'], $_SESSION['alias']); self_form($mailbox[0], $mailbox[1], $mailbox[2], $mailbox[3], $mailbox[4], $alias[0], $mailbox[5]); ?>
czy też może wywoływanej funkcji
<?php function self_form($imie, $nazwisko, $haslo, $haslo2, $phone, $adres, $alias) { $url = $_SERVER['REQUEST_URI']; { ."<div id = 'opcje'><p><input type='text' name='imie' value='".$imie."' />Imię</p>" ."<p><input type='text' name='nazwisko' value='".$nazwisko."' />Nazwisko</p>" ."<p><input type='text' name='haslo' value='".$haslo."' />Hasło</p>" ."<p><input type='text' name='haslo2' value='".$haslo2."' />Powtórz hasło</p>" ."<p><input type='text' name='phone' value='".$phone."' />Numer telefonu</p>" ."<p><textarea name='address'>".$adres."</textarea>Domena (Adres)</p>" ."<p><input type='text' name='alias' value='".$alias."' />Alias (Glowny)</p>" ."<p align = 'center'>"."<input type='submit' value='Zatwierdz' name='submit' />"."</p>".'</div>' ."</form>"; } else { ."<div id = 'opcje'><p><input type='text' name='imie' value='' />Imię</p>" ."<p><input type='text' name='nazwisko' value='' />Nazwisko</p>" ."<p><input type='text' name='haslo' value='' />Hasło</p>" ."<p><input type='text' name='haslo2' value='' />Powtórz hasło</p>" ."<p><input type='text' name='phone' value='' />Numer telefonu</p>" ."<p><textarea name='address'></textarea>Domena (Adres)</p>" ."<p><input type='text' name='alias' value='' />Alias (Glowny)</p>" ."<p align = 'center'>"."<input type='submit' value='Zatwierdz' name='submit' />"."</p>".'</div>' ."</form>"; } ?>
no i jescze funkcja validacyjna formularza
<?php function valid_all($post_form) { foreach($post_form as $index => $valid) { { return false; } } return true; } function valid_form() { try { if(!valid_all($_POST['var'])) { throw new Exception('Nieporawnie wypełniony formularz.<br />'); } if(!valid_mail($_POST['alias'])) { throw new Exception('Nieporawnie e-mail.<br />'); } if(!valid_pass($_POST['haslo'], $_POST['haslo2'])) { throw new Exception('Hasła nie sa identyczne lub hasło jest za krótkie.<br />Hasło powinno zawierać minimum 6 znaków.<br />'); } } catch (Exception $e) { } } ?>
Byłbym wdzwięczny za info
