Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

<html> <body> <form> <select name="dp"> <?php mysql_connect("localhost","root",null); mysql_select_db("stu"); $but=$_REQUEST['but']; $dp=$_REQUEST['dp']; if($but=="ok") {

<html>
<body>
<form>
<select name="dp">
<?php
mysql_connect("localhost","root",null);
mysql_select_db("stu");
$but=$_REQUEST['but'];
$dp=$_REQUEST['dp'];

if($but=="ok")
{
		$res=mysql_query(" select classname from class ");
		while($rec=mysql_fetch_array($res))
		{ 
		echo ".$rec[classname]. ";
		}
}
?>
</select>

<select name="dp">
<?php
if($but=="ok")
{
		$c=0;
		$res=mysql_query(" select stu_name from student ");
		while($rec=mysql_fetch_array($res))
		{
		echo "<option>.$rec[stu_name].<option>";
		}
}
?>
</select>
<input type="button" name="but" value="ok">
<form>
</body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.