当我点击提交按钮时,我的页面没有重定向到book_appoinment.php
页面。
这是我的代码。我无法弄清楚我的代码有什么问题。
<?php
include('include/config.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Home</title>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no"/>
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="css/grid.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/rd-mailform.css">
<script src="js/jquery.js"></script>
<script src="js/jquery-migrate-1.2.1.js"></script>
<script src='js/device.min.js'></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script>
$(document).ready(function(){
$('.dropdown-toggle').dropdown()
});
function changebrands()
{
$("#brands_ul li a").click(function(){
$("#brands").text($(this).text());
});
}
function changemodels()
{
$("#models_ul li a").click(function(){
$("#models").text($(this).text());
});
}
function changeprocessors()
{
$("#processors_ul li a").click(function(){
$("#processors").text($(this).text());
});
}
function changeyears()
{
$("#years_ul li a").click(function(){
$("#years").text($(this).text());
});
}
</script>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<div class="page">
<section class="parallax banner01">
<div class="container">
<div class="row">
<div class="preffix_4 grid_4">
<!-- RD Mailform -->
<form class="rd-mailform" method="get" action="book_appoinment.php">
<table>
<tr>
<td>
<div class = "form-group">
<div class="dropdown">
<button id="brands" onclick="changebrands();" aria-expanded="false" aria-haspopup="true" role="button" class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style = "height:50px; width:112%; text-align:left; font-size:large; color:gray;">
Brand
</button>
<ul class="dropdown-menu" id="brands_ul" aria-labelledby="brand_dropdown" style = "width:112%;">
<?php
$rs_brand = mysql_query("SELECT DISTINCT l_brand FROM my_web_data_temp");
if(mysql_num_rows($rs_brand) > 0)
{
while($row = mysql_fetch_array($rs_brand))
{?>
<li><a href="#"><?php echo $row['l_brand'];?></a></li>
<?php
}
}
?>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class = "form-group">
<div class="dropdown">
<button id="models" onclick="changemodels();" name = "model"aria-expanded="false" aria-haspopup="true" role="button" class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style = "height:50px; width:112%; text-align:left; font-size:large; color:gray;">
Model
</button>
<ul class="dropdown-menu" id="models_ul" aria-labelledby="model_dropdown" style = "width:112%;">
<?php
$rs_model = mysql_query("SELECT DISTINCT l_model FROM my_web_data_temp");
if(mysql_num_rows($rs_model) > 0)
{
while($row = mysql_fetch_array($rs_model))
{?>
<li><a href="#"><?php echo $row['l_model'];?></a></li>
<?php
}
}
?>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class = "form-group">
<div class="dropdown">
<button id="processors" onclick="changeprocessors();" name = "processor" aria-expanded="false" aria-haspopup="true" role="button" class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style = "height:50px; width:112%; text-align:left; font-size:large; color:gray;">
Processor
</button>
<ul class="dropdown-menu" id="processors_ul" aria-labelledby="model_dropdown" style = "width:112%;">
<?php
$rs_processor = mysql_query("SELECT DISTINCT l_processor FROM my_web_data_temp");
if(mysql_num_rows($rs_processor) > 0)
{
while($row = mysql_fetch_array($rs_processor))
{?>
<li><a href="#"><?php echo $row['l_processor'];?></a></li>
<?php
}
}
?>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class = "form-group">
<div class="dropdown">
<button id="years" onclick="changeyears();" aria-expanded="false" aria-haspopup="true" role="button" class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style = "height:50px; width:112%; text-align:left; font-size:large; color:gray;">
year
</button>
<ul class="dropdown-menu" id="years_ul" aria-labelledby="year_dropdown" style = "width:112%";>
<?php
$year = date("Y");
for($i = 0; $i<10; $i++)
{?>
<li><a href="#"><?PHP echo $year; ?></a></li>
<?php $year= $year-1;?>
<?php
}
?>
</ul>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class = "form-group">
<div class="dropdown">
<button id="condition" aria-expanded="false" aria-haspopup="true" role="button" class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style = "height:50px; width:112%; text-align:left; color:gray;">
No physical damage - Working condition
</button>
</div>
</div>
</td>
</tr>
</table>
<div class = "form-group">
<div>
<input type="submit"
name="submit"
class="btn btn-default"
value="EVALUATE YOUR DEVICE NOW"
style="background-color:lawngreen; width:100%; height:50px;">
</div>
</div>
</form>
</div>
</div>
</section>
</div>
<script src="js/script.js"></script>
</body>
</html>
这是我的配置文件:
<?php
date_default_timezone_set ("Asia/Calcutta");
define('HTTP_SERVER', 'http://192.168.43.23/site/');
define('ENABLE_SSL', false);
define('SITE_URL', 'http://192.168.43.23/site/');
define('SITE_URL_ADMIN', SITE_URL.'admin/');
define('SITE_CSS', SITE_URL.'css/');
define('DIR_WS_IMAGES', SITE_URL.'images/');
define('DIR_WS_INCLUDES', SITE_URL.'include/');
define('SITE_JS', SITE_URL.'js/');
define('DIR_FS','C:/xampp/htdocs/site/');
define('DIR_FS_ADMINCP',DIR_FS.'admin/');
define('DIR_FS_IMG', DIR_FS.'images/');
define('DIR_FS_INCLUDES',DIR_FS.'include/');
define('DIR_FS_SUPPLIER_IMAGE',DIR_FS_SUPPLIER.'images/');
define('DIR_WS_TEMPLATES', DIR_FS.'templates/');
define('DIR_WS_TEMPLATES_ADMIN_CP', DIR_WS_TEMPLATES.'admin/');
define('DIR_WS_CONTENT', DIR_WS_TEMPLATES.'content/');
define('DIR_WS_CONTENT_ADMINCP', DIR_WS_TEMPLATES_ADMIN_CP.'content/');
define('RACKS_SEQ', 'RACKS_SEQ');
define('PROD_DOM_SEQ', 'PROD_DOM_SEQ');
define('PROD_INT_SEQ', 'PROD_INT_SEQ');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'root');
define('DB_SERVER_PASSWORD', 'swetav');
define('DB_DATABASE', 'my_website');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
define('RECORDS_PER_PAGE',5);
/////////////////////// Tables /////////////////////////
define(TAB_STATE_MASTER,"table_name");
require_once(DIR_FS_INCLUDES.'function/function.php');
$db_link = re_db_connect(DB_SERVER,DB_SERVER_USERNAME,DB_SERVER_PASSWORD,DB_DATABASE);
define('DB_LINK', $db_link);
?>
我的职能:
function re_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link')
{
global $$link;
if (USE_PCONNECT == 'true') {
$$link = mysql_pconnect($server, $username, $password);
} else {
$$link = mysql_connect($server, $username, $password);
}
if ($$link) mysql_select_db($database);
return $$link;
}