Visit: http://www.onlineustaad.com for all of my tutorials in Urdu/Hindi. In this new series of my tutorials on PHP and MySQL you’ll learn it from basic to its …
source
Visit: http://www.onlineustaad.com for all of my tutorials in Urdu/Hindi. In this new series of my tutorials on PHP and MySQL you’ll learn it from basic to its …
source
14 responses to “New PHP MySQL Tutorials in Urdu/Hindi part 19 $ FILES method”
bhai muje es me bht masla aa raha h yr jb me echo karwata hu na to your file is uploaded to file upload ni hote q k muje lagta h ye statment nai kar kar rahi move_uploaded_file($image_tmp, "$image_name"); object not found ata h kindly es me meri thori c help kar den
Sir,Assalamo Alaikum Warahmatullah,
move_uploaded_file($image_tmp, "$image_name"); why is $image-name in double quotation marks it's works also without these??????? Thank you
sir g mara Notice: Undefined variable: image_tmp in C:wamp64wwwphptraining14_files.php on line 20 error show ho raha ha jab ma move_uploaded_file() likhta hon to ya error sho hota ha syntax mara bilkul ap jasa ha but phir b error sho hota ha
mari codding ma ager koy masla ha to plz bata din.
<html>
<head>
<title>PHP file array</title>
</head>
<body>
<form method="post" action="14_files.php" enctype="multipart/form-data">
Upload Image: <input type="file" name="image"><br><br>
<input type="submit" name="upload" value="Upload now">
</form>
</body>
</html>
<?php
// php $_FILES array
if(isset($_POST['upload'])){
echo $image_name = $_FILES['image']['name']."<br>";
echo $image_type = $_FILES['image']['type']."<br>";
echo $image_type = $_FILES['image']['size']."<br>";
echo $image_tmp = $_FILES['image']['tmp_name']."<br>";
}
move_uploaded_file($image_tmp,"$image_name");
echo "file has been uploaded!";
?>
<body>
<form align="center" method="post" action="index.php" enctype="multipart/form-data">
Upload image <input type="file" name="image" />
<input type="submit" name="upload" value="Upload Now" />
</form>
<?php
if(isset($_POST ['upload'])){
$image_name =$_FILES ['image']['name'];
$image_type =$_FILES ['image']['type'];
$image_size =$_FILES ['image']['size'];
move_uploaded_file($image_temp,"$image_name");
echo "File is uploaded";
}
?>
Upload image Choose File Upload Now
Notice: Undefined index: image in C:xampphtdocsphp trainingindex.php on line 18
Notice: Undefined index: image in C:xampphtdocsphp trainingindex.php on line 19
Notice: Undefined index: image in C:xampphtdocsphp trainingindex.php on line 20
Notice: Undefined variable: image_temp in C:xampphtdocsphp trainingindex.php on line 22
File is uploaded
IMAGE UPLOAD NAHI HO RAHI PLZ CHECK IT SIR ??
<html>
<head>
<title>$_FILES METHOD</title>
</head>
<body>
<form align="center" method="POST" action="$_FILES.php" enctype=
"multipart/form-data">
Upload Image: <input type="file" name="image"><br>
<input type="submit" name="upload" value="Upload now">
</form>
</body>
</html>
<?php
if (isset($_POST['upload']))
{
echo "<b>Image Name:</b> ".$img_name = $_FILES ['image']['name'] ."<br>";
echo "<b>Image Type:</b> ".$img_type = $_FILES ['image']['type'] ."<br>";
echo "<b>Image Size:</b> ".$img_size = $_FILES ['image']['size'] ."<br>";
echo "<b>Image Temp Name:</b> ".$img_tmp = $_FILES ['image']['tmp_name'] ."<br>";
move_uploaded_file($img_tmp,"$img_name");
echo "File has been uploaded !<br> " ;
echo "<b>Your image is here:</b><br>" ;
echo "<center><img src='$img_name'></center>" ;
}
?>
sir mene ye ap wali hi codeing ki hai fileupload ki lkin image show nai horahi
file has nt be given temporary name.
so no image save in folder
ECHO MECHO really funny teacher but Good one also keep it up brother
Notice: Undefined index: image in C:xampphtdocsexamplefile.php on line 14
run nahi kar raha sir
<html>
<head>
<title>$_files</title>
</head>
<body>
<form action="file.php" method="post" enctype="multipart/form_data" align="center">
upload image:<input type="file" name="image" ><br/></br/>
<input type="submit" name="upload" value="upload now">
</body>
</html>
<?php
if(isset($_POST['upload']))
{
echo $image_name=$_FILES["image"]["name"];
echo $image_tmp=$_FILES["image"]["tmp_name"];
$move_uploaded_file($image_tmp, "$image_name");
echo "file has been uploaded";
}
?>
sir tell me about how to upload multiple images
Sir niche image name, type waghera show nahi ho raha page mein himeine completely apka code follow kia
my picture not come in folder
please ! chech it.
Thanks for your nice tutorial. How can we upload multiple images by using one field.