Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. <?php
  2. // 1. define relative path to `include` directory:
  3. define('AT_INCLUDE_PATH', '../../include/');
  4.  
  5. // 2. require the `vitals` file before any others:
  6. require (AT_INCLUDE_PATH . 'vitals.inc.php');
  7. authenticate(AT_PRIV_HELLO_WORLD);
  8. require (AT_INCLUDE_PATH.'header.inc.php');
  9.  
  10.  
  11. if(isset($_GET['courseName']))
  12. {
  13. $_courseName=$_GET['courseName'];
  14. $_courseId=$_GET['courseId'];
  15. $_courseTiming=$_GET['courseTiming'];
  16. require(AT_INCLUDE_PATH . 'classes/sqlutility.class.php');
  17. ///$sqlUtility =& new SqlUtility();
  18. //$sqlUtility->queryFromFile(dirname(__FILE__) . '/BBB_create_table.sql', TABLE_PREFIX);
  19. // echo 'table created';
  20. // global $db, $progress, $errors;
  21. $sql = "INSERT INTO ".TABLE_PREFIX."bbb VALUES ('$_courseName','$_courseId','$_courseTiming')";
  22.  
  23. $result = mysql_query($sql, $db);
  24.  
  25.  
  26. }
  27. ?>
  28.  
  29. Hello Instructor!! :)
  30. <?php
  31. if($_REQUEST['id'])
  32. echo "1" ;
  33. else echo "2";
  34. echo $_SESSION['id'];
  35. ////get_login(intval($_GET['id']));?>
  36. <table border="2">
  37. <tr>
  38. <td>Course name</td>
  39. <td>course id</td>
  40. <td>Course timing</td>
  41. <?php
  42. //write php code to fetch data from database
  43. ?>
  44. </tr>
  45. </table>
  46. Create new virtual classroom
  47. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get" name="form">
  48.  
  49. <table border="2" class="">
  50. <tr>
  51. <td>course name</td>
  52. <td>course id</td>
  53. <td>Course timing</td>
  54. </tr>
  55. <tr>
  56. <td><input type="text" name="courseName" /></td>
  57. <td><input type="text" name="courseId" /> </td>
  58. <td><input type="text" name="courseTiming" /> </td>
  59. <td><input type="submit" value="submit"/></td>
  60. </tr>
  61. </table>
  62. </form>
  63.  
  64. <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement