note 119612 added to function.move-uploaded-file

From: Date: Sat, 16 Jul 2016 02:16:01 +0000
Subject: note 119612 added to function.move-uploaded-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-206038@lists.php.net to get a copy of this message
<?php // for udating data comes in table if(isset($_POST['update'])){ $update_id=$_GET['edit_form']; // get variable created in above form edit_form $name=$_POST['name']; $staff_id=$_POST['staff_id']; $address=$_POST['address']; $qualification=$_POST['qualification']; $designation=$_POST['designation']; $level=$_POST['level']; $subject=$_POST['subject']; $contact_no=$_POST['contact_no']; $email_id=$_POST['email_id']; $image=$_FILES['image']['name']; /*$image=$_FILES['image']['name']; $image_type=$_FILES['image']['type']; $image_size=$_FILES['image']['size']; $image_tmp=$_FILES['image']['tmp_name']; move_uploaded_file($image_tmp,"../images/$image") ;*/ if($_FILES['image']['name']!='') { $file='../images/'.$row['image']; @unlink($file); $image_tmp=$_FILES['image']['tmp_name']; $image=$_FILES['image']['name']; $fileUpload = move_uploaded_file($image_tmp,"../images/".$image); } else { $image="../images/".$image_name; } $update_query="update staff_info set staff_id='$staff_id',name='$name',designation='$designation', address='$address', qualification='$qualification',level='$level',subject='$subject', contact_no='$contact_no',email_id='$email_id',image='$image' where id='$update_id'"; if(mysql_query($update_query)){ echo"<script>window.open('index.php?updated=Post has been updated sucessfully','_self')</script>"; } } ?> ---- Server IP: 72.52.91.14 Probable Submitter: 110.34.19.3 ---- Manual Page -- http://php.net/manual/en/function.move-uploaded-file.php Edit -- https://master.php.net/note/edit/119612 Del: integrated -- https://master.php.net/note/delete/119612/integrated Del: useless -- https://master.php.net/note/delete/119612/useless Del: bad code -- https://master.php.net/note/delete/119612/bad+code Del: spam -- https://master.php.net/note/delete/119612/spam Del: non-english -- https://master.php.net/note/delete/119612/non-english Del: in docs -- https://master.php.net/note/delete/119612/in+docs Del: other reasons-- https://master.php.net/note/delete/119612 Reject -- https://master.php.net/note/reject/119612 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206038) next »