php5,7,14,18 A
php5,7,14,18 A
html
<html>
<head>
function display()
n=f1.txt.value;
var xmlhttp;
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest;
else
xmlhttp=new ActiveXObject("Microsoft.xmlhttp");
xmlhttp.onreadystatechange=function()
document.getElementById("result").innerHTML=xmlhttp.responseText;
};
xmlhttp.open("GET","slip5B.php?txt="+ n,true);
xmlhttp.send();
</script>
</head>
<body>
<form name="f1">
<div id="result"></div>
</body>
</html>
slipB.php
<?php
$name=$_GET['txt'];
$host='localhost';
$user='root';
$pass='';
$db='advancephp';
$mysqli=new mysqli($host,$user,$pass,$db);
if($mysqli->connect_errno)
$mysqli->select_db($db);
if($result=$mysqli->query("SELECT DATABASE()"))
$row=$result->fetch_row();
$result->close();
$result=$mysqli->query($query);
if(mysqli_num_rows($result)>0)
echo"<table>";
echo"<tr>";
echo"</tr>";
while($row=mysqli_fetch_array($result))
echo "<tr>";
echo "</tr>";
echo"</table>";
mysqli_free_result($result);
else
$mysqli->close();
?>
Slip7B.html
<html>
<body>
</form>
</body>
</html>
Slip7B.php
<?php
$ptitle = $_GET['ptitle'];
$con=mysqli_connect("localhost","root","","slip7bdatabase");
while($row = mysqli_fetch_array($q))
echo $row['s_name'];
mysqli_close($con);
?>
Slip14B.html
<html>
<head>
<script type="text/javascript">
function validation()
var ob=false;
ob=new XMLHttpRequest();
var nm=document.getElementById("nm").value;
var pass=document.getElementById("pass").value;
ob.open("GET","slip14B.php?nm="+nm+"&pass="+pass);
ob.send();
ob.onreadystatechange=function()
document.getElementById("val").innerHTML=ob.responseText;
</script>
</head>
<body>
<span id="val"></span>
<body>
</html>
Slip14B.php
<?php
$una=$_GET['nm'];
$ps=$_GET['pass'];
$sn="localhost";
$un="root";
$pas="";
$dbn="advancephp";
$con=mysqli_connect($sn,$un,$pas,$dbn);
$r=mysqli_query($con,$sql);
if (mysqli_num_rows($r) > 0)
echo "Login";
else
echo "Not";
else
?>
Slip17A.php
<?php
echo"<table border=1>";
foreach($_SERVER as $a=>$b)
echo"<tr><td>".$a."</td><td>".$b."</td></tr>";
echo"</table>";
?>
Slip18A.php
<html>
<head>
<title>Distance Conversion</title>
<body>
<table>
</form>
</table>
<?php
if($_SERVER['REQUEST_METHOD']=='GET')
////////...................///////
else if($_SERVER['REQUEST_METHOD']=='POST')
$dist=$_POST['t1'];
$op=$_POST['r1'];
switch($op)
case 1:
$cm=$dist*100;
break;
case 2:
$km=$dist/1000;
break;
?>
</body>
</html>