$GET[a], why it is needed before logging in or doing a search in index page
1.why "a" is needed.
2.From where value is passed to "a"?
the above $GET[a] is repeated in many php pages on this project, i couldnt figure out , why?
if you need complete code,i could send you
Below is the some code of index page. Index page consist of book search and login section.
Code: Select all
<?php
session_start();
include 'conn.php';
ConnectDB();
$errMsg = "";
if ($_GET[a]=='2')
{
//$a="search.php?txtsearch=" . $_POST[txtsearch];
$a="search.php?cboCategory=" . $_POST[cboCategory];
$_SESSION[searchtext] = $_POST[txtsearch];
$_SESSION[searchauthor] = $_POST[txtauthor];
$_SESSION[searchbook] = $_POST[txtbook];
$_SESSION[cboCategory] = $_POST[cboCategory];
header("Location: $a");
}
if ($_GET[a]=='1')
{
$sql="select nUserId,cUserType from Users where