-5
$name=$_FILES['file']['name'];
$temp=$_FILES['file']['tmp_name'];

move_uploaded_file($temp,"upload1/".$name);
$url="video/upload/$name";

mysql_query("insert into video (name,url) values('$name','$url')");
Alexander O'Mara
  • 58,688
  • 18
  • 163
  • 171
Jay Joshi
  • 46
  • 7
  • 1
    `mysql` does not store the images, it stores the path... Search for _["Upload large files in "](https://www.google.co.in/?ion=1&espv=2#q=upload%20large%20files%20in%20php)_ – Rayon Aug 29 '16 at 04:54
  • You have to change in your php.ini file not in mysql file. – krunal nerikar Aug 29 '16 at 04:56
  • there is no size problem with this code unless you have a very long $name or $url – Jaromanda X Aug 29 '16 at 04:56
  • 2
    Required reading: [Why shouldn't I use mysql_* functions in PHP?](https://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php) and [How can I prevent SQL-injection in PHP?](https://stackoverflow.com/questions/60174/how-can-i-prevent-sql-injection-in-php) Also, for everyone's sake, stop using whatever resource gave you that code. It's 2016, not the turn of the century... – Alexander O'Mara Aug 29 '16 at 04:58
  • 1
    Possible duplicate of [PHP change the maximum upload file size](http://stackoverflow.com/questions/2184513/php-change-the-maximum-upload-file-size) – Aditya Aug 29 '16 at 05:09

1 Answers1

2

you modified php.ini.

post_max_size = 25M

Just change your php.ini(xampp/php/php.ini) file, it worked for me.

memory_limit = 1000M
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000

And, don't forget to restart MySQL Module from XAMPP Control Panel