| | |
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
| Thread Tools | Search this Thread |
# 5.2.10 action address apache api array auto autoincrement beginner binary broken cakephp checkbox class classes cms code cron curl database date dehasher destroy display dissertation domain dynamic echo echo$_get[x]changingitintovariable... email error errorlog fatalerror file files folder form forms function functions google href htaccess html if-else image images include insert ip javascript joomla legislation limit link load login mail masterthesis menu mlm multiple mysql mysqlquery oop open paypal pdf persist php popup problem query radio random record recursion remote script search server sessions sms sockets source space sql syntax system table tutorial update upload url validator variable video web youtube





