Beruflich Dokumente
Kultur Dokumente
or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Agregar Docente</title>
<link href="Style/Add_Form.css" rel="stylesheet" type="text/css"
/>
</head>
?>
<tr>
<th>Nombre:</th>
<td><input type="text" name="txtname" placeholder="Type Name" /></td>
<th>Genero:</th>
<td><select name="txtgender">
<option>Selecciona el Genero</option>
<option>Masculino</option>
<option>Femenino</option>
</select>
</td>
</tr>
</table>
<?php
$id = $_POST['txtid'];
$name = trim($_POST['txtname']);
$gender = trim($_POST['txtgender']);
if(isset($_POST['cmdadd'])){
if(empty($name) )
{
echo "<center>Sorry please input data</center>";
}else{
include "connect.php";
$i = mysql_query("insert into tbl_teacher (teaid, name, gender) values('
".$id."','".$name."','".$gender."')");
if($i==true){
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=index.php">';
}
//if($i==true){
//header('Location:index.php');
//exit;
//mysql_close();
//}
}
}