alert('Invalid format. Only jpg / jpeg/ png /gif format allowed');"; //} else { //rename the image file $imgnewfile = ($imgfile) . $extension; // Code for move image into directory move_uploaded_file($_FILES["image"]["tmp_name"], "blog-images/" . $imgfile); $status = 1; $query = mysqli_query($con, "insert into blog(title,description,image,status) values('$title','$description','$imgfile','$status')"); if ($query) { $msg = "blog successfully upload "; } else { $error = "Something went wrong . Please try again."; } } ?>
Forms are used to collect user information with different element types of input, select, checkboxes, radios and more.
A form with a label on top of each form control.