qua hay de malo?
Código PHP:
[HIGHLIGHT="PHP"]include('../connect.php');
$a = $_POST['idnum'];
$b = 'Inactivo';
$c = $_POST['course'];
$d = $_POST['lname'].', '.$_POST['fname'].' '.$_POST['mname'];
$correo =$_POST['email'];
$result = $db->prepare("SELECT id_number FROM list_stu_num WHERE id_number= :a AND correo= :correo");
$result->bindParam(':a', $a);
$result->bindParam(':correo', $correo);
$result->execute();
$rows = $result->fetch(PDO::FETCH_NUM);
if($rows > 0) {
// query
$sql = "INSERT INTO list_stu_num (id_number,status,name,course,correo) VALUES (:a,:b,:c,:d,:correo)";
$q = $db->prepare($sql);
$q->execute(array(':a'=>$a,':b'=>$b,':c'=>$d,':d'=>$c,':correo'=>$correo));
if($q) {
[/HIGHLIGHT]