我已經開發了一個代碼..我創建了一個從和在操作im開放另一個文件insert.php.however提交查詢按鈕什麼都不做,我卡在同一頁。我的代碼。鏈接文件在PHP中不打開
<head>
<script language="javascript" src="calendar.js"></script>
</head>
<?php
$host="localhost"; // Host name
$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="sm_sample"; // Database name
$tbl_name="sample"; // Table name
$theDate;
// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
?>
<html>
<body>
Date<form action="somewhere.php" method="post">
<?php
//get class into the page
require_once('classes/tc_calendar.php');
//instantiate class and set properties
$myCalendar = new tc_calendar("date1", true);
$myCalendar->setIcon("images/iconCalendar.gif");
$myCalendar->setdate(date('d'), date('m'), date('Y'));
//output the calendar
$myCalendar->writeScript();
?>
<?php
$theDate = isset($_REQUEST["date1"]) ? $_REQUEST["date1"] : "";
?>
<br />
<form method="post" action="insert.php">
<br />Source<br /><select input name="source">
<option value="Blogs">Blogs</option>
<option value="Facebook">Facebook</option>
<option value="Google Buzz">Google Buzz</option>
<option value="Google Plus">Google Plus</option>
<option value="LinkedIn">LinkedIn</option>
<option value="Twitter">Twitter</option>
<option value="Others">Others</option>
<option value="UNKNOWN">UNKNOWN</option>
</select>
<br /><br />
Username<br /><input type="text" name="username" />
<br /><br />
Location<br /><select input name="location">
<option value="India">India</option>
<option value="Singapore">Singapore</option>
<option value="Hongkong">Hongkong</option>
<option value="UAE">UAE</option>
<option value="Others">Others</option>
<option value="UNKNOWN">UNKNOWN</option>
</select>
<br /><br />
Category<br /><select input name="category">
<option value="User Banking Experience">User Banking Experience</option>
<option value="Credit/Debit Card">Credit/Debit Card</option>
<option value="Customer Care">Customer Care</option>
<option value="Staff Behavior">Staff Behavior</option>
<option value="Others">Others</option>
</select>
<br /><br />
Complaint<br /><input type="text" name="complaint" />
<br /><br />
Status<br /><select input name="status">
<option value="Pending">Pending</option>
<option value="In Process">In Process</option>
<option value="Resolved">Resolved</option>
<option value="Insufficient Information">Insufficient Information</option>
</select>
<br /><br />
</form>
</select>
<br /><br />
<input type="submit" />
</form>
我沒有看到表單標籤。 –
...和你的表單動作是'somewhere.php',而不是'insert.php',這只是一個簡單的鏈接。 – DrColossos
...和「
」應該在''內。 – Narf