For upload image in php
input type="file" name="photo"
input name="submit" type="submit" value = "Submit"
now when user select an image and press submit button then the proc.php will call...
The code of proc.php is$uploads_dir = '/images';
$pic=($_FILES['photo']['name']);
$tmp_name = $_FILES["photo"]["tmp_name"];move_uploaded_file($tmp_name, "$uploads_dir/$pic");
this is the way you can upload your image
Comments
Post a Comment