my server behavior dont work i have this for my php
<?php require_once('../Connections/crosscheck.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO results (`question 1`, `question 2`) VALUES (%s, %s)",
GetSQLValueString($_POST['q1'], "text"),
GetSQLValueString($_POST['q2'], "text"));
mysql_select_db($database_crosscheck, $crosscheck);
$Result1 = mysql_query($insertSQL, $crosscheck) or die(mysql_error());
$insertGoTo = "success.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
$con = mysql_connect("localhost","myname","mypass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>
and my html is
<form action="<?php echo $editFormAction; ?>" name="form1" method="POST" >
<td><input type="radio" name="q1" value="yes" id="radiobutton" /> </td>
<td><input type="radio" name="q1" value="no" id="radio" /> </td>
<td><input type="radio" name="q1" value="n/a" id="radio2" /> </td>
<td> </td>
<td bgcolor="#999999"> </td>
<tr>
<td bgcolor="#999999"><span class="style5">2.</span></td>
<td bgcolor="#FFCCCC"><span class="style1">is front end destination information displayed </span></td>
<td bgcolor="#FFCCCC"><input name="q2" type="radio" value="yes" /></td>
<td bgcolor="#FFCCCC"><input name="q2" type="radio" value="no" /></td>
<td bgcolor="#FFCCCC"><input name="q2" type="radio" value="n/a" /></td>
<td bgcolor="#FFCCCC"><input type="submit" name="Submit" value="Submit" /></td>
<td bg
any suggestions?