Hi!
I have problem in Insert data to DB through the php code.
This is my code.

<?php

function connectToDB() {

$PatientId = $_POST["PatientId"];
$Name = $_POST["name"];
$Address = $_POST["Address"];
$State = $_POST["State"];
$Postcode = $_POST["Postcode"];
$Phone = $_POST["Phone"];
$Date = $_POST["Datetime"];
$Gender =$_POST["male/female"];


//opening connection to database
$conn = mysql_connect("localhost","root");
if( !$conn) die("Couldn't connect to MySQL" + mysql_error() );
print ("Successfully connected to server<p>");

//connecting to the databse
$dbName = "bhpmedical";
$db = mysql_select_db($dbName,$conn);
if(!$db) die("Couldn't connect to $db");
print ("Successfully connected to database $dbName <p>");

//Insert the information into the table;
$query = "INSERT into patient(PatientId, Name, Address, State ,Poscode, Phone, Date/time, Gender)
values('$PatientId','$Name','$Address','$State','$ Postcode','$Phone','$Date','$Gender','$Gender')";
$result = mysql_query($query);
if(!$result) die ("could not insert data into database<p>");
print ("Successfully inserted data into table<p>");

}

?>
<?
//calling the function , you can call it anywhere you like.
connectToDB()
?>

When I submit data from html, the results are sucessful in connect to sever and database but can not insert data to table ,as there are some thing wrong at line "$Gender =$_POST["male/female"];" .It were check boxes in html file.
Could you fix it please!
Thank you.