Guys CK is out! Hope you guys enjoy it and also get the message we are trying to give out in a fun way. CK has taken maximum efforts. Hope you all love it. Enjoy, keep laughing and Happy SDEing!!!
Create The HTML Form Create an HTML form, so you can choose file want to upload: *********************** Code *********************** <form action="upload.php" method="post" enctype="multipart/form-data"> Please choose a file: <input type="file" name=" uploadFile " accept="image/*" /> <br> <input type="submit" value="Upload File" /> </form> *********************** End of Code *********************** On the Above code accept is use for accepting only Image file as a File Input. If no accept is specify, All File are accepted. Create a upload.php file , whose code will be as Follow: *********************** Code *********************** ?php $target_dir = "uploads/"; $target_dir = $target_dir . basename( $_FILES["uploadFile"]["name"]); $uploadOk=1; // Check if file already exists if (file_exists($...
Here , I am describing a help content for a registration fields. Some Time we have to make a registration form, where we want to show some information about the Input fields. Here, I am making a tooltip using CSS and HTML. Company Name
Put the Following Function here: <?php function uploadimgfile($index,$folder="other",$prefix="other") { $target_dir = "upload_directory_path/"; // try to put full physical path // identity accstatement address advtimg other $uploadOk = 1; $senddata = array(); $senddata['data'] = "NILL"; $notallowed = array("php","js","css","html"); // defined here the extesion not to upload $shownotallowed = "PHP, JS, CSS, HTML fie is not allowed to upload."; $extension = explode(".",basename($_FILES[$index]["name"])); $extension = end($extension); ECHO "<hr/>" . $realfilnename = basename($_FILES[$index]["name"]); $datetofolder = date("Y/M/d"); $datetofolder = strtolower($datetofolder); $checkdirectory = $targ...
Comments
Post a Comment