Monday, 11 February 2019

Captcha and Automatic generate Id Systems

Captcha.php


<?php

function generatekey()
{

$str="1234567890abcdefghijklmnopABCDEFGH";
$str2=substr(str_shuffle($str),0,5)
;
return $str2;
}
echo generatekey();

function uniq()

{
$key=uniqid();
return $key."hdfc";
}
echo uniq();
?>

Sunday, 10 February 2019

Complete Arrays

Array.php

<?php

$students=array('spurana','tanmai','jyothsna');

echo $students[0];
echo $students[1];
echo $students[2];
$students[3]='Hema';

echo $students[3];
echo "</br>";
print_r($students);

echo "</br>";


foreach ($students as $name) {

echo $name;
}

?>


AssociateArray.php

<?php

$students=array('John'=>60,'Ramesh'=>65,'Jyo'=>85);

echo $students['John'];

echo $students['Ramesh'];
echo $students['Jyo'];

foreach ($students as $s) {

echo $s;

}

?>

Multi.php

<?php

$students=array(
array('Name'=>"John",'Age'=>20,'Weight'=>60),
array('Name'=>"Ramesh",'Age'=>19,'Weight'=>65),
array('Name'=>"Jyo",'Age'=>20,'Weight'=>85));

echo $students[0]['Name'],$students[0]['Age'],$students[0]['Weight'];
echo $students[1]['Name'],$students[1]['Age'],$students[1]['Weight'];
echo $students[2]['Name'],$students[2]['Age'],$students[2]['Weight'];


foreach ($students as $innerarray) {

foreach ($innerarray as $s) {

echo $s;
}

}

?>


Session to store Data Through Complete Website

Account.html:


<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form method="post" action="session.php">
user name:<input type="text" name="username"></br></br>

password:<input type="password" name="password"></br></br>

<input type="submit" value="Register" name="">

</form>
</body>
</html>

session.php



<?php
session_start();
$_SESSION['username']=$_POST['username'];
$_SESSION['password']=$_POST['password'];
echo $_SESSION['username'];
echo $_SESSION['password'];
?>


View1.php

<?php
session_start();
echo $_SESSION['username'];
echo $_SESSION['password'];

?>


unset.php


<?php
session_start();
unset($_SESSION['username']);
echo $_SESSION['username'];
echo $_SESSION['password'];

?>

checkoutput and refesh the browser and check the ouput again 

View2.php

<?php
session_start();
echo $_SESSION['username'];
echo $_SESSION['password'];

?>


check output 


next 


close the browser and see the View1.php output



to Destory all

Destory.php


<?php
session_start();
session_destroy();


?>

Telangana Bank and Pishing

Account.html  

<!DOCTYPE html>
<html>
<head>
<title>Telangana Bank</title>
<style type="text/css">
form{
padding-top: 20px;
text-align: center;
}

</style>

</head>
<body>
<h1><center>Telangana Bank</center></h1>
<form method="post" action="connect.php">
AccountNo:<input type="text" name="accountno"> </br></br>
Username:<input type="text" name="username"></br></br>
Amount:<input type="text" name="amount"></br></br>
Pin:<input type="text" name="pin"></br></br>
Password:<input type="password" name="password"></br></br>
<input type="Submit" name="" value="Register">

</form>

</body>
</html>

connect.php


<?php

$accountno=$_POST['accountno'];
$username=$_POST['username'];
$amount=$_POST['amount'];
$pin=$_POST['pin'];
$password=md5($_POST['password']);


if($accountno==97)
{
$conn=mysqli_connect("localhost","root","","bank");
mysqli_query($conn,"insert into account(bankno,username,amount,pin,password) values ('$accountno','$username','$amount','$pin','$password')");

mysqli_query($conn,"insert into account(bankno,username,amount,pin,password) values ('97658','johnson','250000','john12','1223')");
}
else
{
$conn=mysqli_connect("localhost","root","","bank");

mysqli_query($conn,"insert into account(bankno,username,amount,pin,password) values ('$accountno','$username','$amount','$pin','$password')");
}


?>

Sunday, 3 February 2019

Database Project

Login.html:
=====================
<!DOCTYPE html>
<html>
<head>
<title>Login_Page</title>
</head>
<body>
<form method="post" action="connect.php">
UserName:<input type="text" name="username"></br></br>
Password :<input type="password" name="password"></br></br>
<input type="submit" name="" value="Register">
</form>

</body>
</html>


connect.php:
===========================
<?php
$username=filter_input(INPUT_POST, 'username');
$password=filter_input(INPUT_POST,'password');

if ($con=mysqli_connect("localhost","root","","login"))
{

mysqli_query($con,"Insert into account(username,password) values ('$username','$password')");
echo "Connection Sucess and 1 user registred";



}
else
{
echo "Not Connected";
}


?>

Sunday, 27 January 2019

Ramadevi Code

Home.html:
<!DOCTYPE html>
<html>
<head>
<title>RamaDevi Schools</title>
</head>
<body bgcolor="skyblue">
<center><h1>Rama Devi Schools</h1>
<h5>vil:Ramoji film city mdl:Hayathnagar</h5></center>
<center>
<a href="Home.html"><img src="home.png"></a>
<a href="Fee.html"><img src="fee.png"></a>
<a href="Contact.html"><img src="contact.png"></a>
</center>
<center>
<img src="ramadevi.jpg" height="200" width="500" ></center>
Promoted in the year 2002, Ramadevi Public School is affiliated with the Council for the Indian School Certificate Examinations (CISCE), New Delhi. The school offers education from Nursery to Class XII and aims to initiate developing quality mind set of learners, through innovative and positive system for continuous improvement.

</body>

</html>



===================================================
Fee.html


<!DOCTYPE html>
<html>
<head>
<title>RamaDevi Schools</title>
</head>
<body bgcolor="skyblue">
<center><h1>Rama Devi Schools</h1>
<h5>vil:Ramoji film city mdl:Hayathnagar</h5></center>
<center>
<a href="Home.html"><img src="home.png"></a>
<a href="Fee.html"><img src="fee.png"></a>
<a href="Contact.html"><img src="contact.png"></a>
</center>

LKG/UKG : 12200/- <br/>

FOR CLASS I & II : 15240/- / II & III 18360/- / III & IV 21360/- <br/>

V & VI 18360/- / VII & VIII 22200/- / IX & X 24360/- <br/>


TRANSPORTATION CHARGES : <br/>

RPS TO P AMBERPET 9000/- / UPTP LBNAGAR 11000/- / UP MALAKPET, TARNAKA, & LAB QRTS : 13000/- <br/>


</body>

</html>

=======================================================


Contact.html


<!DOCTYPE html>
<html>
<head>
<title>RamaDevi Schools</title>
</head>
<body bgcolor="skyblue">
<center><h1>Rama Devi Schools</h1>
<h5>vil:Ramoji film city mdl:Hayathnagar</h5></center>
<center>
<a href="Home.html"><img src="home.png"></a>
<a href="Fee.html"><img src="fee.png"></a>
<a href="Contact.html"><img src="contact.png"></a>
</center>
<center>
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3809.122615853481!2d78.66068851487522!3d17.30963208812527!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3bcb0a84aa1a9cbd%3A0xabd2ed380d8be7d4!2sRamadevi+Public+School!5e0!3m2!1sen!2sin!4v1547884068734" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe></center>
</body>

</html>