Академический Документы
Профессиональный Документы
Культура Документы
(Q.1) (4)
Best of Luck
Dated:07-11-2018
(Q.2) (4)
(ii) How we can find the string position in any paragraph in PHP?
(iii)How we can set the date between 31, December,2015 and 31, December,2018 in HTML?
(iv) How we can select multiple pictures in input field file in HTML?
(v)How we can set three letter country code(PAK) with regular Expression on input field in
HTML?
Body{
background-image: url("img_tree.png"); background-repeat: no-repeat;
background-position: right top; background-attachment: fixed;
}
The CSS margin properties are used to create space around elements, outside of any
defined borders.
There are properties for setting the margin for each side of an element (top, right,
bottom, and left).
The CSS padding properties are used to create space inside elements, inside of any
defined borders.
There are properties for setting the margin for each side of an element (top, right,
bottom, and left).
Best of Luck
Dated:07-11-2018
When data is required at another page we store it in session variable and we can
access it on another page by session_start, we do not use any database for this
purpose
Those software , anyone can use it without any certification, anyone can use by
downloading from website and work on it …
We use it when we upload any file data to server , by Using $_FILES on server side
langugage
(Q.3) (4)
JavaScript Code:
<script>
function fileValidation(){
var fileInput = document.getElementById('fileToUpload');
var filePath = fileInput.value;
var allowedExtensions = /(\.pdf)$/i;
Best of Luck
Dated:07-11-2018
if(!allowedExtensions.exec(filePath)){
alert('Please upload file having extensions .jpeg/.jpg/.png/.gif only.');
fileInput.value = '';
return false;
}
else
{
alert("ok");
}
}
</script>
HTML Code:
<form action="insert.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload"
onchange="return fileValidation()">
<input type="submit" value="Upload Picture" name="submit">
</form>
PHP Code:
<?php
$con=mysqli_connect("localhost","root","");
mysqli_select_db($con, "test");
$name = $_FILES["fileToUpload"]["name"];
$target_dir = "upload/";
$pic_Size = $_FILES["fileToUpload"]["Size"];
if (file_exists($target_dir.$name)) {
unlink($target_dir.$name);
}
move_uploaded_file($_FILES["fileToUpload"]["tmp_name"],$target_dir.$name);
}
?>
Best of Luck
Dated:07-11-2018
Best of Luck