Loading...

Category: PHP

Login Application

<?php session_start();if(isset($_SESSION[‘valid’])){echo “<script> location=’Welcome.php’ </script>”;}else session_destroy();if(isset($_POST[‘sub’])){$uname=$_POST[‘uname’];$pwd=$_POST[‘pwd’];if($uname==”Webnoid” and $pwd= “School”){session_start();$_SESSION[‘valid’]=true;$_SESSION[‘uname’]=$uname;echo “<script> location=’Welcome.php'</script>”;}else{echo “Invalid”;}?><form method=”post”  action=” “>username: <input type=”text name=”uname”>password: <input type=”password” name=”pwd”>                    [ … ]

Session

Session is a state management object using to access values of one page from another page. Session can store information in web server by using $_SESSION we can create the [ … ]

Cookie

Cookie is some text information in client system used to maintain the state of application the data of cookie we can access from any location in the server. Cookie is [ … ]

Protocols of PHP

Protocols are set of instructions transfer the data from one page to another page. Protocols are mainly divided into two types. they are, 1) State full protocol: 2) State less [ … ]

multipart/form_data

It is a common MIME tag can upload any type of file. is_upload_file:  By using this function we can check whether file is uploaded from browser temporary memory location to [ … ]

MIME

MIME stands for Multipurpose Internet Mailing Extension. It is a type extension used to upload files from browser to server form tag contains ‘enctype’ attribute. By using this we can specify [ … ]

Files in PHP

$_FILE: By using this super global variable we can get the information of uploaded files. It is two dimensional array variable contains five elements. Each element’s first dimension is name [ … ]