
Nikt nie wie jak to zrobić

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> </head> <body> <?php require('class.upload.php'); $up = new Upload($_FILES['file']); if ($up->uploaded) { // save uploaded image with a new name, // resized to 100px wide $up->file_new_name_body = 'avatar14'; // id użytkownika $up->file_overwrite = true; if($up->image_src_x > 150 || $up->image_src_y > 150) { if($up->image_src_x > $up->image_src_y) { $up->image_resize = true; $up->image_x = 150; $up->image_ratio_y = true; } elseif($up->image_src_x <= $up->image_src_y) { $up->image_resize = true; $up->image_y = 150; $up->image_ratio_x = true; } } $foo->image_convert = 'jpeg'; $up->Process('upload/'); // tutaj wstawiasz scieżkę do twojego folderu na pliki if ($up->processed) { $up->Clean(); } else { } } } ?> <form method="post" enctype="multipart/form-data"> <label for="file">Plik:</label><input type="file" name="file" id="file" /><br /> <input type="submit" name="submit" value="wyślij" /> </form> </body> </html>
// $id_uzytkownika = 4;
<?php require('db.php'); { if ($_POST['password']==$_POST['password2']) { if ($ile==0) { $zapytanie="INSERT INTO users (login,haslo) VALUES('$konto','$password')"; } else { } } } else{ ?> <html> <body> <h1>ZakĹadanie konta</h1> <form action="rejstracja.php" method="post"> <strong>Login:</strong> <input name="konto" type="text" value="" /><br> <strong>Haslo:</strong> <input name="password" type="password" value="" /><br> <strong>Powtorz haslo:</strong><input name="password2" type="password" value="" /><br> <input type="submit" value="Zarejestruj" /> </form> </body> </html> <?php } ?> </body> </html>
$_SESSION['konto'] = $_POST['konto'];