Foto's fixen v2, verplaatsen default foto
No files matched your search
|
After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 853 KiB |
@@ -11,7 +11,7 @@ $gebruiker = stripslashes($gebruiker);
|
||||
$passwoord = stripslashes($passwoord);
|
||||
$gebruiker = mysqli_real_escape_string($conn, $gebruiker);
|
||||
$passwoord = mysqli_real_escape_string($conn, $passwoord);
|
||||
$encryptpass = crypt($passwoord);
|
||||
$encryptpass = md5($passwoord);
|
||||
$sql="SELECT * FROM Gebruikers WHERE gebruiker='$gebruiker' and passwoord='$encryptpass'";
|
||||
$result=mysqli_query($conn, $sql);
|
||||
|
||||
|
||||
@@ -22,22 +22,23 @@ if (isset($_SESSION['gebruiker']))
|
||||
$ingredienten=array_unique($ingredienten);
|
||||
//fotopath in database
|
||||
$filetmp = $_FILES['Foto']['tmp_name'];
|
||||
$filename = $_FILES['Foto']['name'];
|
||||
$fname = $_FILES['Foto']['name'];
|
||||
$filetype = $_FILES['Foto']['type'];
|
||||
|
||||
$random_number = mt_rand(1000000,99999999);
|
||||
$ext = pathinfo($fname, PATHINFO_EXTENSION);
|
||||
$random = uniqid($random_number);
|
||||
$filename = $random.".".$ext;
|
||||
|
||||
if (empty($filename))
|
||||
if (empty($fname))
|
||||
{
|
||||
$filepath = "images/geenfoto.png";
|
||||
$filepath = "Default image/geenfoto.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
$filepath = "images/".$filename;
|
||||
}
|
||||
|
||||
|
||||
|
||||
move_uploaded_file($filetmp, $filepath);
|
||||
|
||||
move_uploaded_file($filetmp, $filepath);
|
||||
|
||||
// maak recept aan
|
||||
$sql = "INSERT INTO tblrecepten(id, naam, rating, prijs, soort, omschrijving, foto, bereiding, Username, Tijdgeplaatst) VALUES('', '$titel', '$rating', '$prijs', '$soort', '$omschrijving', '$filepath', '$bereiding', '$gebruiker', '$datum')";
|
||||
|
||||
@@ -7,7 +7,7 @@ $gebruiker = $_POST['gebruiker'];
|
||||
$email = $_POST['email'];
|
||||
$passwoord = $_POST['pass'];
|
||||
$passwoordopnieuw = $_POST['opnieuw'];
|
||||
$encryptpass = crypt($passwoord);
|
||||
$encryptpass = md5($passwoord);
|
||||
$location = "index.php?";
|
||||
|
||||
// checken of email al bestaat
|
||||
|
||||