php codes add and add process

30 0 0
                                        

ADD

<?php

session_start();

if(!isset($_SESSION['adminID'])){

header('location:admin_login.php');

}

include'conn.php';

?>

<form>

<table>

<tr>

<td>Course Code:</td><td><input/></td>

</tr>

<tr>

<td>Course Description</td><td><input/></td>

</tr>

</table>

<input/>

</form>

ADD PROCESS

<?php

session_start();

if(!isset($_SESSION['adminID'])){

header('location:admin.php');

}

include 'conn.php';

$c = $_POST['courseCode'];

$cd = $_POST['courseDesc'];

$query = mysql_query("Select * from course where courseCode = '$c' and courseDesc = '$cd'");

$count = mysql_num_rows($query); 

if($count==1){

echo "naay kapareha";

}else{

mysql_query("INSERT course set courseCode = '$c',courseDesc = '$cd'");

echo "ambot lang";

}

?>

You've reached the end of published parts.

⏰ Last updated: Sep 27, 2013 ⏰

Add this story to your Library to get notified about new parts!

php codes add and add processWhere stories live. Discover now