Foto's fixen v2, verplaatsen default foto

This commit is contained in:
sender8782 committed 2017-02-21 19:27:27 +01:00
1 parent 0c50246e56
commit 35e81ae06b
9 files changed
+11 -10

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 19 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 KiB

+1 -1
View File
@@ -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);
+9 -8
View File
@@ -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')";
+1 -1
View File
@@ -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