Conectivity With PHP
Conectivity With PHP
php
<?php
// create a variable
$fname=$_POST['first_name'];
$lname=$_POST['last_name'];
$marks=$_POST[‘marks’];
$selected_course = $_POST['Course'];
$connect = mysql_connect("localhost","root","");
if (!$connect)
mysql_select_db("college",$connect);
if(!mysql_query($sql,$connect))
die('Error'. mysql_error());
mysql_close($connect);
<html><head><style>
label{display:inline-block;width:100px;margin-bottom:10px;}
</style><title>Add Student</title>
</head><body>
<br />
<label>Last Name</label>
<br />
<label>Marks</label>
<br />
<select name="course">
<option value="BCCA">BCCA</option>
<option value="BCA">BCA</option>
<option value="BCOM">BCOM</option>
<option value="BBA">BBA</option>
<option value="MCA">MCA</option>
</select><input type="submit"></form></body></html>