Pasa Mike Posted February 14, 2007 Share Posted February 14, 2007 Hey all, I'm still learning PHP and was asked to take on a project.... These are two files that I created as part of a much larger "backend" to add an event to a PHP driven event listing on the site... I need all the help I can get... Thanks soo much! The first file (event_add.php) seems to be working fine, the second however, is returning several errors... ============================================================================================ File #1 (event_add.php): ============================================================================================ <?php require_once('../dbconnect.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 tbl_content (startdate, numofdays, time1, time2, price, title, description, timestamp) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['startdate'], "startdate"), GetSQLValueString($_POST['numofdays'], "tinyint"), GetSQLValueString($_POST['time1'], "text"), GetSQLValueString($_POST['time2'], "text"), GetSQLValueString($_POST['price'], "int"), GetSQLValueString($_POST['title'], "text"), GetSQLValueString($_POST['description'], "text"), GetSQLValueString($_POST['timestamp'], "date")); mysql_select_db($database_dbc, $dbc); $Result1 = mysql_query($insertSQL, $dbc) or die(mysql_error()); $insertGoTo = "event_add2.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/edit-r.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <!-- InstanceBeginEditable name="doctitle" --> <title>wave:. admin panel 1.0</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <script type="text/JavaScript"> <!-- function MM_popupMsg(msg) { //v1.0 confirm(msg); } function GP_popupConfirmMsg(msg) { //v1.0 document.MM_returnValue = confirm(msg); } //--> </script> <link href="wstyle.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style2 {color: #999999} .style4 {color: #999999; font-size: 12px; } --> </style> </head> <body bgcolor="#4c4920" leftmargin="0" topmargin="0" rightmargin="0"> <table height="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="940" rowspan="2"><table width="940" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="940" height="670" valign="top"><table height="728" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="150" colspan="3" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="940" height="150"> <param name="movie" value="swf/main.swf" /> <param name="quality" value="high" /> <embed src="swf/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="150"></embed> </object></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#123C8D"></td> </tr> <tr> <td height="2" colspan="3" valign="middle" bgcolor="#123C8D"></td> </tr> <tr> <td width="10" rowspan="2" valign="middle" bgcolor="#133E8C"> </td> <td width="913" rowspan="2" align="left" valign="top" bgcolor="#123D8C"> <!--Begin editable Form--> <form id="form1" name="form1" method="post" action="<?php echo $editFormAction; ?>"> <table width="900" border="0"> <tr> <td width="182" valign="top"><img src="images/addevent1.gif" width="182" height="74" /></td> <td width="501" rowspan="2"><div align="left" class="Wtext"><strong>Event Title:</strong><br /> <input name="textfield" type="text" size="55" /> </div> <div align="left"> <script>DateInput('startdate', true, 'YYYY-MM-DD')</script> <br /> <span class="Wtext"><strong>Number of Days: </strong></span><span class="style4">{select <strong>one</strong> option} </span><br /> <table width="155" border="0"> <tr> <td width="149" class="Wtext"><div align="right">Single Day: <input name="numofdays" type="radio" value="1" /> </div></td> </tr> <tr> <td class="Wtext"><div align="right">Multiple Days: <input name="numofdays" type="radio" value="2" /> </div></td> </tr> </table> <br /> <span class="Wtext"><strong>Time Schedule: </strong></span><span class="style4">{select which information will be needed} </span><br /> <table width="155" border="0"> <tr> <td width="149" class="Wtext"><div align="right">Meet Time: <input name="time1" type="radio" value="0" /> </div></td> </tr> <tr> <td class="Wtext"><div align="right">Start Time: <input name="time1" type="radio" value="1" /> </div></td> </tr> </table> <br /> <table width="155" border="0"> <tr> <td width="149" class="Wtext"> <div align="right">End Time:<input name="time2" type="radio" value="0" /><br /> Return Time:<input name="time2" type="radio" value="1" /></div></td> </tr> </table> <br /> <span class="Wtext"><strong>Price: </strong></span><span class="style4">{select <strong>one</strong> option}</span><br /> <table width="155" border="0"> <tr> <td width="149"><div align="right"><span class="Wtext">Free: <input name="price" type="radio" value="1" /> </span></div></td> </tr> <tr> <td><div align="right"><span class="Wtext">One Payment: <input name="price" type="radio" value="2" /> </span></div></td> </tr> <tr> <td><div align="right"><span class="Wtext">Multiple Payments: <input name="price" type="radio" value="3" /> </span></div></td> </tr> </table> <br /> <p><span class="Wtext"><strong>Event Description: </strong></span><span class="style4">{<strong>simple explanation</strong> of the event - not exhaustive}</span><br /> <textarea name="description" cols="55" rows="5" id="description"></textarea> </p> <p><span class="style2">Ready to move on?:</span><br /> <input type="reset" name="Submit2" value="Reset" /> <input name="Submit" type="submit" id="Submit" value="Continue" /> </p> </div> </label></td> <td width="203"> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="3"> </td> </tr> </table> </form> <input type="hidden" name="MM_insert" value="form1"> </form> </td> <td width="17" height="300" valign="middle" bgcolor="#133E8C"> </td> </tr> <tr> <td height="200" valign="middle" bgcolor="#133E8C"> </td> </tr> <tr> <td height="76" colspan="3" valign="top" background="images/bkgnd_footer.gif" bgcolor="#062464"><div class="Copywright"><br /> </div> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="431"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"> </td> <td width="417" valign="top"><span class="copywright">© 2004–2007 <a href="http://www.cbglades.com/" class="copywright">Church by the Glades.</a> All rights reserved.<br /> 400 Lakeview Drive, Coral Springs, Florida, 33071. 954.755.7766</span><br /> <span class="michaelnewsom">Web Site Design by <a href="http://www.michaelnewsom.com/" class="michaelnewsom" target="_blank">Michael Newsom</a></span></td> </tr> </table></td> <td width="492" valign="top"><div align="center"><a href="http://www.cbglades.com/" class="botlinks">Church by the Glades</a><span class="style2"> |</span> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=132460813" class="botlinks"> The Wave @ myspace.com</a> <br /><a href="/" class="botlinks">Home</a><span class="style2"> | </span> <a href="/wpg.php?title=The+Wave" class="botlinks">The Wave</a><span class="style2"> | </span> <a href="/wpg.php?title=Life+Groups" class="botlinks">Life Groups</a><span class="style2"> | </span> <a href="/wpg.php?title=Elements" class="botlinks">Elements</a> <span class="style2">|</span> <a href="/wpg2.php?title=Events" class="botlinks">Events</a><span class="style2"> | </span> <a href="/wpg3.php?title=Resources" class="botlinks">Resources</a><span class="style2"> | </span> <a href="/wpg.php?title=Contact+Us" class="botlinks">Contact Us</a> </div> </td> </tr> </table></td> </tr> </table> <p></p></td> </tr> </table> <p></p></td> <td width="58" height="272" valign="bottom" background="images/RVert.jpg"> </td> </tr> <tr> <td valign="bottom"> </td> </tr> </table> </body> </html> ======================================================================================= File #2 (event_add2.php): ======================================================================================= <?php require_once('dbconnect.php'); $colname_content = "-1"; if (isset($_GET['title'])) { $colname_content = (get_magic_quotes_gpc()) ? $_GET['title'] : addslashes($_GET['title']); } // Select content from URL mysql_select_db($database_dbc, $dbc); $query_content = sprintf("SELECT * FROM tbl_content WHERE title = '%s'", $colname_content); $content = mysql_query($query_content, $dbc) or die(mysql_error()); $row_content = mysql_fetch_assoc($content); $totalRows_content = mysql_num_rows($content); //Set variable to current category $cat = $row_content['event']; ?> <!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/edit-r.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <!-- InstanceBeginEditable name="doctitle" --> <title>wave:. admin panel 1.0</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <script type="text/JavaScript"> <!-- function MM_popupMsg(msg) { //v1.0 confirm(msg); } function GP_popupConfirmMsg(msg) { //v1.0 document.MM_returnValue = confirm(msg); } //--> <link href="wstyle.css" rel="stylesheet" type="text/css" /> </script> <link href="wstyle.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style2 {color: #999999} .style4 {color: #999999; font-size: 12px; } .style5 {color: #FFFFFF} --> </style> </head> <body bgcolor="#4c4920" leftmargin="0" topmargin="0" rightmargin="0"> <table height="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="940" rowspan="2"><table width="940" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="940" height="670" valign="top"><table height="728" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="150" colspan="3" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="940" height="150"> <param name="movie" value="swf/main.swf" /> <param name="quality" value="high" /> <embed src="swf/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="150"></embed> </object></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#123C8D"></td> </tr> <tr> <td height="2" colspan="3" valign="middle" bgcolor="#123C8D"></td> </tr> <tr> <td width="10" rowspan="2" valign="middle" bgcolor="#133E8C"> </td> <td width="913" rowspan="2" align="left" valign="top" bgcolor="#123D8C"> <!--Begin editable Form--> <form id="form1" name="form1" method="post" action="<?php echo $editFormAction; ?>"> <table width="900" border="0"> <tr> <td width="182" valign="top"><img src="images/addevent1.gif" width="182" height="74" /></td> <td width="501" rowspan="2"><div align="left" class="Wtext"><strong>Event Title:</strong></div> <div align="left"> <input name="title" type="text" value="<?php echo $row_content['title']; ?>" size="50" maxlength="60" /> <br /> <br /> <span class="Wtext"><strong>Number of Days: </strong></span><span class="style4">{select <strong>one</strong> option} </span><br /> <table width="324" border="0"> <tr> <td width="318" class="Wtext"><div align="right">Start date: <script>DateInput('startdate', true, 'YYYY-MM-DD', '<?php echo $row_content['startdate']; ?>')</script>?>" /> <br /> </div></td> </tr> <tr> <td class="Wtext"><div align="right"> <?php if ( $numofdays == "2" ) { echo "<script>DateInput('enddate', true, 'YYYY-MM-DD', '<?php echo $row_content['enddate']; ?>')</script>\n"; } ?> </div></td> </tr> </table> <br /> <span class="Wtext"><strong>Time Schedule: </strong></span><span class="style4">{select which information will be needed} </span><br /> <table width="322" border="0"> <tr> <td width="316" class="Wtext"><div align="right"> <?php if ($time1 == 0 ) { echo "Meet Time: <input type=\"text\" name=\"$meettime\" value=\"<?php echo $row_content['meetime']; ?>\">\n"; } elseif ($time1 == 1) echo "Start Time: <input type=\"text\" name=\"$starttime\" value=\"<?php echo $row_content['starttime']; ?>\">\n"; ?><br /> <?php if ($time2 == 0 ) { echo "End Time: <input type=\"text\" name=\"$endtime\" value=\"<?php echo $row_content['endtime']; ?>\">\n"; } elseif ($time1 == 1) echo "Return Time: <input type=\"text\" name=\"$returntime\" value=\"<?php echo $row_content['returntime']; ?>\">\n"; ?> </div></td> </tr> </table> <br /> <span class="Wtext"><strong>Price: </strong></span><span class="style4">{select <strong>one</strong> option}</span><br /> <table width="319" border="0"> <tr> <td width="313"><div align="right"> <?php if ($price == 1 ) { echo "Free event!"; } elseif ($price == 2) echo "Event Price: <input type=\"text\" name=\"$pay1\"\n"; } elseif ($price == 3} echo "<table width=\"500\" border=\"0\" bgcolor=\"#CCCCCC\"> <tr> <td colspan=\"2\">Event Payment Schedule: </td> </tr> <tr> <td width=\"241\" bgcolor=\"#CCCCCC\"><div align=\"right\">1st Payment: <input type=\"text\" name=\"pay1\" /> </div></td> <td width=\"249\">Due Date: <input type=\"text\" name=\"paydate1\" /></td> </tr> <tr> <td bgcolor=\"#CCCCCC\"><div align=\"right\">2nd Payment: <input type=\"text\" name=\"pay2\" /> </div></td> <td>Due Date: <input type=\"text\" name=\"paydate2\" /></td> </tr> <tr> <td bgcolor=\"#CCCCCC\"><div align=\"right\">3rd Payment: <input type=\"text\" name=\"pay3\" /> </div></td> <td>Due Date: <input type=\"text\" name=\"paydate3\" /></td> </tr> <tr> <td bgcolor=\"#CCCCCC\"><div align=\"right\">4th Payment: <input type=\"text\" name=\"pay4\" /> </div></td> <td>Due Date: <input type=\"text\" name=\"paydate4\" /></td> </tr> </table>\n"; } ?> </div></td> </tr> </table> <p><br /> <span class="Wtext"><strong>Event Description: </strong></span><span class="style4">{<strong>simple explanation</strong> of the event - not exhaustive}</span><br /> <textarea name="description" cols="55" rows="5" id="description"><?php echo $row_content['description']; ?></textarea> </p> <p> <span class="Wtext"><strong>Display Preferences:</strong></span> <span class="style4">{select areas where information should appear</span></p> <table width="502" border="0"> <tr> <td width="145" class="Wtext"><div align="right">Display: <input name="display" type="radio" value="1" /> </div></td> <td width="347" class="style4">{master display control - must be selected for information to 'public'}</td> </tr> <tr> <td class="Wtext"><div align="right">Display 411: <input name="display411" type="radio" value="1" /> </div></td> <td class="style4">{select to display information in "Event 411" box} </td> </tr> <tr> <td class="Wtext"><div align="right">High School: <input name="hsdisplay" type="radio" value="1" /> </div></td> <td><span class="style4">{select if event is open to High School students}</span> </td> </tr> <tr> <td class="Wtext"><div align="right">Middle School: <input name="msdisplay" type="radio" value="1" /> </div></td> <td class="style4">{select if event is open to Middle School students} </td> </tr> </table> <p> </p> <table width="500" border="0"> <tr> <td colspan="2"><strong><span class="Wtext">Link the following forms to this event:</span></strong></td> </tr> <tr> <td width="187"><div align="right" class="Wtext">Permission Form <input name="radiobutton" type="radio" value="radiobutton" /> </div></td> <td width="303"><span class="style4">{select to allow download of permission slip} </span></td> </tr> <tr> <td><div align="right" class="Wtext"> Scholarship Application: <input name="radiobutton" type="radio" value="radiobutton" /> </div></td> <td><span class="style4">{select to allow download of student scholarship application} </span></td> </tr> </table> <p><span class="style2">Are You Done?:</span><br /> <input type="reset" name="Submit2" value="Reset" /> <input name="Submit" type="submit" id="Submit" value="Yes, Submit Event!" /> </p> </div> </label></td> <td width="203"> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="3"> </td> </tr> </table> </form> </td> <td width="17" height="300" valign="middle" bgcolor="#133E8C"> </td> </tr> <tr> <td height="200" valign="middle" bgcolor="#133E8C"> </td> </tr> <tr> <td height="76" colspan="3" valign="top" background="images/bkgnd_footer.gif" bgcolor="#062464"><div class="Copywright"><br /> </div> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="431"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"> </td> <td width="417" valign="top"><span class="copywright">© 2004–2007 <a href="http://www.cbglades.com/" class="copywright">Church by the Glades.</a> All rights reserved.<br /> 400 Lakeview Drive, Coral Springs, Florida, 33071. 954.755.7766</span><br /> <span class="michaelnewsom">Web Site Design by <a href="http://www.michaelnewsom.com/" class="michaelnewsom" target="_blank">Michael Newsom</a></span></td> </tr> </table></td> <td width="492" valign="top"><div align="center"><a href="http://www.cbglades.com/" class="botlinks">Church by the Glades</a><span class="style2"> |</span> <a href="http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=132460813" class="botlinks"> The Wave @ myspace.com</a> <br /><a href="/" class="botlinks">Home</a><span class="style2"> | </span> <a href="/wpg.php?title=The+Wave" class="botlinks">The Wave</a><span class="style2"> | </span> <a href="/wpg.php?title=Life+Groups" class="botlinks">Life Groups</a><span class="style2"> | </span> <a href="/wpg.php?title=Elements" class="botlinks">Elements</a> <span class="style2">|</span> <a href="/wpg2.php?title=Events" class="botlinks">Events</a><span class="style2"> | </span> <a href="/wpg3.php?title=Resources" class="botlinks">Resources</a><span class="style2"> | </span> <a href="/wpg.php?title=Contact+Us" class="botlinks">Contact Us</a> </div> </td> </tr> </table></td> </tr> </table> <p></p></td> </tr> </table> <p></p></td> <td width="58" height="272" valign="bottom" background="images/RVert.jpg"> </td> </tr> <tr> <td valign="bottom"> </td> </tr> </table> </body> </html> ==================================================================================== Link to comment https://forums.phpfreaks.com/topic/38434-solved-need-help-debugging/ Share on other sites More sharing options...
Pasa Mike Posted February 14, 2007 Author Share Posted February 14, 2007 By the way... The error I am currently getting (on file #2 or event_add2.php) is this: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/cbgstude/public_html/edit-r/event_add2.php on line 93 Link to comment https://forums.phpfreaks.com/topic/38434-solved-need-help-debugging/#findComment-184374 Share on other sites More sharing options...
btherl Posted February 14, 2007 Share Posted February 14, 2007 G'day, Replace echo "<script>DateInput('enddate', true, 'YYYY-MM-DD', '<?php echo $row_content['enddate']; ?>')</script>\n"; with echo "<script>DateInput('enddate', true, 'YYYY-MM-DD', '<?php echo {$row_content['enddate']}; ?>')</script>\n"; You will need to do the same on other lines too. The problem is that the array usage within a double quoted string needs to be surrounded by {} to work properly. Link to comment https://forums.phpfreaks.com/topic/38434-solved-need-help-debugging/#findComment-184380 Share on other sites More sharing options...
redarrow Posted February 14, 2007 Share Posted February 14, 2007 <?php require_once('dbconnect.php'); $colname_content = "-1"; if (isset($_GET['title'])) { $colname_content = (get_magic_quotes_gpc()) ? $_GET['title'] : addslashes($_GET['title']); } // Select content from URL mysql_select_db($database_dbc, $dbc); $query_content = sprintf("SELECT * FROM tbl_content WHERE title = '%s'", $colname_content); $content = mysql_query($query_content, $dbc) or die(mysql_error()); $row_content = mysql_fetch_assoc($content); $totalRows_content = mysql_num_rows($content); //Set variable to current category $cat = $row_content['event']; ?> <!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/edit-r.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <!-- InstanceBeginEditable name="doctitle" --> <title>wave:. admin panel 1.0</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <script type="text/JavaScript"> <!-- function MM_popupMsg(msg) { //v1.0 confirm(msg); } function GP_popupConfirmMsg(msg) { //v1.0 document.MM_returnValue = confirm(msg); } //--> <link href="wstyle.css" rel="stylesheet" type="text/css" /> </script> <link href="wstyle.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style2 {color: #999999} .style4 {color: #999999; font-size: 12px; } .style5 {color: #FFFFFF} --> </style> </head> <body bgcolor="#4c4920" leftmargin="0" topmargin="0" rightmargin="0"> <table height="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="940" rowspan="2"><table width="940" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="940" height="670" valign="top"><table height="728" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="150" colspan="3" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="940" height="150"> <param name="movie" value="swf/main.swf" /> <param name="quality" value="high" /> <embed src="swf/main.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="150"></embed> </object></td> </tr> <tr> <td colspan="3" valign="top" bgcolor="#123C8D"></td> </tr> <tr> <td height="2" colspan="3" valign="middle" bgcolor="#123C8D"></td> </tr> <tr> <td width="10" rowspan="2" valign="middle" bgcolor="#133E8C"> </td> <td width="913" rowspan="2" align="left" valign="top" bgcolor="#123D8C"> <!--Begin editable Form--> <form id="form1" name="form1" method="post" action="<?php echo $editFormAction; ?>"> <table width="900" border="0"> <tr> <td width="182" valign="top"><img src="images/addevent1.gif" width="182" height="74" /></td> <td width="501" rowspan="2"><div align="left" class="Wtext"><strong>Event Title:</strong></div> <div align="left"> <input name="title" type="text" value="<?php echo $row_content['title']; ?>" size="50" maxlength="60" /> <span class="Wtext"><strong>Number of Days: </strong></span><span class="style4">{select <strong>one</strong> option} </span> <table width="324" border="0"> <tr> <td width="318" class="Wtext"><div align="right">Start date: <script>DateInput('startdate', true, 'YYYY-MM-DD', '<?php echo $row_content['startdate']; ?>')</script>?>" /> </div></td> </tr> <tr> <td class="Wtext"><div align="right"> <?php if ( $numofdays == "2" ) { echo "<script>DateInput('enddate', true, 'YYYY-MM-DD', '<?php echo '".$row_content['enddate']."'"; ?>')</script>\n"; } ?> </div></td> </tr> </table> <span class="Wtext"><strong>Time Schedule: </strong></span><span class="style4">{select which information will be needed} </span> <table width="322" border="0"> <tr> <td width="316" class="Wtext"><div align="right"> <?php if ($time1 == 0 ) { echo "Meet Time: <input type=\"text\" name=\"$meettime\" value=\"<?php echo ".$row_content['meetime']."; ?>\">\n"; } elseif ($time1 == 1){ echo "Start Time: <input type=\"text\" name=\"$starttime\" value=\"<?php echo ".$row_content['starttime']."; ?>\">\n"; } ?> <?php if ($time2 == 0 ) { echo "End Time: <input type=\"text\" name=\"$endtime\" value=\"<?php echo ".$row_content['endtime']."; ?>\">\n"; } elseif ($time1 == 1){ echo "Return Time: <input type=\"text\" name=\"$returntime\" value=\"<?php echo ".$row_content['returntime']."; ?>\">\n"; } ?> </div></td> </tr> </table> <span class="Wtext"><strong>Price: </strong></span><span class="style4">{select <strong>one</strong> option}</span> <table width="319" border="0"> <tr> <td width="313"><div align="right"> <?php if ($price == 1 ) { echo "Free event!"; } elseif ($price == 2){ echo "Event Price: <input type=\"text\" name=\"$pay1\"\n"; } elseif ($price == 3){ ?> <table width="500" border="0" bgcolor="#CCCCCC"> <tr> <td colspan="2">Event Payment Schedule: </td> </tr> <tr> <td width="241" bgcolor="#CCCCCC"><div align="right">1st Payment: <input type="text" name="pay1" > </div></td> <td width="249">Due Date: <input type="text" name="paydate1" ></td> </tr> <tr> <td bgcolor="#CCCCCC"><div align="right">2nd Payment: <input type="text" name="pay2" > </div></td> <td>Due Date: <input type="text" name="paydate2" ></td> </tr> <tr> <td bgcolor="#CCCCCC"><div align="right">3rd Payment: <input type="text" name="pay3" > </div></td> <td>Due Date: <input type="text" name="paydate3" ></td> </tr> <tr> <td bgcolor="#CCCCCC"><div align="right">4th Payment: <input type="text" name="pay4" > </div></td> <td>Due Date: <input type="text" name="paydate4" ></td> </tr> </table> <?}?> </div></td> </tr> </table> <p> <span class="Wtext"><strong>Event Description: </strong></span><span class="style4">{<strong>simple explanation</strong> of the event - not exhaustive}</span> <textarea name="description" cols="55" rows="5" id="description"><?php echo $row_content['description']; ?></textarea> </p> <p> <span class="Wtext"><strong>Display Preferences:</strong></span> <span class="style4">{select areas where information should appear</span></p> <table width="502" border="0"> <tr> <td width="145" class="Wtext"><div align="right">Display: <input name="display" type="radio" value="1" /> </div></td> <td width="347" class="style4">{master display control - must be selected for information to 'public'}</td> </tr> <tr> <td class="Wtext"><div align="right">Display 411: <input name="display411" type="radio" value="1" /> </div></td> <td class="style4">{select to display information in "Event 411" box} </td> </tr> <tr> <td class="Wtext"><div align="right">High School: <input name="hsdisplay" type="radio" value="1" /> </div></td> <td><span class="style4">{select if event is open to High School students}</span> </td> </tr> <tr> <td class="Wtext"><div align="right">Middle School: <input name="msdisplay" type="radio" value="1" /> </div></td> <td class="style4">{select if event is open to Middle School students} </td> </tr> </table> <p> </p> <table width="500" border="0"> <tr> <td colspan="2"><strong><span class="Wtext">Link the following forms to this event:</span></strong></td> </tr> <tr> <td width="187"><div align="right" class="Wtext">Permission Form <input name="radiobutton" type="radio" value="radiobutton" /> </div></td> <td width="303"><span class="style4">{select to allow download of permission slip} </span></td> </tr> <tr> <td><div align="right" class="Wtext"> Scholarship Application: <input name="radiobutton" type="radio" value="radiobutton" /> </div></td> <td><span class="style4">{select to allow download of student scholarship application} </span></td> </tr> </table> <p><span class="style2">Are You Done?:</span> <input type="reset" name="Submit2" value="Reset" /> <input name="Submit" type="submit" id="Submit" value="Yes, Submit Event!" /> </p> </div> </label></td> <td width="203"> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="3"> </td> </tr> </table> </form> </td> <td width="17" height="300" valign="middle" bgcolor="#133E8C"> </td> </tr> <tr> <td height="200" valign="middle" bgcolor="#133E8C"> </td> </tr> <tr> <td height="76" colspan="3" valign="top" background="images/bkgnd_footer.gif" bgcolor="#062464"><div class="Copywright"> </div> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="431"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"> </td> <td width="417" valign="top"><span class="copywright">© 2004–2007 Church by the Glades. All rights reserved. 400 Lakeview Drive, Coral Springs, Florida, 33071. 954.755.7766</span> <span class="michaelnewsom">Web Site Design by Michael Newsom</span></td> </tr> </table></td> <td width="492" valign="top"><div align="center">Church by the Glades<span class="style2"> |</span> The Wave @ myspace.com <a href="/" class="botlinks">Home[/url]<span class="style2"> | </span> <a href="/wpg.php?title=The+Wave" class="botlinks">The Wave[/url]<span class="style2"> | </span> <a href="/wpg.php?title=Life+Groups" class="botlinks">Life Groups[/url]<span class="style2"> | </span> <a href="/wpg.php?title=Elements" class="botlinks">Elements[/url] <span class="style2">|</span> <a href="/wpg2.php?title=Events" class="botlinks">Events[/url]<span class="style2"> | </span> <a href="/wpg3.php?title=Resources" class="botlinks">Resources[/url]<span class="style2"> | </span> <a href="/wpg.php?title=Contact+Us" class="botlinks">Contact Us[/url] </div> </td> </tr> </table></td> </tr> </table> <p></p></td> </tr> </table> <p></p></td> <td width="58" height="272" valign="bottom" background="images/RVert.jpg"> </td> </tr> <tr> <td valign="bottom"> </td> </tr> </table> </body> </html> Link to comment https://forums.phpfreaks.com/topic/38434-solved-need-help-debugging/#findComment-184398 Share on other sites More sharing options...
redarrow Posted February 14, 2007 Share Posted February 14, 2007 went throw the code with all the best tools on offer there a bracket wrong some were but i debug all code blocks there all ok but the error is $end meaning } but where lol going mad? Link to comment https://forums.phpfreaks.com/topic/38434-solved-need-help-debugging/#findComment-184410 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.