Skip to content

Instantly share code, notes, and snippets.

var express = require('express');
var bodyParser = require('body-parser');
var querystring = require('querystring');
var debug = require('debug')('botkit:webserver');
var http = require('http');
var fs = require('fs');
var hbs = require('express-hbs');
module.exports = function(controller) {
<?php
include('restrict-login.php');
$session_unset('id');
header('Location:login.php');
?>
<?php
include('connection.php');
include('restrict-login.php');
if(isset($_POST['body'])) {
$query = $dbh->prepare('INSERT into comments (user, report, body) VALUES (?, ?, ?)');
$query->execute(array($_SESSION['id'], $_POST['report'], $_POST['body']));
header('location : reports.php?id='.$_POST['report']);
Notice: Undefined index: user in G:\Google drive\Medical\reports.php on line 29
Notice: Undefined index: doctor in G:\Google drive\Medical\reports.php on line 29
Notice: Undefined index: timestamp in G:\Google drive\Medical\reports.php on line 29
Notice: Undefined index: speciality in G:\Google drive\Medical\reports.php on line 29
Notice: Undefined index: appointment in G:\Google drive\Medical\reports.php on line 29
<?php
include('connection.php');
include('restrict-login.php');
if(isset($_POST['action'])) {
if($_POST['action'] == 'add') {
$parameters = array($_POST['firstName'], $_POST['lastName'], $_POST['sex'], $_POST['dob'], $_POST['email'], $_POST['password'], $_POST['type'], $_POST['phoneNo']);
if($_POST['what'] == 'admin') {
$query = $dbh->prepare('INSERT INTO users (firstName, lastName, sex, dob, email, type, password, phoneNo) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
} elseif($_POST['what'] == 'patient') {
$query = $dbh->prepare('INSERT INTO users (firstName, lastName, sex, dob, email, type, password, phoneNo, experience) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
<!DOCTYPE html>
<html>
<head>
<title>users</title>
</head>
<body>
<table>
<tr>
<th>Type</th>
<form action="" method="POST">
<label><br>First Name</br><input type = "text" name = "firstName"></label>
<label><br>Last Name</br><input type = "text" name = "lastName"></label>
<label><br>Sex</br><input type = "text" name = "sex"></label>
<label><br>DOB</br><input type = "date" name = "dob"></label>
<label><br>Email</br><input type = "text" name = "email"></label>
<label><br>Type</br><input type = "text" name = "type"></label>
<label><br>Password</br><input type = "text" name = "password"></label>
<?php if($_GET['what'] == 'doctor') { ?>
<form action="" method="POST">
<label><br>First Name</br><input type = "text" name = "firstName"></label>
<label><br>Last Name</br><input type = "text" name = "lastName"></label>
<label><br>Sex</br><input type = "text" name = "sex"></label>
<label><br>DOB</br><input type = "date" name = "dob"></label>
<label><br>Email</br><input type = "text" name = "email"></label>
<label><br>Type</br><input type = "text" name = "type"></label>
<label><br>Password</br><input type = "text" name = "password"></label>
<label><br>Experience</br><input type = "number" name = "experience"></label>
<label><br>History</br><input type = "text" name = "history"></label>
<?php
include('connection.php');
include('restrict-login.php');
if(isset($_POST['action'])) {
if($_POST['action'] == 'add') {
$parameters = array($_POST['firstName'], $_POST['lastName'], $_POST['sex'], $_POST['dob'], $_POST['email'], $_POST['password'], $_POST['type'], $_POST['phoneNo']);
if($_POST['what'] == 'admin') {
$query = $dbh->prepare('INSERT INTO users (firstName, lastName, sex, dob, email, type, password, phoneNo) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
} elseif($_POST['what'] == 'patient') {
$query = $dbh->prepare('INSERT INTO users (firstName, lastName, sex, dob, email, type, password, phoneNo, experience) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');
<?php
include('connection.php');
include('restrict-login.php');
if(isset($_POST['action'])) {
if($_POST['action'] == 'add') {
$parameters = array($_POST['firstName'], $_POST['lastName'], $_POST['sex'], $_POST['dob'], $_POST['email'], $_POST['password'], $_POST['type'], $_POST['phoneNo']);
if($_POST['what'] == 'admin') {
$query = $dbh->prepare('INSERT INTO users (firstName, lastName, sex, dob, email, type, password, phoneNo) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
} elseif($_POST['what'] == 'patient') {
$query = $dbh->prepare('INSERT INTO users (firstName, lastName, sex, dob, email, type, password, phoneNo, experience) VALUES (?, ?, ?, ?, ?, ?, ?, ?)');