Esempio n. 1
0
        ?>
>
    <?php 
        echo $result[0];
        ?>
  </option>
  <?php 
    }
    mysql_close();
}
if (isset($_POST['edit'])) {
    $idTrain = getIdTrainByNameClass($_POST['train'], $_POST['class']);
    $show = checkShow($_POST['from_venue'], $_POST['to_venue'], $_POST['departure'], $idTrain, $_POST['seat']);
    $_SESSION['edit-show'] = 'success';
    if ($show == 0) {
        editShow($_POST['from_venue'], $_POST['to_venue'], $_POST['departure'], $idTrain, $_POST['seat'], $_POST['showid']);
        $_SESSION['edit-show'] = 'success';
        header("location:show-page.php?page=" . $_GET['page']);
    } else {
        $_SESSION['edit-show'] = 'failed';
        header("location:show-page.php?page=" . $_GET['page']);
    }
}
if (isset($_POST['delete'])) {
    removeShow($_POST['showid']);
    $_SESSION['delete-show'] = 'success';
    header("location:show-page.php?page=" . $_GET['page']);
}
if (isset($_POST['add'])) {
    $idTrain = getIdTrainByNameClass($_POST['train'], $_POST['class']);
    $show = checkShow($_POST['from_venue'], $_POST['to_venue'], $_POST['departure'], $idTrain, $_POST['seat']);
Esempio n. 2
0
<?php

//require_once ('Edit.php');
//if (isset($_POST['submit'])) {
// php();
//header("Refresh:0");
//}
//
require_once 'EditShowExe.php';
if (isset($_POST['submit'])) {
    editShow();
    header("Location:index.php");
}
?>
<html lang="en"><head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Edit</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/landing-page.css" rel="stylesheet">

    <!-- Custom Fonts -->