| | |
Need help with uploading.....
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2009
Posts: 2
Reputation:
Solved Threads: 0
I have an uploading script but i don't know what is the problem it always gives "Error". Here is the script
Please help me........
Thanks
<?php
include ("include/session.php");
$username = $session->username;
if ($_REQUEST[completed] == 1) {
$newname = $username . ".gif";
move_uploaded_file($_FILE['mailfile']['tmp_name'], "./$newname") or die("Error");
}
?>
<?php if ($_REQUEST[completed] != 1) { ?><b>Please upload an image</b>
<br />
<form enctype="multipart/form-data" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1500000"> <input type="hidden" name="completed" value="1"> Choose file to send: <input type="file" name="mailfile"><br /><input type="submit" value="Upload">
</form>
<?php
} else {
?>
<b>File Uploaded</b>
<?php
}
?>Thanks
![]() |
Similar Threads
- Uploading Folder to FTP Server (Visual Basic 4 / 5 / 6)
- Uploading files Access Denied Error (ASP.NET)
- Uploading files onto the Web Server (ASP)
- Problems with internet uploading levels (Networking Hardware Configuration)
- Uploading Folders to Web in OSX.3.7 (OS X)
- uploading image in database (PHP)
- computer times out when uploading filles (Web Browsers)
- Uploading files using HTTP/X and CGI (Shell Scripting)
- uploading .txt file via phpmyadmin to Mysql (MySQL)
Other Threads in the PHP Forum
- Previous Thread: Help with Implementing email form validations please
- Next Thread: Protection Function
Views: 186 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download duplicates dynamic echo email error execution file files folder form forms function functions google href htaccess html htmlspecialchars image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php phpvotingscript problem query radio random recursion regex remote script search select server session sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





