Andy, here are a few debugging tips... 1) Post a link to a test page instead of including a code snippet in a message.
2) Where do you define the checkemail() function? 3) Use uncompressed copies of jQuery and Interface for debugging. 4) Load your page with Firebug enabled and the Break on All Errors option turned on. Check the stack trace (top of the Firebug panel) when it stops. 5) Server issues such as MySQL and PHP, and the editor/IDE you use such as Dreamweaver, have no effect on JavaScript bugs. Keep the two separate in your mind to make debugging simpler. -Mike > From: Andy > > Hi, I need help with small code that i hardly could not be > able to solve myself. > > I have created subscribe forms that comes with two text field > for first name and email address. > > Before I created database to insert data into the database, I > have tested the form with picture background using <div> the > blind up the background imae along with form and blind down > the second image it said "thank you for subscribe", is works > great with out testing with database. > > And now I want to add insert data into he database and once > send data to database the picture background and forms blind > up and blind down with second images where it said thank you > for subscribe. > > I'm using dreamweaver 8, and create insert code into the > mysql, to insert database is works great but then i'm getting > error message after insert database that the form is not > blind up and down yet. > > what I wrote was that after insert database it will call > javascript function "checkemail()" to blind up the > background. for some how is getting error message. > > the error said: > > line 1 > error 1. > > any idea! > > > > <?php require_once('../Connections/RegData.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"] == > "myform")) { > $insertSQL = sprintf("INSERT INTO pol_emaillist (Name, > Email) VALUES (%s, %s)", > GetSQLValueString($_POST['name'], "text"), > GetSQLValueString($_POST['email'], "text")); > > mysql_select_db($database_RegData, $RegData); > $Result1 = mysql_query($insertSQL, $RegData) or die(mysql_error()); > > // $insertGoTo = "../WORKS.PHP"; > if (isset($_SERVER['QUERY_STRING'])) { > $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; > $insertGoTo .= $_SERVER['QUERY_STRING']; > } > ?><script type="text/javascript">checkEmail();</script><?php > } > ?> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 > Transitional//EN" "http:// > www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> > <!-- saved from url=(0041)http://interface.eyecon.ro/demos/ifx.html -- > > > <HTML > xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Interface > FX demo - Interface plugin for jQuery</TITLE> <META > http-equiv=Content-Language content=en> <META > http-equiv=Content-Type content="text/html; charset=utf-8"> > <SCRIPT src="Jquary2_files/jquery.js" > type=text/javascript></SCRIPT> <SCRIPT > src="Jquary2_files/interface.js" type=text/javascript></SCRIPT> >