Where do you think the following problem?

Hello

He does not write to the database table on click submit? It goes to the page as shown but nothing in the database table?

Please advice.

Code below.

<? php require_once('Connections/dbAttendance.php');? >

<? PHP

If (! function_exists ("GetSQLValueString")) {}

function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

{

If (via PHP_VERSION < 6) {}

$theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

}

$theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($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 "set":

$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

break;

}

Return $theValue;

}

}

$editFormAction = $_SERVER ['PHP_SELF'];

If (isset {}

$editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

}

If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == 'form')) {}

$insertSQL = sprintf ("INSERT INTO attendlist (IDWindows, title, first name, name, mobile extension, jobrole, courses, GIC, mgrname, room) VALUES (%s, %s %s, %s, %s, %s, %s, %s, %s, %s, %s)", ")

GetSQLValueString ($_POST ["'textfield"], "text").

GetSQLValueString ($_POST ['select'], "text").

GetSQLValueString ($_POST ['textfield2 "],"text").

GetSQLValueString ($_POST ['textfield3'], "text").

GetSQLValueString ($_POST ['textfield4'], "text").

GetSQLValueString ($_POST ['textfield5'], "text").

GetSQLValueString ($_POST ['choisies5'], "text").

GetSQLValueString ($_POST ["select2"], "text").

GetSQLValueString ($_POST ['select4'], "text").

GetSQLValueString ($_POST ['textfield7'], "text").

GetSQLValueString ($_POST ['select3'], "text"));

@mysql_select_db ($database_dbAttendance, $dbAttendance);

$Result1 = mysql_query ($insertSQL, $dbAttendance) or die (mysql_error ());

$insertGoTo = "Thankyou.php";

If (isset {}

$insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;

$insertGoTo. = $_SERVER ['QUERY_STRING'];

}

header (sprintf ("location: %s", $insertGoTo));

}

@mysql_select_db ($database_dbAttendance, $dbAttendance);

$query_rsAttendance = "SELECT * from attendlist";

$rsAttendance = mysql_query ($query_rsAttendance, $dbAttendance) or die (mysql_error ());

$row_rsAttendance = mysql_fetch_assoc ($rsAttendance);

$totalRows_rsAttendance = mysql_num_rows ($rsAttendance);

? >

< ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

" < html xmlns =" http://www.w3.org/1999/xhtml ">

< head >

< meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

< title > delegate registry < /title >

< link href = "Registerpage.css" rel = "stylesheet" type = "text/css" / > "

< link href = "SpryAssets/SpryValidationTextField.css" rel = "stylesheet" type = "text/css" / > "

< link href = "SpryAssets/SpryValidationSelect.css" rel = "stylesheet" type = "text/css" / > "

< script src = "SpryAssets/SpryValidationTextField.js" type = "text/javascript" > < / script > "

< script src = "SpryAssets/SpryValidationSelect.js" type = "text/javascript" > < / script > "

< / head >

< body >

< div class = "container" >

< div class = "header" > < img src = "Identify Imperial2.jpg" width = "960" height = "150" alt = "" / > <! - end .header - > < / div > "

< div class = "content" >

Registry < H3 >: <? PHP echo "Date".date("d/m/Y"). > < / h3 >

< do action = "<?" PHP echo $editFormAction;? ">" method = "post" name = "form" >

< table width = "780" border = "0" >

< b >

< td > < div align = "right" > user ID * < / div > < table >

< td > < span id = "sprytextfield1" >

< input name = "textfield" type = "text" id = "textfield" tabindex = "1" size = "18" maxlength = "10" / >

< span class = "textfieldRequiredMsg" > a value is required. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > title * < / div > < table >

< td > < span id = "spryselect1" >

< select name = "select" id = "select" tabindex = "2" >

< option value = '0' > select < / option >

< option value = "1" > Ms < / option >

< option value = "2" > Ms < / option >

< option value = "3" > Mdm < / option >

< option value = "4" > Dr. < / option >

< option value = "5" > Mr < / option >

< option value = "6" > Professor < / option >

< / select >

< span class = "selectRequiredMsg" > please select an item. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > name * < / div > < table >

< td > < span id = "sprytextfield2" >

< input name = "textfield2" type = "text" id = "textfield2" tabindex = "3" size = "30" maxlength = "30" / >

< span class = "textfieldRequiredMsg" > a value is required. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > family name * < / div > < table >

< td > < span id = "sprytextfield3" >

< input name = "textfield3" type = "text" id = "textfield3" tabindex = "4" size = "30" maxlength = "30" / >

< span class = "textfieldRequiredMsg" > a value is required. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > Contact / beep * < / div > < table >

< td > < span id = "sprytextfield4" >

< input name = "textfield4" type = "text" id = "textfield4" tabindex = "5" size = "30" maxlength = "30" / >

< span class = "textfieldRequiredMsg" > a value is required. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > Mobile no: (optional) < / div > < table >

< td > < input name = "textfield5" type = "text" id = "textfield5" tabindex = "6" size = "20" maxlength = "20" / > < table >

< td > < table >

< /tr >

< b >

< td > < table >

< td > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > function * < / div > < table >

< td > < span id = "spryselect5" >

< select name = "choisies5" id = "choisies5" tabindex = "7" >

< option value = '0' > select < / option >

< option value = "1" > doctor < / option >

< option value = "2" > nurse IP < / option >

< option value = "3" > nurse OP < / option >

< option value = "4" > midwife < / option >

< option value = "5" > booking clerk < / option >

< option value = "6" > medical Secretary < / option >

< option value = "7" > OP receptionist < / option >

< option value = "9" > CNS/NP < / option >

< option value = "10" > test < / option >

< / select >

< span class = "selectRequiredMsg" > please select an item. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > manager name * < / div > < table >

< td > < span id = "sprytextfield5" >

< input name = "textfield7" type = "text" id = "textfield7" tabindex = "8" size = "30" maxlength = "30" / >

< span class = "textfieldRequiredMsg" > a value is required. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < table >

< td > < table >

< td > < table >

< /tr >

< b >

< td > < table >

< td > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > course * < / div > < table >

< td > < span id = "spryselect2" >

< select name = "select2" id = "select2" tabindex = "9" >

< option value = '0' > select < / option >

< option value = "1" > demo < / option >

< option value = "2" > doctors < / option >

< option value = "9" > CNS/NP < / option >

< option value = "3" > nurse IP < / option >

< option value = "4" > nurse OP < / option >

< option value = "5" > midwife < / option >

< option value = "6" > booking clerk < / option >

< option value = "7" > medical Secretary < / option >

< option value = "8" > OP receptionist < / option >

< / select >

< span class = "selectRequiredMsg" > please select an item. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > location * < / div > < table >

< td > < span id = "spryselect3" >

< select name = "select3" id = "select3" tabindex = "10" >

< option value = '0' > select < / option >

< option value = "1" > CHX 12 floor Rm 1 < / option >

< option value = "2" > CHX 12 Floor Rm 2 < / option >

< option value = "3" > CHX 10 West < / option >

< option value = "4" > HH N207 < / option >

< option value = "5" > HH W12 Conference < / option >

< option value = "6" > Rm SMH one < / option >

< option value = "7" > Rm SMH b < / option >

< option value = "8" > SMH Ming wing Rm 5 < / option >

< option value = "9" > SMH Ming wing Rm 3 < / option >

< / select >

< span class = "selectRequiredMsg" > please select an item. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < div align = "right" > GIC * < / div > < table >

< td > < span id = "spryselect4" >

< select name = "select4" id = "select4" tabindex = "11" >

< option value = '0' > select < / option >

< option value = "1" > GIC 1 - medicine < / option >

< option value = "2" > GIC 2 - surgery and Cancer < / option >

< option value = "3" > GIC 3 - specialized Services < / option >

< option value = "4" > GIC 4 - Services circulatory and renal medicine < / option >

< option value = "5" > GIC 5 - women and children < / option >

< option value = "6" > GIC 6 - clinic and investigation Sciences < / option >

< option value = "7" > GIC 7 - private Patients < / option >

< option value = "8" > other < / option >

< / select >

< span class = "selectRequiredMsg" > please select an item. </span > < / span > < table >

< td > < table >

< /tr >

< b >

< td > < table >

< td > < input name = "button" type = "submit" id = "button" culture = "Thankyou.php" value = "Submit" / > < table > "

< td > < table >

< /tr >

< b >

< td > < div align = "center" > * mandatory fields < / div > < table >

< td > < table >

< td > < table >

< /tr >

< /table >

< input type = "hidden" name = "MM_insert" value = "form" / >

< / make >

<! - end content - > < / div >

< div class = "footer" >

<! - end .footer - > < / div >

<! - end .container - > < / div >

< script type = "text/javascript" >

var sprytextfield1 = new Spry.Widget.ValidationTextField ("sprytextfield1", "none", {validateOn: ["blur", "change"]});

var spryselect1 = new Spry.Widget.ValidationSelect ("spryselect1", {validateOn: ["change", "blur"]});

var sprytextfield2 = new Spry.Widget.ValidationTextField ("sprytextfield2", "none", {validateOn: ["blur", "change"]});

var sprytextfield3 = new Spry.Widget.ValidationTextField ("sprytextfield3", "none", {validateOn: ["blur", "change"]});

var sprytextfield5 = new Spry.Widget.ValidationTextField ("sprytextfield5", "none", {validateOn: ["blur", "change"]});

var spryselect2 = new Spry.Widget.ValidationSelect ("spryselect2", {validateOn: ["change", "blur"]});

var spryselect3 = new Spry.Widget.ValidationSelect ("spryselect3", {validateOn: ["change", "blur"]});

var spryselect4 = new Spry.Widget.ValidationSelect ("spryselect4", {validateOn: ["change", "blur"]});

var sprytextfield4 = new Spry.Widget.ValidationTextField ("sprytextfield4", "none", {validateOn: ["blur", "change"]});

var spryselect5 = new Spry.Widget.ValidationSelect ("spryselect5", {validateOn: ["blur", "change"]});

< /script >

< / body >

< / html >

<? PHP

mysql_free_result ($rsAttendance);

? >

Please do not start another thread on it - you have two open threads associated with it. Moderator Please lock this.

Tags: Dreamweaver

Similar Questions

Maybe you are looking for

  • Serial number rubbed off after only 4 days on Satellite Pro L

    I would like to express my shock that important information on the back of my laptop almost completely rubbed off after only four days of use, Inc. serial number, model number, voltage/ampage, etc.. I bought a toshiba laptop on the premise that their

  • Code 10 error on Windows XP

    I get this failure when I plug my MP3 into the usb port.  The computer is a Compaq Pressario 5000 initially installed with Windows Me, who agreed the mp3 player. It wasn't until I upgraded to Windows XP that the failure has occurred. All the solution

  • Problems with WiFi Centrino N2230 adapter. Many potential bugs applied but not resolved.

    I keep losing WiFi connection.  Network is good, many other features is hung in.  Wired LAN connection is good.  HP technical support has not been able to resolve with BIOS or driver changes.  By checking on the web, there only seems to be a lot of s

  • Save a LLB VI as autonomous VI

    I received a Bachelor's degree in LAW. I only need a VI thereof. I can't understand how to do a save as for a VI.

  • Vista next to Windows 7 on the same computer

    Is it possible to 'downgrade' to, or install Windows Vista, along with Windows7?It would solve my problem of username when FrontPage 2003 publishing.