Pratical 3
Pratical 3
IT-C43
PRACTICAL 3.1- Create Student registration from using text box, check box, radio button ,
select, submit button And display user inserted value in new PHP page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>studentform</title>
</head>
<body>
<div class="head">
</div>
<br>
<option value="ce">CE</option>
<option value="it">IT</option>
<option value="mech">MECH</option>
<option value="civil">CIVIL</option>
</select><br><br>
</form>
<?PHP
if(isset($_GET['submit'])){
echo '</br>';
echo '</br>';
echo '</br>';
echo '</br>';
echo '</br>';
?>
</body>
</html>
output:-
Tivr-22171371100
IT-C43
PRACTICAL-3.2 Create Website registration from using text box, check box, radio
page.(PHP_SELF)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>register</title>
</head>
<body>
<br><hr>
<br><hr>
<br><hr>
<br><hr>
HOBBY
<br><hr>
<table>
<?php
if(isset($_POST['submit'])){
echo "hobby....";
if(isset($_POST['h'])){
foreach($_POST['h'] as $selected){
echo $selected;
?>
</table>
</body>
</html>
output:-
Tivr-22171371100
IT-C43
PRACTICAL 3.4 Create PHP script that can upload any type of file to the specific folder.
<!DOCTYPE html>
<html lang="en">
<head>
<title> file</title>
</head>
<body>
<form>
<?php
if(ISSET($_POST['submit'])){
if(move_uploaded_file($_FILES['file']['tmp_name'],"C:\Users\ptlsl\OneDrive\Pictures\Documents\php/".
$_FILES['file']['name'])){
?>
</body>
</html
output:-