Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // 1. define relative path to `include` directory:
- define('AT_INCLUDE_PATH', '../../include/');
- // 2. require the `vitals` file before any others:
- require (AT_INCLUDE_PATH . 'vitals.inc.php');
- authenticate(AT_PRIV_HELLO_WORLD);
- require (AT_INCLUDE_PATH.'header.inc.php');
- if(isset($_GET['courseName']))
- {
- $_courseName=$_GET['courseName'];
- $_courseId=$_GET['courseId'];
- $_courseTiming=$_GET['courseTiming'];
- require(AT_INCLUDE_PATH . 'classes/sqlutility.class.php');
- ///$sqlUtility =& new SqlUtility();
- //$sqlUtility->queryFromFile(dirname(__FILE__) . '/BBB_create_table.sql', TABLE_PREFIX);
- // echo 'table created';
- // global $db, $progress, $errors;
- $sql = "INSERT INTO ".TABLE_PREFIX."bbb VALUES ('$_courseName','$_courseId','$_courseTiming')";
- $result = mysql_query($sql, $db);
- }
- ?>
- Hello Instructor!! :)
- <?php
- if($_REQUEST['id'])
- echo "1" ;
- else echo "2";
- echo $_SESSION['id'];
- ////get_login(intval($_GET['id']));?>
- <table border="2">
- <tr>
- <td>Course name</td>
- <td>course id</td>
- <td>Course timing</td>
- <?php
- //write php code to fetch data from database
- ?>
- </tr>
- </table>
- Create new virtual classroom
- <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" name="form">
- <table border="2" class="">
- <tr>
- <td>course name</td>
- <td>course id</td>
- <td>Course timing</td>
- </tr>
- <tr>
- <td><input type="text" name="courseName" /></td>
- <td><input type="text" name="courseId" /> </td>
- <td><input type="text" name="courseTiming" /> </td>
- <td><input type="submit" value="submit"/></td>
- </tr>
- </table>
- </form>
- <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement