Deftone
Members-
Posts
20 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
Deftone's Achievements
Newbie (1/5)
0
Reputation
-
Dear, I'm on the shared hosting. I think that's the problem is that I'm the ftp user and I don't have permission to rename files. But how to change the user? Iknow that php knows two users php and ftp I chmod the files already to 777 but it's not helping.
-
I chmod throug SSH all the files to 777 So I dont think it's the permission issue I also call the webhost but they said that it's the script that couses the problem
-
Ok maybe I'm a littlebit futher. Now when I try to upload something I get this error: [code]Warning: rename(../uploads/,../fotos/317.jpg) [function.rename]: Permission denied in /home/knr11315/domains/kimi-raikkonen.nl/public_html/plaatjes/toevoegen.php on line 40 [/code] The line 40 in the php script is like this: [code]rename("$map$bestand2", "$mapa$aaa");[/code] What is wrong with this one ?
-
Hi Ken, I try to make it work but it did not worked. I'm to new in this world to fix it.
-
By the way this is the last script that don't work. The other I get fixed with help from this forum
-
Yeah good question. Becouse My new host only have PHP5 ;)
-
Hi, Again I'm going to ask foryor help. :'( I have script that give me the possibility to upload the foto's to my gallery. Since PHP 5 this script is not working. When I fill all the info the fields turns blank but nothing happens Can you help me again ? [code]<?php include ('_mySQL.php'); if ($toevoegen == "ja") { if ($pwd == "$pass") { $database_server = mysql_connect("$host","$user","$pass"); mysql_select_db("$database", $database_server); mysql_connect("$host","$user","$pass"); mysql_select_db("$database"); $query = "SELECT id FROM plaatjes ORDER BY id DESC LIMIT 0, 1"; //Select $resultaat = mysql_query($query) or die ("Het ophalen van de gegevens is mislukt."); while ($record = mysql_fetch_object($resultaat)) { $beschikbaar = $record->id + 1; } $map = "../uploads/"; $mapa = "../fotos/"; //uploaden // Bestands naam opvragen $bestand2 = explode("\\", $bestand_name); $laatste = count($bestand2) - 1; $bestand2 = "$bestand2[$laatste]"; //$bestand2 = "$beschikbaar.jpg"; $aaa = "$beschikbaar.jpg"; // Save file copy($bestand, "$map$bestand2"); print ("De afbeelding is met succes geupload.<br>"); //Rename rename("$map$bestand2", "$mapa$aaa"); echo "De afbeelding is met succes hernoemd.<br><br>"; $bestand = "$thumbnail"; $map = "../uploads/"; $mapa = "../thumbnails/"; //uploaden // Bestands naam opvragen $bestand2 = explode("\\", $bestand_name); $laatste = count($bestand2) - 1; $bestand2 = "$bestand2[$laatste]"; //$bestand2 = "$beschikbaar.jpg"; $aaa = "$beschikbaar.jpg"; // Save file copy($bestand, "$map$bestand2"); print ("De thumbnail is met succes geupload.<br>"); //rename rename("$map$bestand2", "$mapa$aaa"); echo "De thumbnail is met succes geupload.<br><br>"; [/code]
-
Thank you thank you thank you Problem solved. You can close this topic. ;) ;) ;) ;) ;) ;) ;) ;)
-
Yes. I use this two [code]<html> <head> <title>Race-uitslag toevoegen</title> </head> <body> <font face=\"Arial\" size=\"2\"> <form action=\"race.php\" enctype=multipart/form-data> <input type=\"hidden\" name=\"toevoegen\" value=\"ja\"> Wachtwoord:<br> <input type=\"password\" size=\"30\" name=\"pwd\"><br> Circuit:<br> <input type=\"text\" size=\"30\" name=\"race\" value=\"$race\"><br> Jaar:<br> <input type=\"text\" size=\"30\" name=\"jaar\" value=\"$jaar\"><br> Plaats:<br> <input type=\"text\" size=\"30\" name=\"plaats\"><br> Coureur:<br> <input type=\"text\" size=\"30\" name=\"coureur\"><br> Team:<br> <input type=\"text\" size=\"30\" name=\"team\"><br> Tijd / reden uitval:<br> <input type=\"text\" size=\"30\" name=\"tijd\"><br> Gefinished: <b>ja / nee</b><br> <input type=\"text\" size=\"30\" name=\"finish\" value=\"$finish\"><br> <input type=\"submit\" value=\"Verzenden\"> <input type=\"reset\" value=\"Invoer wissen\"> </form> </body> </html> "; } else { ?> <html> <head> <title>Race-uitslag toevoegen</title> </head> <body> <font face="Arial" size="2"> <form action="race.php" method="post"> <input type="hidden" name="toevoegen" value="ja"> Wachtwoord:<br> <input type="password" size="30" name="pwd"><br> Circuit:<br> <input type="text" size="30" name="race"><br> Jaar:<br> <input type="text" size="30" name="jaar"><br> Plaats:<br> <input type="text" size="30" name="plaats"><br> Coureur:<br> <input type="text" size="30" name="coureur"><br> Team:<br> <input type="text" size="30" name="team"><br> Tijd / reden uitval:<br> <input type="text" size="30" name="tijd"><br> Gefinished: <b>ja / nee</b><br> <input type="text" size="30" name="finish"><br> <input type="submit" value="Verzenden"> <input type="reset" value="Invoer wissen"> </form> </body> </html>[/code]
-
I don't know where to search
-
Ok I did that but stil nothing get into the DB The only thing i get above the page is [code]Array ( [toevoegen] => ja [pwd] => ***** [race] => Duitsland [jaar] => 2006 [plaats] => 1 [coureur] => T.Test [team] => Renault [tijd] => 1:22:22:234 [finish] => ja )[/code]
-
Here you go [code] <?php include ('_mySQL.php'); if ($toevoegen == "ja"); if ($pwd == "$pass"); if($_POST['submit']){ //Toevoegen //Connect $database_server = mysql_connect("$host","$user","$pass") or die(mysql_error()); mysql_select_db("$database", $database_server) or die(mysql_error()); if ($plaats == "1"){ $plaats = " 1"; } else { } if ($plaats == "2"){ $plaats = " 2"; } else { } if ($plaats == "3"){ $plaats = " 3"; } else { } if ($plaats == "4"){ $plaats = " 4"; } else { } if ($plaats == "5"){ $plaats = " 5"; } else { } if ($plaats == "6"){ $plaats = " 6"; } else { } if ($plaats == "7"){ $plaats = " 7"; } else { } if ($plaats == "8"){ $plaats = " 8"; } else { } if ($plaats == "9"){ $plaats = " 9"; } else { } //Data insert mysql_query("INSERT INTO race VALUES ('" . $_POST["plaats"] . "', '" . $_POST["coureur"] . "', '" . $_POST["team"] . "', '" . $_POST["tijd"] . "', '" . $_POST["finish"] . "', '" . $_POST["race"] . "', '" . $_POST["jaar"] . "')"); echo( mysql_error() ); //Geef weer dat het is gelukt echo "Gegevens toegevoegd!"; echo " <html> <head> <title>Race-uitslag toevoegen</title> </head> <body> <font face=\"Arial\" size=\"2\"> <form action=\"race.php\" enctype=multipart/form-data> <input type=\"hidden\" name=\"toevoegen\" value=\"ja\"> Wachtwoord:<br> <input type=\"password\" size=\"30\" name=\"pwd\"><br> Circuit:<br> <input type=\"text\" size=\"30\" name=\"race\" value=\"$race\"><br> Jaar:<br> <input type=\"text\" size=\"30\" name=\"jaar\" value=\"$jaar\"><br> Plaats:<br> <input type=\"text\" size=\"30\" name=\"plaats\"><br> Coureur:<br> <input type=\"text\" size=\"30\" name=\"coureur\"><br> Team:<br> <input type=\"text\" size=\"30\" name=\"team\"><br> Tijd / reden uitval:<br> <input type=\"text\" size=\"30\" name=\"tijd\"><br> Gefinished: <b>ja / nee</b><br> <input type=\"text\" size=\"30\" name=\"finish\" value=\"$finish\"><br> <input type=\"post\" value=\"Verzenden\"> <input type=\"reset\" value=\"Invoer wissen\"> </form> </body> </html> "; } else { ?> <html> <head> <title>Race-uitslag toevoegen</title> </head> <body> <font face="Arial" size="2"> <form action="race.php"> <input type="hidden" name="toevoegen" value="ja"> Wachtwoord:<br> <input type="password" size="30" name="pwd"><br> Circuit:<br> <input type="text" size="30" name="race"><br> Jaar:<br> <input type="text" size="30" name="jaar"><br> Plaats:<br> <input type="text" size="30" name="plaats"><br> Coureur:<br> <input type="text" size="30" name="coureur"><br> Team:<br> <input type="text" size="30" name="team"><br> Tijd / reden uitval:<br> <input type="text" size="30" name="tijd"><br> Gefinished: <b>ja / nee</b><br> <input type="text" size="30" name="finish"><br> <input type="submit" value="Verzenden"> <input type="reset" value="Invoer wissen"> </form> </body> </html> <?php } ?> [/code]
-
I did that but again anly empty fields. Guys once again I really apriciate your help. You are great