ajax and a form with post method - php

I have a problem with a form that is used to insert data into a table, I need it to show a message if the data is inserted correctly or not. by the way, the actual code is not inserting anything to the table, but if I use directly the php file used to insert it, it works.
this is the file with the form and the script:
registrarrack.php
<?php
include('conexion.php');
session_start();
?>
<html>
<head>
<title>Inicio</title>
<link rel="stylesheet" type="text/css" href="style/stylef.css">
<link rel="stylesheet" type="text/css" href="style/style.css">
<script src="js/jquery-1.12.4.js"></script>
<script> function myFunction() {
document.getElementsByClassName("topnav")[0].classList.toggle("responsive");
}
function justNumbers(e)
{
var keynum = window.event ? window.event.keyCode : e.which;
if ((keynum == 8))
return true;
return /\d/.test(String.fromCharCode(keynum));
}
function showContent() {
element = document.getElementById("content");
check = document.getElementById("check");
if (check.checked) {
element.style.display='block';
}
else {
element.style.display='none';
}
}
</script>
</head>
<!-- _________________________________________________________________AJAX Script___________________________________________________________________________-->
<script>
function Validar(Noserie, WO, Locacion, Modelo)
{
$.ajax({
url: "registrarrackbackend.php",
type: "POST",
data: "Noserie="+Noserie+"&WO="+WO+"&Locacion="+Locacion+"&Modelo="+Modelo,
success: function(resp){
$('#resultado').html(resp)
}
});
}</script>
<!-- _________________________________________________________________End of AJAX Script___________________________________________________________________________-->
<body class="desarroll">
<header>
<div class="grupo">
<div class="caja">
<center><nav>
<ul class="topnav">
<li>| Inicio |</li>
<li>| Estatus |</li>
<li>| Buscar nodo |</li>
<li>| Buscar rack |</li>
<li>| Estadisticas |</li>
<?php if(isset($_SESSION['Nombrers'])){ echo '<li>| Cerrar Sesion |</li>';}else{echo '<li>| Iniciar Sesion |</li>';}?>
<li class="icon">
☰</li>
</ul>
</nav></center>
</div>
</div>
<?php if(isset($_SESSION['Nombrers'])){
echo '<center><div class="nombre" align="center">| '.$_SESSION['Nombrers'].' | '.$_SESSION['Mesamensrs'].' </div></center>';
}?>
</header>
<section>
<!-- ********************LOGIN***********************************-->
<?php
$query = mysqli_query($enlace, "SELECT Numero FROM mesas WHERE EnUso = '0'");
if(!isset($_SESSION['Nombrers'])){
echo '<center> <div id="modal">
<div class="modal-content ">
<div class="header">
<h2>Iniciar sesión</h2>
<center><hr width="150" align="center"/></center>
</div>
<div class="copy">
<div class="grupo">
<div class="caja">
<form method="post" action="login.php" class="login">
<label style="color:#1BBC9B; font-weight:bold;">
<input type="checkbox" style="width:0px; display:relative;" name="check" id="check" value="1" onchange="javascript:showContent()" >¿Técnico de reparación?</label><br>
<div id="content" style="display: none;">
<b>Mesas disponibles :
<input type="radio" name="mesa" style="width:0px; " value="0" checked="checked"> ';
while ($datos=mysqli_fetch_row($query) ) {
echo '<label><input type="radio" name="mesa" value="'.$datos[0].'" style="color:black; width:30px;">'.$datos[0].'</label> ';
}
echo '</b>
</div>
<input type="text" name="NoReloj" placeholder="Número de reloj" required maxlength="5" onkeypress="return justNumbers(event);">
<input type="password" name="Pass" placeholder="Contraseña" required>
<input type="hidden" name="Url" value="index.php#">
</script>
<button class="btn1">Aceptar</button>
<input class="btn2" type="button" value="Cerrar" onClick="window.location.href=\'#\'">
</form>
</div>
</div>
</div>
</div>
<div class="overlay"></div>
</div></center>'
;
}
echo '<center> <div id="modalmesa">
<div class="modal-content ">
<div class="header">
<h2>Elegir mesa</h2>
<center><hr width="150" align="center"/></center>
</div>
<div class="copy">
<div class="grupo">
<div class="caja">
<form method="post" action="elegirmesa.php" class="login">
<div id="resultado"></div>
<input type="hidden" name="Url" value="index.php#">
</script>
<button class="btn1">Aceptar</button>
</form>
</div>
</div>
</div>
</div>
<div class="overlay"></div>
</div></center>'
;
?>
<!-- _________________________________________________________________Form___________________________________________________________________________-->
</section>
<center>
<?php $query = mysqli_query($enlace, "SELECT Nombre FROM familia"); ?>
<div class="grupo-centar">
<div class="caja">
<br><br>
<h2>Registrar rack</h2><br>
<div id="resultado"></div>
<table class="tablaregistro">
<tr>
<form class="RegistroR" method="POST" action="return false" onsubmit="return false" id="formregistro">
<td><input type="text" name="Noserie" id="Noserie" placeholder="Número de serie" required form="formregistro" maxlength="10" pattern=".{10,}" ></td>
</tr>
<tr>
<td><input type="text" name="WO" id="WO" placeholder="WO" required form="formregistro" maxlength="9" pattern=".{9,}"></td>
</tr>
<tr>
<td><input type="text" name="Locacion" id="Locacion" placeholder="Locación: TRXX-XX" required form="formregistro" maxlength="8" pattern=".{7,}"></td>
</tr>
<tr>
<td><Select name="Modelo" id="Modelo" required form="formregistro" placeholder="Modelo">
<option value="" disabled selected>Modelo</option>
<?php
while ($datos=mysqli_fetch_row($query) ) {
echo '<option value="'.$datos[0].'">'.$datos[0].'</option>';
}
?>
</Select></td>
</tr>
<tr>
<td><Button class="btnregistrar" form="formregistro" onclick="Validar(document.getElementById('Noserie').value, document.getElementById('WO').value, document.getElementById('Locacion').value, document.getElementById('Modelo').value);"><h1>Registrar</h1></Button></td>
</tr>
</table>
</form>
</center>
</div>
</div>
<section>
<!-- _________________________________________________________________AJAX Script___________________________________________________________________________-->
</body>
</html>
and heres the other php file:
registrarrackbackend.php
<?php
error_reporting(0);
include('conexion.php');
session_start();
$NoSerie = $_POST['Noserie'];
$Locacion = $_POST['Locacion'];
$WO = $_POST['WO'];
$Familia = $_POST['Modelo'];
$Tecnico = $_SESSION['No_Relojrs'];
$consulta=mysqli_query($enlace, "SELECT * FROM rack WHERE NoSerie= '$NoSerie'");
if($cons=mysqli_fetch_array($consulta)){
echo '<span>Error: rack is already registered</span>';
}else{
$sql2="INSERT INTO rack (NoSerie, WO, Familia, Locacion, Tecnico) VALUES ('$NoSerie','$WO' ,'$Familia','$Locacion','$Tecnico')";
if(mysqli_query($enlace, $sql2)){
//echo "<script>location.href = 'index.php'</script>";
echo '<span>rack was successfully registered</span>';
}else{echo "<span>Error updating record: " . mysqli_error($conn).'</span>';}
}
?>
I don't know what is wrong with the code, I hope you can help me please. and sorry for my bad english

Related

Adding Multiple Products to Basket using PHP Sessions

Ive built a basket/checkout system for an e-commerce site, and have used session variables to store product name, price and quantity and can have them be displayed on my checkout page.
I'm struggling to be able to add different products to the basket, when the user goes to another product and clicks the add to basket button it removes the first product from the basket. does anyone know how I could change my code so that different products can be added to the basket without removing any products that are currently in the variable. and also how could I add the Quantity to the URL so that I can add it to the basket. the quantity is an input box on the products page that the user can tryp the number of products into.
this is my products page -
<?php
require('includes/application_top.php');
$page_title='Details';
require('includes/site_header.php');
$_GET['prod_ID'];
$product_id = isset($_REQUEST['prod_ID']) ? (int) $_REQUEST['prod_ID'] : 0;
$pound ="£";
?>
<style>
<?php
require('css/prod_details.css');
?>
</style>
<br>
<br>
<br>
<br>
<br>
<?php $product = get_product_details1($freshKickz_conn); ?>
<?php foreach($product as $productdetails) {
?>
<main class="container">
<!-- Left Column / Headphones Image -->
<div class="left-column">
<img data-image="red" class="active" src="<?= htmlspecialchars($productdetails['images']) ?>" style="height: 400px; width: 400px;" alt="">
</div>
<!-- Right Column -->
<div class="right-column">
<!-- Product Description -->
<div class="product-description">
<h1><?= htmlspecialchars($productdetails['prod_Name']) ?></h1>
<p><?= htmlspecialchars($productdetails['prod_Details']) ?></p>
</div>
<!-- Product Pricing -->
<div class="product-price">
<span><?=$pound?><?= htmlspecialchars($productdetails['prod_Price'])?></span>
Add to Basket
</div>
<br>
<div class="quantity">
<span>Quantity</span>
<br>
<input type="number" min="1" max="9" step="1" value="1">
</div>
</div>
</main>
<?php
} ?>
<script src="js/prodJS.js"></script>
<script>
$(document).ready(function () {
$('.color-choose input').on('click', function () {
var headphonesColor = $(this).attr('data-image');
$('.active').removeClass('active');
$('.left-column img[data-image = ' + headphonesColor + ']').addClass('active');
$(this).addClass('active');
});
});
</script>
<?php
require('includes/application_bottom.php');
require('includes/site_footer.php');
?>
and this is my basket/checkout page -
<?php
require('includes/application_top.php');
$page_title='Your Basket';
require('includes/site_header.php');
if ( ! isset($_SESSION['basket'])) {
$_SESSION['basket'] = array();
}
$pound ="£";
$action = $_REQUEST['action'] ?? '';
$err = '';
if($_REQUEST['action']=='add_product'){
$_SESSION['basket'][$_REQUEST['name']]=$_REQUEST['quantity']=$_REQUEST['quantity'];
}
?>
<style>
<?php
require('css/basket.css');
?>
</style>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="row">
<div class="col-75">
<div class="container">
<form action="successful_order.php">
<div class="row">
<div class="col-50">
<h3>Billing Address</h3>
<label for="fname"><i class="fa fa-user"></i> Full Name</label>
<input type="text" id="fname" name="firstname" placeholder="John M. Doe">
<label for="email"><i class="fa fa-envelope"></i> Email</label>
<input type="text" id="email" name="email" placeholder="john#example.com">
<label for="adr"><i class="fa fa-address-card-o"></i> Address</label>
<input type="text" id="adr" name="address" placeholder="542 W. 15th Street">
<label for="city"><i class="fa fa-institution"></i> City</label>
<input type="text" id="city" name="city" placeholder="New York">
<div class="row">
<div class="col-50">
<label for="state">County</label>
<input type="text" id="county" name="county" placeholder="Cheshire">
</div>
<div class="col-50">
<label for="zip">PostCode</label>
<input type="text" id="postcode" name="postcode" placeholder="SK11 6TF">
</div>
</div>
</div>
<div class="col-50">
<h3>Payment</h3>
<label for="fname">Accepted Cards</label>
<div class="icon-container">
<i class="fa fa-cc-visa" style="color:navy;"></i>
<i class="fa fa-cc-amex" style="color:blue;"></i>
<i class="fa fa-cc-mastercard" style="color:red;"></i>
<i class="fa fa-cc-discover" style="color:orange;"></i>
</div>
<label for="cname">Name on Card</label>
<input type="text" id="cname" name="cardname" placeholder="John More Doe">
<label for="ccnum">Credit card number</label>
<input type="text" id="ccnum" name="cardnumber" placeholder="1111-2222-3333-4444">
<label for="expmonth">Exp Month</label>
<input type="text" id="expmonth" name="expmonth" placeholder="September">
<div class="row">
<div class="col-50">
<label for="expyear">Exp Year</label>
<input type="text" id="expyear" name="expyear" placeholder="2018">
</div>
<div class="col-50">
<label for="cvv">CVV</label>
<input type="text" id="cvv" name="cvv" placeholder="352">
</div>
</div>
</div>
</div>
<label>
<input type="checkbox" checked="checked" name="sameadr"> Shipping address same as billing
</label>
<input type="submit" value="Checkout" class="btn">
</form>
</div>
</div>
<div class="col-25">
<div class="container">
<h4>Cart
<span class="price" style="color:black">
<i class="fa fa-shopping-cart"></i>
</span>
</h4>
<br>
<br>
<p><span class="name"><?= $_REQUEST['name'] ?></span> <span class="price"><span class="name"><?= $_REQUEST['quantity'] ?><br></span><?= $pound ?><?= $_REQUEST['price'] ?></span></p>
<hr>
<p>Total <span class="price" style="color:black"><b>$30</b></span></p>
</div>
</div>
</div>
<?php
require('includes/application_bottom.php');
require('includes/site_footer.php');
?>
First of all you should avoid using GET request to perform an action.
Next try to use product id because name can be same for different products.
So my offer for product page:
<?php
require('includes/application_top.php');
$page_title='Details';
require('includes/site_header.php');
$product_id = isset($_REQUEST['prod_ID']) ? (int) $_REQUEST['prod_ID'] : 0;
$pound ="£";
?>
<style>
<?php
require('css/prod_details.css');
?>
</style>
<br>
<br>
<br>
<br>
<br>
<?php $product = get_product_details1($freshKickz_conn); ?>
<?php foreach($product as $productdetails): ?>
<main class="container">
<!-- Left Column / Headphones Image -->
<div class="left-column">
<img data-image="red" class="active" src="<?= htmlspecialchars($productdetails['images']) ?>" style="height: 400px; width: 400px;" alt="">
</div>
<!-- Right Column -->
<div class="right-column">
<!-- Product Description -->
<div class="product-description">
<h1><?= htmlspecialchars($productdetails['prod_Name']) ?></h1>
<p><?= htmlspecialchars($productdetails['prod_Details']) ?></p>
</div>
<!-- Product Pricing -->
<form action="basket_page.php" method="POST">
<div class="product-price">
<span><?=$pound?><?= htmlspecialchars($productdetails['prod_Price'])?></span>
<input type="hidden" name="action" value="add_product" />
<!-- i'm not sure what index did you use for id so -->
<input type="hidden" name="id" value="<?php echo htmlspecialchars($productdetails['prod_Name']); ?>" />
<input type="hidden" name="price" value="<?php echo htmlspecialchars($productdetails['prod_Price']); ?>" />
<input type="hidden" name="name" value="<?php echo htmlspecialchars($productdetails['prod_Name']); ?>" />
<button type="submit" class="cart-btn">Add to Basket</button>
</div>
<br>
<div class="quantity">
<span>Quantity</span>
<br>
<input type="number" min="1" max="9" step="1" value="1">
</div>
</form>
</div>
</main>
<?php endforeach; ?>
<script src="js/prodJS.js"></script>
<script>
$(document).ready(function () {
$('.color-choose input').on('click', function () {
var headphonesColor = $(this).attr('data-image');
$('.active').removeClass('active');
$('.left-column img[data-image = ' + headphonesColor + ']').addClass('active');
$(this).addClass('active');
});
});
</script>
<?php
require('includes/application_bottom.php');
require('includes/site_footer.php');
?>
Next you can use associative array for your session. Don't forget to check all user input. It is important.
<?php
require('includes/application_top.php');
$page_title = 'Your Basket';
require('includes/site_header.php');
if (!isset($_SESSION['basket'])) {
$_SESSION['basket'] = [];
}
$pound = "£";
$action = $_REQUEST['action'] ?? '';
$err = '';
if ($action === 'add_product') {
$id = isset($_POST['id']) ? (int) $_POST['id'] : null;
$price = isset($_POST['price']) ? (float) $_POST['price'] : null;
$number = isset($_POST['number']) ? (int) $_POST['number'] : null;
$name = isset($_POST['name']) ? trim($_POST['name']) : null;
if ($id && $price && $number) {
$_SESSION['basket'][$id] = [
'id' => $id,
'price' => $price,
'number' => $number,
'name' => $name,
];
}
}
?>
Next you have an error in rendering. You should use your session array. Not a raw input.
<div class="col-25">
<div class="container">
<h4>
Cart
<span class="price" style="color:black">
<i class="fa fa-shopping-cart"></i>
</span>
</h4>
<br>
<br>
<?php
$total = 0;
foreach ($_SESSION['basket'] as $item):
$total += $item['price'] * $item['number'];
?>
<p>
<span class="name"><?php echo htmlspecialchars($item['name']) ?></span>
<span class="price">
<span class="name"><?= $item['number'] ?><br></span>
<?= $pound ?><?= $item['price'] ?>
</span>
</p>
<hr>
<?php endforeach; ?>
<p>
Total <span class="price" style="color:black"><b>$<?= total ?></b></span>
</p>
</div>
</div>
And finally please take a look at specialized php scripts for ecommerce like WooCommerce or Magento.

Dynamic dropdown list with ajax,sql and php

I get a dynamic dropdown by combining config.php, index.php and ajax.php but when i modify the code and use it in another file which include the files config.php, sales.php and ajax.php i don't get the dropdown.
i have 2 folders folder_1 contains config.php, index.php and ajax.php this gives the desired dropdown list i wanted.
but in folder_2 i have config.php,sales.php and ajax.php but i did't get the dropdown.
I copy paste the exact code from folder_1 to folder_2 but the code is not working.
config.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
$con=mysqli_connect("localhost","root","","db_cafeteria");
?>
</body>
</html>
index.php
<html>
<head>
<?php include "config.php"; ?>
<script type="text/javascript" src='js/jquery.min.js'></script>
<script>
$(document).ready(function(){
$('#category').change(function(){
var categoryid = $(this).val();
$('#food').find('option').not(':first').remove();
// AJAX request
$.ajax({
url: 'ajax.php',
type: 'post',
data: { categoryid: categoryid},
dataType: 'json',
success: function(response){
var len = response.length;
for( var i = 0; i<len; i++){
var id = response[i]['id'];
var name = response[i]['name'];
$("#food").append("<option value='"+id+"'>"+name+"</option>");
}
}
});
});
});
</script>
</head>
<body>
<table>
<tr>
<td>category</td>
<td>
<!-- Country dropdown -->
<select id='category' >
<option value="" >---Select---</option>
<?php
## Fetch countries
$sql=mysqli_query($con,"SELECT * FROM tbl_category ORDER BY categoryname");
while($row=mysqli_fetch_assoc($sql))
{
echo "<option value='".$row['category_id']."'>".$row['categoryname']."</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td>food</td>
<td>
<select id='food' >
<option value="" >---Select---</option>
</select>
</td>
</tr>
</table>
</body>
</html>
sales.php
<?php
include("header.php");
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script type="text/javascript" src='js/jquery.min.js'></script>
<script>
$(document).ready(function(){
$('#category').change(function(){
var categoryid = $(this).val();
$('#food').find('option').not(':first').remove();
// AJAX request
$.ajax({
url: 'ajax.php',
type: 'post',
data: {categoryid: categoryid},
dataType: 'json',
success: function(response){
var len = response.length;
if( len >0 ){
$("#food").empty();
$("#food").html('<option value="">---select---</option>');
for( var i = 0; i<len; i++){
var id = response[i]['id'];
var name = response[i]['name'];
$("#food").append("<option value='"+id+"'>"+name+"</option>");
}
}
else
{
$('#food').html('<option value="">No food available</option>');
}
}
});
});
});
</script>
</head>
<body>
<?php
include("config.php");
?>
<form action="stock_reg_action.php" method="post" enctype="multipart/form-data">
<div class="container" style="margin-left:106px; margin-bottom:10%;padding-left:130px; box-shadow: 2px 2px 10px #1b93e1; border-radius: 4px; top: 14px; padding-top: 5%;">
<h2 style="text-align: center;margin-top: 6%;font-family: fantasy; padding-right:13%"> ADD PRODUCT STOCK</h2>
<br>
<div class="row">
<div class="col-md-3" style="text-align:right; padding-top:8px;">
<label>Date</label>
</div>
<div class="col-md-6">
<input type="date" class="form-control" name="stock_date" style="width:500px;" required autofocus>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3" style="text-align:right; padding-top:8px;">
<label>Category</label>
</div>
<div class="col-md-6">
<select required name="category_id" id="category" class="form-control" style="width:500px;" required autofocus>
</div>
</div>
<br>
<div class="row">
<div class="col-md-6">
<option selected disabled value="">---select---</option>
<?php
$sql=mysqli_query($con,"SELECT * FROM tbl_category ORDER BY categoryname");
while($row=mysqli_fetch_assoc($sql))
{
echo "<option value='".$row['category_id']."'>".$row['categoryname']."</option>";
}
?>
</select>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3" style="text-align:right; padding-top:8px;">
<label>Food</label>
</div>
<div class="col-md-6">
<select name="food_id" id="food" class="form-control" style="width:500px;" required autofocus>
<option selected disabled value="">---select---</option>
</select>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3" style="text-align:right">
<label>Stock Status</label>
</div>
<label style="margin-left:15px">
<input type="radio" name="radio" value="1" />
<span>ADD</span>
</label>
<label style="margin-left:30px">
<input type="radio" name="radio" value="0" />
<span>REMOVE</span>
</label>
</div>
<br>
<div class="row">
<div class="col-md-3" style="text-align:right; padding-top:8px;">
<label>Quantity</label>
</div>
<div class="col-md-6">
<input type="text" class="form-control" name="quantity" style="width:500px;" placeholder="Enter Quantity" required autofocus>
</div>
</div>
<br>
<div class="row">
<div class="col-md-3" style="text-align:right; padding-top:8px;">
<label>Description</label>
</div>
<div class="col-md-6">
<input type="textarea" class="form-control" name="stock_description" style="width:500px;" placeholder="Enter Description" required autofocus>
</div>
</div>
<br>
<div class="row">
<input type="submit" name="submit" value="SAVE" class="btn btn-primary" style="margin-left:38%">
</div>
<br>
</div>
</form>
</body>
</html>
<?php
include("footer.php");
?>
ajax.php
<?php
include "config.php";
// Fetch food list by categoryid
$categoryid = $_POST['categoryid'];
$response = array();
$sql=mysqli_query($con,"SELECT * FROM tbl_food WHERE category_id='".$_POST["categoryid"]."' ORDER BY food_name");
while($row=mysqli_fetch_array($sql))
{
$id=$row["food_id"];
$name=$row["food_name"];
$response[] = array("id" => $id, "name" => $name);
}
echo json_encode($response);
exit;
?>

login page php code not working on cpanel blank page comes after succefull login

The code is working perfectly on localhost xampp server but not working on Cpanel I think sesion_start command not working. If i login using wrong password then it shows an error its mean php code in LoinPage.php
wroks but when i enter correct username and password it will show blank page instead of taking me to AdminDashboard.php
LoginPage.php
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Seza Admin Login</title>
<link rel="stylesheet" href="css/loginStyle.css">
</head>
<body>
<?php include("connection.php");
error_reporting(E_ALL);
$msg=null;
if(isset($_POST['login']) && $_POST['login']=='ok')
{
$username =$_POST['username'];
$password = $_POST['password'];
$selectuser = mysqli_query($conn,"select * from admins where USERNAME='".$username."' and PASSWORD ='".$password."'") or die(mysqli_error($conn));
$no_users = mysqli_num_rows($selectuser);
if($no_users>0)
{
$fetch_user = mysqli_fetch_array($selectuser);
$_SESSION['adminid']= $fetch_user['AID'];
alert("success");
header("location:AdminDashboard.php");
}
else{
$msg = "The username or password is invalid";
}
}
else{
if(isset($_POST['login']) && $_POST['login']=='ok')
{
echo"invalid";
}
}
?>
<div class="site_wrapper">
<form method="post" id="additem-form" >
<input type="hidden" id="login" name="login" value="ok" />
<div class="login">
<div class="login-screen">
<div class="app-title">
<h1>SezaPharma</h1>
<h3>ADMIN LOGIN</h3>
</div>
<div class="login-form">
<div class="control-group">
<input type="text" class="login-field" value="" placeholder="username" id="username" name="username">
<label class="login-field-icon fui-user" for="login-name"></label>
</div>
<div class="control-group">
<input type="password" class="login-field" value="" placeholder="password" id="password" name="password">
<label class="login-field-icon fui-lock" for="login-pass"></label>
</div>
<button class="btn btn-primary btn-large btn-block" type="submit" value="login" >login</button>
<a class="login-link" onClick="alertRset()" href="">Lost ? Reset your password?</a>
<div style="color:#FF0004">
<?php
if(isset($msg) && $msg!="")
{ ?>
<div class="alert-danger"><?php echo $msg; ?></div>
<?php }
?></div>
</div>
</div>
</div>
</form>
<script>
function alertRset() {
var txt;
if (confirm("It will Reset username and password to default.") == true) {
window.close();
window.open("resetadmin.php");
} else {
txt = "You pressed Cancel!";
}
document.getElementById("demo").innerHTML = txt;
}
</script>`enter code here`
</body>
</html>
AdminDashboard.php
<!DOCTYPE html>
<html>
<head>
</style>
</head>
<body>
<?php include("connection.php");
error_reporting(E_ALL);
if (isset($_SESSION['adminid'])) {
?>
<div class="dashboard">
<div class="tab">
<button class="tablinks" onclick="openCity(event, 'London')" id="defaultOpen">All Products</button>
<button class="tablinks" onclick="openCity(event, 'Paris')">Add New Product</button>
<button class="tablinks" onclick="openCity(event, 'Tokyo')">Setting</button>
<a href="logout.php" ><button class="tablinks" onclick="openCity(event, 'Tokyo')" >Loggout</button></a>
</div>
<div id="London" class="tabcontent" style="overflow:auto">
<div class="site_wrapper" >
<div class="clearfix margin_top10"></div>
<div class="works01" >
<div class="container" >
<div id="grid-container" class="cbp-l-grid-fullWidth" style="overflow:visible;">
<?php
$select_post=mysqli_query($conn,"select * from products ORDER BY PID desc") or die(mysqli_error());
while($post=mysqli_fetch_array($select_post))
{
?>
<div class="cbp-item <?php echo $post['PTYPE'];?>">
<div class="cbp-caption">
<div class="cbp-caption-defaultWrap">
<img style="width:100%; height:200px;" src="UploadedImage/<?php echo $post['PIMAGELOC'];?>" alt="">
</div>
<div class="cbp-caption-activeWrap">
<div class="cbp-l-caption-alignCenter">
<div class="cbp-l-caption-body">
<h3><?php echo $post['PNAME'];?></h3>
<br />
Edit
Delete
</div>
</div>
</div>
</div>
</div><!-- end item -->
<?php
}
?>
</div>
</div>
</div><!-- end works section -->
Scroll<!-- end scroll to top of the page-->
</div>
</div>
<div id="Paris" class="tabcontent">
<form action="add_item.php" method="post" enctype="multipart/form-data" onsubmit="return validateForm()" id="additem-form" name="additem-form">
<div class="contactcontainer">
<header>
<h1>Add new Product</h1>
</header>
<table width="100%" align="center">
<tr>
<td colspan="2">
<input style="width:74%" placeholder="Product Name" type="text" id="pname" name="pname">
</td>
</tr>
<tr>
<td colspan="2">
<select class="select" style=" width:74%;" name="cat" id="cat">
<option value="Category" selected="selected">Product Category</option>
<option value="livestock" > livestock Products</option>
<option value="Poultry">Poultry Products</option>
</select>
</td>
</tr>
<tr>
<td colspan="2" >
<div style="border:dashed; width:75%;" align="center">
<h4>Choose Product Picture</h4>
<input type="file" id="pimage" name="pimage" class="input-file" title="upload Photo / video" />
</div>
</td>
</tr>
<tr>
<td>
<select class="select" style=" width:55%;" id="ptype" name="ptype">
<option value="Type">Product Type</option>
<option value="Injections">Injections</option>
<option value="Anthilmentics">Anthilmentics</option>
<option value="Natural">Natural Products</option>
</select>
</td>
<td>
<select class="select" id="availability" style=" width:55%;" name="availability">
<option value="Availability">Availability</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</td>
</tr>
<tr>
<td colspan="2">
<input style="width:74%" class="email" placeholder="Full Farmula with quantity" type="text" id="pfarmula" name="pfarmula">
</td>
</tr>
<tr>
<td colspan="2">
<textarea style="width:74%" placeholder="Product Description" id="pdesc" name="pdesc"></textarea>
</td>
</tr>
<tr>
<td colspan="2" >
<div style="width:74%" align="center">
<footer>
<button style="width:20%" id="addbtn" name="addbtn" >Add</button>
</footer>
</div>
</td>
</tr>
</table>
</div>
</form>
</div>
<div id="Tokyo" class="tabcontent">
<h3>Tokyo</h3>
<p>Tokyo is the capital of Japan.</p>
</div>
</div> <!--end of tabs-->
<script>
function validateForm()
{
var a=document.forms["additem-form"]["availability"].value;
var b=document.forms["additem-form"]["pname"].value;
var c=document.forms["additem-form"]["cat"].value;
var d=document.forms["additem-form"]["ptype"].value;
if (a=="Availability" || b=="" || c=="Category" || d=="Type")
{
alert("Please Fill All Required Field");
return false;
}
}
function openCity(evt, cityName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " active";
}
// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();
</script>
<!-- ######### JS FILES ######### -->
<!-- get jQuery used for the theme -->
<script type="text/javascript" src="js/universal/jquery.js"></script>
<script src="js/style-switcher/styleselector.js"></script>
<script src="js/animations/js/animations.min.js" type="text/javascript"></script>
<script src="js/mainmenu/bootstrap.min.js"></script>
<script src="js/mainmenu/customeUI.js"></script>
<script src="js/scrolltotop/totop.js" type="text/javascript"></script>
<script type="text/javascript" src="js/mainmenu/sticky.js"></script>
<script type="text/javascript" src="js/mainmenu/modernizr.custom.75180.js"></script>
<script type="text/javascript" src="js/cubeportfolio/jquery.cubeportfolio.min.js"></script>
<script type="text/javascript" src="js/cubeportfolio/main31.js"></script>
<?php } else{ echo " You mus Loggedin to acces this page"; } ?>
</body>
</html>
connection.php
<?php
session_start();
// Create connection
$conn = mysqli_connect("localhost", "username","password", "sezaphar_sezapharmadb") or die($conn->connect_error);
?>
You have a bug in the code.
You need to echo the alert("success") before header("location:AdminDashboard.php"); in LoginPage.php
Here's the code:
echo "<script>alert('success');</script>";

MySQL insert multiple records from select please view code

Hi I want to bring this information to insert multiple records from select
This all FORM
<?php
session_start();
//PUT THIS HEADER ON TOP OF EACH UNIQUE PAGE
if(!isset($_SESSION['id_user'])){
header("location:../index.php");
header("Content-type: text/html; charset=utf-8");
}
include "config.php";
$strSQL = "SELECT * FROM vn_order order by id_vn_order desc ";
$objQuery = mysqli_query($mysqli,$strSQL);
$sqlus = "SELECT * FROM vn_user WHERE id_user = '".$_SESSION['id_user']."' ";
$objQu = mysqli_query($mysqli,$sqlus);
$objResult = mysqli_fetch_array($objQu);
?>
<!DOCTYPE html>
<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">
<title>Limitless - Responsive Web Application Kit by Eugene Kopyov</title>
<!-- Global stylesheets -->
<link href='https://fonts.googleapis.com/css?family=Kanit&subset=thai,latin' rel='stylesheet' type='text/css'>
<link href="assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
<link href="assets/css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="assets/css/core.css" rel="stylesheet" type="text/css">
<link href="assets/css/components.css" rel="stylesheet" type="text/css">
<link href="assets/css/colors.css" rel="stylesheet" type="text/css">
<link href="assets/css/sweet-alert.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="assets/js/alert/sweet-alert.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="respond.js"></script>
<style type="text/css">
body {
font-family: 'Kanit', sans-serif;
}
</style>
</head>
<body onLoad="setPostBack();">
<?php require_once("inc/header_menu.php") ?>
<!-- /user menu -->
<?php require_once("inc/menu.php") ?>
<!-- Main content -->
<div class="content-wrapper">
<!-- Content area -->
<div class="content">
<!-- Basic datatable -->
<div class="panel panel-flat">
<div class="panel-heading">
<h5 class="panel-title">จองรถตู้</h5>
<div class="heading-elements">
<ul class="icons-list">
<li><a data-action="collapse"></a></li>
<li><a data-action="reload"></a></li>
<li><a data-action="close"></a></li>
</ul>
</div>
</div>
<div class="panel-body">
</div>
<form role="form" action="dorent.php" method="post" onSubmit="return doSubmit();">
<input type="hidden" value="1" name="id_user"/>
<input type="hidden" value="1" name="id_invoice"/>
<input type="hidden" value="1" name="travellist_id"/>
<input type="hidden" value="Approve" name="Status"/>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<fieldset>
<legend class="text-semibold"><i class="icon-reading position-left"></i> Personal details</legend>
<div class="form-group">
<label>ชื่อ</label>
<input type="text" class="form-control" placeholder="ชื่อ" name="rn_first_name" id="rn_first_name" value="<?php echo $objResult["firstname"];?>" readonly>
</div>
<div class="form-group">
<label>นามสกุล:</label>
<input type="text" class="form-control" placeholder="นามสกุล" name="rn_last_name" id="rn_last_name" value="<?php echo $objResult["lastname"];?>"readonly>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>E-mail</label>
<input type="text" class="form-control" placeholder="Email" name="" id="" value="<?php echo $objResult["email"];?>"readonly>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>เบอร์โทรศัพท์</label>
<input type="text" class="form-control format-phone-number" name="rn_tel" id="rn_tel" placeholder="เบอร์ติดต่อ" value="<?php echo $objResult["Tel"];?>"maxlength="10" readonly>
</div>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
var obj_a = $("#rn_amount");
var obj_b = $("#data_b");
// a เปลี่ยนเมื่อ keyup แล้ว b เปลี่ยน ตามเงื่อนไขค่า a
obj_a.on("keyup",function(){
var value_obj_a = parseInt($(this).val()); // เก็บค่า a ไว้ในตัวแปร (parseInt คือเปลงเป็นเลข)
if(value_obj_a>9){ // กำหนดเงื่อนไขให้กับค่า a
obj_b.val(2); // เปลี่ยนค่า b เป้น 3
}else{
obj_b.val(1); // เปลี่ยนค่า b เป็น 1
}
});
});
</script>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>จำนวนวนคนที่ไป</label>
<input type="text" name="rn_amount" id="rn_amount" value="" class="form-control"><br>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="display-block text-semibold">ประเภทรถตู้</label>
<select name="data_b" id="data_b" class="form-control">
<option value=""> Select </option>
<option value="1">9</option>
<option value="2">13</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<legend class="text-semibold"><i class="icon-truck position-left"></i> Shipping details</legend>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>วันที่จอง : (วันที่ไป)</label>
<input class="form-control" type="date" name="rn_gostart" id="rn_gostart">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>วันที่กลับ : (วันกลับ)</label>
<input class="form-control" type="date" name="rn_endstart" id="rn_endstart">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>เวลาเดินทางไป</label>
<input class="form-control" type="time" name="time_gostart" id="time_gostart">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>เวลาเดินทางกลับ</label>
<input class="form-control" type="time" name="time_endstart" id="time_endstart">
</div>
</div>
</div>
<!-- เลือกสถานที่ท่องเที่ยว -->
<input type="hidden" id="txtNum" value="1" size="2" />
<table border="0" width="100%">
<thead>
<tr>
<th>
<div class="row">
<div class="col-md-10">
<div class="form-group">
<label class="display-block text-semibold"> จังหวัดที่ท่องเที่ยว</label>
<select name="province_id[]" id="selProvince" class="select-search">
<option value="">กรุณาเลือกจังหวัด</option>
<?php
include("connect.inc.php");
$SelectPr="SELECT * FROM province";
$QueryPro=mysql_query($SelectPr);
while($Pro=mysql_fetch_array($QueryPro)){
?>
<option value="<?=$Pro['province_id']?>"><?=$Pro['province_name']?></option>
<?php } ?>
</select>
</div>
</div>
</div>
</th>
<th>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="display-block text-semibold"> สถานที่ท่องเที่ยว</label>
<select id="selTravel" name="travel_id[]" class="select-search"><option value="">กรุณาเลือกจังหวัด</option></select>
</div>
</div>
</div>
</div>
</th>
<th>
</th>
</tr>
<tr><td><center>รายการที่เพิ่ม</center></td></tr>
</thead>
<tbody>
</tbody>
</table>
<div class="row">
<div class="form-group">
<div class="col-md-6">
<button type="button" id="btnP">เพิ่มรายการ</button>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="display-block text-semibold"> สถานที่ไปรับ</label>
<input class="form-control" type="text" name="rn_place" autocomplete="off">
</div>
</div>
</div>
<div class="form-group">
<label>สถานที่เพิ่มเติมระหว่างทาง</label>
<textarea rows="5" cols="5" class="form-control" name="vn_dtial" placeholder="Enter your message here"></textarea>
</div>
</fieldset>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-primary">Submit form <i class="icon-arrow-right14 position-right"></i></button>
</div>
</div>
</div>
</form>
<!-- Footer -->
<div class="footer text-muted f-xs text-center">
© 2016. ระบบจองรถตู้ออนไลน์ by ออนทัว
</div>
<!-- /footer -->
</div>
</div>
</div>
</div>
<!-- Core JS files -->
<script type="text/javascript" src="assets/js/plugins/loaders/pace.min.js"></script>
<script type="text/javascript" src="assets/js/core/libraries/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/core/libraries/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/loaders/blockui.min.js"></script>
<!-- /core JS files -->
<script type="text/javascript" src="assets/js/core/libraries/jquery_ui/interactions.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/selects/select2.min.js"></script>
<script type="text/javascript" src="assets/js/pages/form_select2.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/styling/uniform.min.js"></script>
<script type="text/javascript" src="assets/js/core/app.js"></script>
<script type="text/javascript" src="assets/js/pages/form_layouts.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/styling/uniform.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/styling/switchery.min.js"></script>
<script type="text/javascript" src="assets/js/plugins/forms/styling/switch.min.js"></script>
<script type="text/javascript" src="assets/js/pages/form_checkboxes_radios.js"></script>
</table>
</body>
</html>
This is the only required
<table border="0" width="100%">
<thead>
<tr>
<th>
<div class="row">
<div class="col-md-10">
<div class="form-group">
<label class="display-block text-semibold"> จังหวัดที่ท่องเที่ยว</label>
<select name="province_id[]" id="selProvince" class="select-search">
<option value="">กรุณาเลือกจังหวัด</option>
<?php
include("connect.inc.php");
$SelectPr="SELECT * FROM province";
$QueryPro=mysql_query($SelectPr);
while($Pro=mysql_fetch_array($QueryPro)){
?>
<option value="<?=$Pro['province_id']?>"><?=$Pro['province_name']?></option>
<?php } ?>
</select>
</div>
</div>
</div>
</th>
<th>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="display-block text-semibold"> สถานที่ท่องเที่ยว</label>
<select id="selTravel" name="travel_id[]" class="select-search"><option value="">กรุณาเลือกจังหวัด</option></select>
</div>
</div>
</div>
</div>
</th>
<th>
</th>
</tr>
<tr><td><center>รายการที่เพิ่ม</center></td></tr>
</thead>
<tbody>
</tbody>
</table>
<div class="row">
<div class="form-group">
<div class="col-md-6">
<button type="button" id="btnP">เพิ่มรายการ</button>
</div>
</div>
</div>
FORM INSERT
<?php
session_start();
//PUT THIS HEADER ON TOP OF EACH UNIQUE PAGE
if(!isset($_SESSION['id_user'])){
header("location:index.php");
}
include_once('config.php');
$id_user = $_SESSION['id_user'];
$rn_first_name = $_POST['rn_first_name'];
$rn_last_name = $_POST['rn_last_name'];
$rn_gostart = $_POST['rn_gostart'];
$rn_endstart = $_POST['rn_endstart'];
$time_gostart = $_POST['time_gostart'];
$time_endstart = $_POST['time_endstart'];
$rn_tel = $_POST['rn_tel'];
$rn_amount = $_POST['rn_amount'];
$rn_svan = $_POST['rn_svan'];
$rn_destination = $_POST['rn_destination'];
$id_invoice = $_POST['id_invoice'];
$Status = $_POST['Status'];
$vn_dtial = $_POST['vn_dtial'];
$rn_place = $_POST['rn_place'];
$travellist_id = $_POST['travellist_id'];
$province_id = $_POST['province_id'];
$travel_id = $_POST['travel_id'];
$total = $_POST['total'];
// function date
$date_go = "$rn_gostart"; //กำหนดค้นวันที่เริ่ม
$date_end = "$rn_endstart"; //กำหนดค้นวันที่กลับ
$datetime1 = new DateTime($date_go);
$datetime2 = new DateTime($date_end);
$datetotal = $datetime1->diff($datetime2);
$total= $datetotal->format('%a') * 1800; //ผลการคำนวณ
$date = "$rn_gostart"; //กำหนดค้นวันที่
$result = mysqli_query($mysqli,"select * from vn_rent where rn_gostart = '$date'");
$ckd = mysqli_num_rows($result);
if($ckd >= 3){
$msg = "<div class='alert alert-danger'>
<span class='glyphicon glyphicon-info-sign'></span> วันที่จองเต็มแล้ว
</div>";
}else{
// ส่วนของการ insert
$sql = "INSERT INTO vn_rent (id_user,rn_first_name,rn_last_name,rn_gostart,rn_endstart,time_gostart,time_endstart,rn_tel,rn_amount,rn_svan,Status,vn_dtial,rn_place,rn_destination,total)
VALUES ('$id_user', '$rn_first_name',' $rn_last_name ','$rn_gostart','$rn_endstart','$time_gostart','$time_endstart','$rn_tel','$rn_amount','$rn_svan','$Status','$vn_dtial','$rn_place','$rn_destination','$total')";
//คำสั่ง insert 2 ตาราง ที่ส่งค่าไปอีกตารางแล้วนำกลับมาอัปเดท
if ($mysqli->query($sql) === TRUE) {
$id_van = $mysqli->insert_id;
$mysqli->query("INSERT INTO invoice
(id_user,id_van)
VALUE($id_user, $id_van)");
$id_invoice = $mysqli->insert_id;
$mysqli->query("UPDATE vn_rent
SET id_invoice = '$id_invoice'
WHERE id_van = $id_van");
$msg = "<div class ='alert alert-success alert-styled-left alert-arrow-left alert-bordered'>
จองรถตู้สำเร็จ โปรดรอการตอบรับจากทางเจ้าหน้าที่</p> เลขที่รายการจอง <span class='text-warning'>".$id_van."</span> เลขที่ใบเสร็จ <span class='text-warning'>".$id_invoice."</span>
</div>";
header("refresh:5; url=history_booking.php");
}
else {
echo "Error: " . $sql . "<br>" . $mysqli->error;
}
}
$mysqli->close();
?>
To put that into multiple records from select into the table travel_list
multiple records from select

Two forms on same page and php script is not working

there are two forms one is registration form and another is sign in form .When am registring with registration form its div element is fetching message from php using isset funtion but when i am doing same thing with sign in it is redirecting page to homepage please help what can i do if am trying to match database if not matched it will fetch value from php and show in the div as in the code
<?php
if (!empty($_POST['finish'])) {
//do something here;
include'php/signup.php';
}
if (!empty($_POST['go'])) {
include'php/signin.php';
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/homepage.css">
<link rel="stylesheet" type="text/css" href="css/login.css">
<link rel="stylesheet" type="text/css" href="css/signup.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/login.js"></script>
<script src="js/signup.js"></script>
<script>
function hideMessage() {
document.getElementById("message").style.display = "none";
};
setTimeout(hideMessage, 5000);
</script>
</head>
<body >
<!--row starts here -->
<div class="row">
<div class="col-1-2">
</div>
<div class="col-1-2">
<div class="container">
<ul class="tabs">
<li class="tab-link current" data-tab="tab-1">Sign Up</li>
<li class="tab-link" data-tab="tab-2">Sign In</li>
</ul>
<div id="tab-1" class="tab-content current">
<div id="message"><?php if(isset($message)) echo $message; ?></div>
<ul id="registration-step">
<li id="account" class="highlight">Account</li>
<li id="password">Password</li>
<li id="general">Nick Name</li>
</ul>
<form name="frmRegistration" id="registration-form" method="post">
<div id="account-field">
<span id="email-error" class="registration-error"></span>
<div><input type="text" name="email" id="email" class="demoInputBox" placeholder="E-mail"/></div>
</div>
<div id="password-field" style="display:none;">
<span id="password-error" class="registration-error"></span>
<div><input type="password" name="password" id="user-password" class="demoInputBox" placeholder="Password"required /></div>
</div>
<div id="general-field" style="display:none;">
<div><input type="text" name="nickname" id="display-name" class="demoInputBox" placeholder="Nick Name"/></div>
</div>
<div>
<input class="btnAction" type="button" name="back" id="back" value="Back" style="display:none;">
<input class="btnAction" type="button" name="next" id="next" value="Next" >
<input class="btnAction" type="submit" name="finish" id="finish" value="Finish" style="display:none;">
</div>
</form>
</div>
<div id="tab-2" class="tab-content">
<div id="signinmsg"><?php if(isset($msg1)) echo $msg1; ?></div>
<form name="signin"method="post">
<input type="text" name="signinemail"class="demoInputBox"placeholder="E-mail">
<br><br>
<input type="text" class="demoInputBox"name="signinpass"placeholder="Password"><br><br>
<input class="btnAction" type="submit" name="go" id="go" value="Go.." >
</form>
</div>
</div>
</div>
<!--this row ends here -->
</body>
</html>
You should be checking if isset and not !empty
<?php
if (isset($_POST['finish'])) {
//do something here;
include'php/signup.php';
}
if (isset($_POST['go'])) {
include'php/signin.php';
}
?>

Categories