LiamProductions
Members-
Posts
496 -
Joined
-
Last visited
Never
Everything posted by LiamProductions
-
Thanks! It works now
-
Online Community BETA test (updated)
LiamProductions replied to shank888's topic in Beta Test Your Stuff!
You need to work on your systems... You can register with just a username no pass or anything or email You can make a post without any subject or message -
This is the output now: File: healthbar.png Type: image/png Size: 270 Warning: move_uploaded_file(upload/healthbar.png) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/liam/public_html/uploadfinish.php on line 17 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpfOcFhM' to 'upload/healthbar.png' in /home/liam/public_html/uploadfinish.php on line 17 Stored in: http://www.liam-monks.com/upload/healthbar.png
-
Sure... upload.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta name="author" content="PHP Designer 2007"> <title>Untitled 2</title> </head> <body> <form method="post" action="uploadfinish.php" enctype="multipart/form-data"> File: <input type="file" name="file"> <input type="submit" value="Upload!"> </form> </body> </html> AND... uploadfinish.php <?php echo "<pre>";print_r($_FILES); if($_FILES['file']['size'] < 20000) { if($_FILES['file']['error'] > 0) { echo "We have found a error: " . $_FILES['file']['error'] . "<br />"; }else{ echo "File: " . $_FILES['file']['name'] . "<br />"; echo "Type: " . $_FILES['file']['type'] . "<br />"; echo "Size: " . $_FILES['file']['size'] . "<br />"; if(file_exists("upload" . $_FILES['file']['name'])) { echo "Sorry, " . $_FILES['file']['name'] . "already exists. "; }else{ move_uploaded_file($_FILES['file']['tmp_name'], "upload/" . $_FILES['file']['name']); echo "Stored in: http://www.liam-monks.com/upload/" . $_FILES['file']['name']; } } }else{ echo "Invalid File!"; } ?> and the result of the page is: Array ( [file] => Array ( [name] => tgpamandabynes.jpg [type] => image/jpeg [tmp_name] => /tmp/phpr3RLIq [error] => 0 [size] => 28375 ) ) Invalid File!
-
Huh? And why isnt the data being recieved?
-
Connect? Do you mean view my files? cPanel 11
-
My hosting is at http://www.apthost.com
-
Not sure what you mean... AND... i've changed the form to what you said.
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <meta name="author" content="PHP Designer 2007"> <title>Untitled 2</title> </head> <body> <form method="post" action="uploadfinish.php"> File: <input type="file" name="file"> <input type="submit" value="Upload!"> </body> </html>
-
The code you just sent outputs: Array ( ) File: Type: Size: Stored in: http://www.liam-monks.com/upload/
-
Hey. I've made a simple upload script... and its not giving me any errors or uploading the file or even telling me the file name <?php if($_FILES['file']['size'] < 20000) { if($_FILES['file']['error'] > 0) { echo "We have found a error: " . $_FILES['file']['error'] . "<br />"; } else { echo "File: " . $_FILES['file']['name'] . "<br />"; echo "Type: " . $_FILES['file']['type'] . "<br />"; echo "Size: " . $_FILES['file']['size'] . "<br />"; if(file_exists("upload" . $_FILES['file']['name'])) { echo "Sorry, " . $_FILES['file']['name'] . "already exists. "; } else { move_uploaded_file($_FILES['file']['tmp_name'], "upload/" . $_FILES['file']['name']); echo "Stored in: http://www.liam-monks.com/upload/" . $_FILES['file']['name']; } } } else { echo "Invalid File!"; } ?> I don't see the error anywhere and its providing no error: Full page result: File: Type: Size: Stored in: http://www.liam-monks.com/upload/
-
You should use the strip tags to strip all the scripts from the username strip_tags() http://www.php.net/strip_tags And you might want to use the trim to stop people from having users like "h e l l o " trim() http://www.php.net/trim
-
<?php $pass = $_POST['pass']; $pass = md5($pass); ?>
-
Thanks for that. But i don't think web design is the way for me to go until im older and can afford PhotoShop :-X And... This post was suppose to be a review on a book i got
-
Good Programming and Web Design Books
LiamProductions replied to theverychap's topic in Miscellaneous
I've got the book Sams teach you PHP 4 and Mysql in 24 hours Just looking at it looks great, teaches you everything... well not everything... -
try storing $REQUEST_URL in a variable.
-
[SOLVED] Storing URL value into a variable.
LiamProductions replied to ghosh's topic in PHP Coding Help
You could use a redirect script -
[SOLVED] Storing URL value into a variable.
LiamProductions replied to ghosh's topic in PHP Coding Help
something like this: <?php $back = $_SERVER['HTTP_REFERER']; <a href="$back">go back</a> ?> -
[SOLVED] Storing URL value into a variable.
LiamProductions replied to ghosh's topic in PHP Coding Help
Basically make a Back button on the page? -
You might store each email in a database then loop it out?
-
If teens have fun coding we should be able to do it than some adults saying you should'nt do it till your older
-
Can i just say... I am in Grade/Year 9 -HIGH SCHOOL- I do have plans for the future... Either something to do with Computers like Programming or being a Plumber
-
Can i have your MSN, SO i can speak to you? If yes, PM it me
-
Your saying i won't get any general experience? And you guys are being stupid this is like saying Don't play football till your older then get a football job
-
General Life experience? What do you mean by that?