php mysql video upload not successfully functioning -


i getting following errors:

  1. warning: mysql_connect() [function.mysql-connect]: access denied user 'a5467268_andrew'@'10.1.1.19' (using password: yes) in /home/a5467268/public_html/andrew/fileupload.php on line 2
  2. warning: mysql_select_db(): supplied argument not valid mysql-link resource in /home/a5467268/public_html/andrew/fileupload.php on line 3
<?php $con=mysql_connect("","",""); mysql_select_db("login",$con); extract($_post);  $target_dir = "test_upload/"; $target_file = $target_dir . basename($_files["filetoupload"]["name"]);  if($upd) { //$imagefiletype = pathinfo($target_file,pathinfo_extension); $imagefiletype= $_files["filetoupload"]["type"];  if($imagefiletype != "video/mp4" && $imagefiletype != "video/avi" && $imagefiletype != "video/mov" && $imagefiletype != "video/3gp" && $imagefiletype != "video/mpeg") {     echo "file format not supported"; }  else { $video_path=$_files['filetoupload']['name']; mysql_query("insert video(video_name) values('$video_path')"); move_uploaded_file($_files["filetoupload"]["tmp_name"],"test_upload/".$_files["filetoupload"]["name"]); echo "uploaded "; } } ?> <form method="post" enctype="multipart/form-data"> choose video<input type="file" name="filetoupload"/> <input type="submit" value="uplaod" name="upd"/> </form> 

warning: mysql_connect() [function.mysql-connect]: access denied user 'a5467268_andrew'@'10.1.1.19' (using password: yes) in /home/a5467268/public_html/andrew/fileupload.php on line 2

this occurs when you're using password db user doesn't exist.

try this:

mysql_connect('server_name','db_user','db_user_password'); 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -