Jump to content

winuser2003

Members
  • Posts

    110
  • Joined

  • Last visited

Everything posted by winuser2003

  1. The code you posted is where I need to put in the </a> tags? would that be causeing the hyperlinking in the newstore.php file?
  2. Okay, go to the main site.. http://www.bookapartyroom.com Click Submit A Party Room Scroll Down and try and input the code, everything is hyperlinked for some reason, I have had this issue before but cannot remember right off where I fixed it. Here is the code I implemented that came from you. <?php // ---------------------------------------------------------------------- // File : inc_newstore.php // Description : displays form to enter a new store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); global $strFormadminstate; screenheading("New Party Room Submission"); print("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n"); print("<input type=\"hidden\" name=\"pageaction\" value=\"savestore\">\n"); print $strFormadminstate; print("<table class=\"newtable\" width=\"572\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"); print(" <tr>\n"); print(" <td width=\"110\" class=\"newhead\"> Party Room Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"companystoreID\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Room Capacity</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"suburb\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Business Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storename\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Address</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"address\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> City</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"city\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> State</td>\n"); print(" <td class=\"newtext\">"); include ("statedropdown.php"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Zip / Post Code</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"zippostcode\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 1</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone1\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 2</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone2\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Fax</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"fax\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Email</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"email\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Website</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"website\" size=\"50\"></td>\n"); print(" </tr>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Choose Hosted Occasions </td>\n"); print(" <td class=\"newtext\">"); countrydropdown(); print("</td>\n"); print(" <tr>\n"); print(" <td class=\"newhead\">A Brief Description of Your<br /> Party Room<br /></td>\n"); print(" <td class=\"newtext\"><textarea name=\"description\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onkeydown=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onmouseout=\"CheckFieldLength(description, 'charcount1', 'remaining1',255);\"></textarea><br>\n"); print("<small><span id=\"charcount1\">0</span> characters entered. | <span id=\"remaining1\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Party Room Hours</td>\n"); print(" <td class=\"newtext\">\n"); print("<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\">"); print(" <tr>\n"); print(" <td></td><td class=\"hourshead\">OPEN</td><td class=\"hourshead\">CLOSE</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Monday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openmonday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closemonday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Tuesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opentuesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closetuesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Wednesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openwednesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closewednesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Thursday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openthursday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closethursday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Friday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openfriday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closefriday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Saturday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensaturday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesaturday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Sunday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensunday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesunday\" size=\"15\"></td>\n"); print(" </tr>\n"); print("</table>\n"); print("<br>\n"); print("Other hours information<br>\n"); print("<textarea name=\"opencloseinfo\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onkeydown=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onmouseout=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2',255);\"></textarea><br>\n"); print("<small><span id=\"charcount2\">0</span> characters entered. | <span id=\"remaining2\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Manager</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storemanager\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Map Link</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"maplink\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Directions</td>\n"); print(" <td class=\"newtext\"><textarea name=\"directions\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onkeydown=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onmouseout=\"CheckFieldLength(direcitons, 'charcount3', 'remaining3',255);\"></textarea><br>\n"); print("<small><span id=\"charcount3\">0</span> characters entered. | <span id=\"remaining3\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Active</td>\n"); print(" <td class=\"newtext\"><input type=\"checkbox\" name=\"recordstatus\" value=\"active\" checked></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td> </td>\n"); print(" </tr>\n"); print("</table>\n"); print '<img src="captcha/easycaptcha.php" /><br /> Enter code from above image: <input type="text" name="confirm_code" />'; print(" <td><input type=\"submit\" value=\"Submit\"></td>\n"); print("</form>\n"); print("<div id=\"bottomspacer\"></div>\n"); Why would everything hyperlink like that?
  3. Get this, I uploaded the same code to my domain and its hyperlinking everything... http://www.bookapartyroom.com/store/administration.php
  4. Thank you, by the way what files did you edit?
  5. Honestly, I am not worried about that, because this is just a test server and all that data on that server is backed up to my drives, so I am not losing anything. The main domain server is whats important. I can careless if anyone formats, copies, whatever its loose data anyway. Let me know when you have tested this on your end.
  6. I implemented your change and still have the same result, captcha is not working. If you want I can give you access to the test server... here is the information... address: ftp.byethost16.com username : b16_3979316 password : homer123 The script is located under the store/includes folder. This is not my production server, its just a test one... once this works I will push it up to the domain server. <?php // ---------------------------------------------------------------------- // File : inc_newstore.php // Description : displays form to enter a new store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); global $strFormadminstate; screenheading("New Party Room Submission"); print("<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\">\n"); print("<input type=\"hidden\" name=\"pageaction\" value=\"savestore\">\n"); print $strFormadminstate; print("<table class=\"newtable\" width=\"572\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"); print(" <tr>\n"); print(" <td width=\"110\" class=\"newhead\"> Party Room Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"companystoreID\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Room Capacity</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"suburb\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Business Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storename\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Address</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"address\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> City</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"city\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> State</td>\n"); print(" <td class=\"newtext\">"); include ("statedropdown.php"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Zip / Post Code</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"zippostcode\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 1</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone1\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 2</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone2\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Fax</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"fax\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Email</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"email\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Website</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"website\" size=\"50\"></td>\n"); print(" </tr>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Choose Hosted Occasions </td>\n"); print(" <td class=\"newtext\">"); countrydropdown(); print("</td>\n"); print(" <tr>\n"); print(" <td class=\"newhead\">A Brief Description of Your<br /> Party Room<br /></td>\n"); print(" <td class=\"newtext\"><textarea name=\"description\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onkeydown=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onmouseout=\"CheckFieldLength(description, 'charcount1', 'remaining1',255);\"></textarea><br>\n"); print("<small><span id=\"charcount1\">0</span> characters entered. | <span id=\"remaining1\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Party Room Hours</td>\n"); print(" <td class=\"newtext\">\n"); print("<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\">"); print(" <tr>\n"); print(" <td></td><td class=\"hourshead\">OPEN</td><td class=\"hourshead\">CLOSE</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Monday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openmonday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closemonday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Tuesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opentuesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closetuesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Wednesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openwednesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closewednesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Thursday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openthursday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closethursday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Friday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openfriday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closefriday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Saturday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensaturday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesaturday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Sunday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensunday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesunday\" size=\"15\"></td>\n"); print(" </tr>\n"); print("</table>\n"); print("<br>\n"); print("Other hours information<br>\n"); print("<textarea name=\"opencloseinfo\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onkeydown=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onmouseout=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2',255);\"></textarea><br>\n"); print("<small><span id=\"charcount2\">0</span> characters entered. | <span id=\"remaining2\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Manager</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storemanager\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Map Link</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"maplink\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Directions</td>\n"); print(" <td class=\"newtext\"><textarea name=\"directions\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onkeydown=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onmouseout=\"CheckFieldLength(direcitons, 'charcount3', 'remaining3',255);\"></textarea><br>\n"); print("<small><span id=\"charcount3\">0</span> characters entered. | <span id=\"remaining3\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Active</td>\n"); print(" <td class=\"newtext\"><input type=\"checkbox\" name=\"recordstatus\" value=\"active\" checked></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td> </td>\n"); print(" </tr>\n"); print("</table>\n"); print '<img src="captcha/easycaptcha.php" /><br /> Enter code from above image: <input type="text" name="confirm_code" />'; print(" <td><input type=\"submit\" value=\"Submit\"></td>\n"); if (empty($_REQUEST['confirm_code'])) { die(""); } else { if ( isset($_COOKIE['Captcha']) ) { list($Hash, $Time) = explode('.', $_COOKIE['Captcha']); if ( md5("OASDOIJQWOIJDASDOI".$_REQUEST['confirm_code'].$_SERVER['REMOTE_ADDR'].$Time) != $Hash ) { die("Captcha code is wrong."); } elseif( (time() - 5*60) > $Time) { die("Captcha code is only valid for 5 minutes."); } } else { die("No captcha cookie given. Make sure cookies are enabled."); } } print("</form>\n"); print("<div id=\"bottomspacer\"></div>\n");
  7. I think I know where we are going wrong here. When I setup the email for the submit button I edited the inc_savestore.php file. So when I do hit the submit button it sends out an email. Correct me if I am wrong, but would i also have to add the captcha system into this same code as well? here is the inc_savestore.php code... <?php // ---------------------------------------------------------------------- // File : inc_savestore.php // Description : saves a store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); screenheading("Save store record"); //accept and cleanse fields if (isset($_REQUEST['companystoreID'])) $strCompanystoreID = addslashes($_REQUEST['companystoreID']); else $strCompanystoreID = NULL; if (isset($_REQUEST['storename'])) $strStorename = addslashes($_REQUEST['storename']); else $strStorename = NULL; if (isset($_REQUEST['address'])) $strAddress = addslashes($_REQUEST['address']); else $strAddress = NULL; if (isset($_REQUEST['city'])) $strCity = addslashes($_REQUEST['city']); else $strCity = NULL; if (isset($_REQUEST['suburb'])) $strSuburb = addslashes($_REQUEST['suburb']); else $strSuburb = NULL; if (isset($_REQUEST['stateID'])) $strStateID = addslashes($_REQUEST['stateID']); else $strStateID = NULL; if (isset($_REQUEST['country'])) $strCountry = addslashes(implode(',',$_REQUEST['country'])); else $strCountry = NULL; if (isset($_REQUEST['zippostcode'])) $strZippostcode = addslashes($_REQUEST['zippostcode']); else $strZippostcode = NULL; if (isset($_REQUEST['telephone1'])) $strTelephone1 = addslashes($_REQUEST['telephone1']); else $strTelephone1 = NULL; if (isset($_REQUEST['telephone2'])) $strTelephone2 = addslashes($_REQUEST['telephone2']); else $strTelephone2 = NULL; if (isset($_REQUEST['fax'])) $strFax = addslashes($_REQUEST['fax']); else $strFax = NULL; if (isset($_REQUEST['email'])) $strEmail = addslashes($_REQUEST['email']); else $strEmail = NULL; if (isset($_REQUEST['website'])) $strWebsite = addslashes($_REQUEST['website']); else $strWebsite = NULL; if (isset($_REQUEST['description'])) $strDescription = addslashes($_REQUEST['description']); else $strDescription = NULL; if (isset($_REQUEST['openmonday'])) $strOpenmonday = addslashes($_REQUEST['openmonday']); else $strOpenmonday = NULL; if (isset($_REQUEST['closemonday'])) $strClosemonday = addslashes($_REQUEST['closemonday']); else $strClosemonday = NULL; if (isset($_REQUEST['opentuesday'])) $strOpentuesday = addslashes($_REQUEST['opentuesday']); else $strOpentuesday = NULL; if (isset($_REQUEST['closetuesday'])) $strClosetuesday = addslashes($_REQUEST['closetuesday']); else $strClosetuesday = NULL; if (isset($_REQUEST['openwednesday'])) $strOpenwednesday = addslashes($_REQUEST['openwednesday']); else $strOpenwednesday = NULL; if (isset($_REQUEST['closewednesday'])) $strClosewednesday = addslashes($_REQUEST['closewednesday']); else $strClosewednesday = NULL; if (isset($_REQUEST['openthursday'])) $strOpenthursday = addslashes($_REQUEST['openthursday']); else $strOpenthursday = NULL; if (isset($_REQUEST['closethursday'])) $strClosethursday = addslashes($_REQUEST['closethursday']); else $strClosethursday = NULL; if (isset($_REQUEST['openfriday'])) $strOpenfriday = addslashes($_REQUEST['openfriday']); else $strOpenfriday = NULL; if (isset($_REQUEST['closefriday'])) $strClosefriday = addslashes($_REQUEST['closefriday']); else $strClosefriday = NULL; if (isset($_REQUEST['opensaturday'])) $strOpensaturday = addslashes($_REQUEST['opensaturday']); else $strOpensaturday = NULL; if (isset($_REQUEST['closesaturday'])) $strClosesaturday = addslashes($_REQUEST['closesaturday']); else $strClosesaturday = NULL; if (isset($_REQUEST['opensunday'])) $strOpensunday = addslashes($_REQUEST['opensunday']); else $strOpensunday = NULL; if (isset($_REQUEST['closesunday'])) $strClosesunday = addslashes($_REQUEST['closesunday']); else $strClosesunday = NULL; if (isset($_REQUEST['opencloseinfo'])) $strOpencloseinfo = addslashes($_REQUEST['opencloseinfo']); else $strOpencloseinfo = NULL; if (isset($_REQUEST['storemanager'])) $strStoremanager = addslashes($_REQUEST['storemanager']); else $strStoremanager = NULL; if (isset($_REQUEST['maplink'])) $strMaplink = addslashes($_REQUEST['maplink']); else $strMaplink = NULL; if (isset($_REQUEST['directions'])) $strDirections = addslashes($_REQUEST['directions']); else $strDirections = NULL; if (isset($_REQUEST['recordstatus'])) $strRecordstatus = addslashes($_REQUEST['recordstatus']); else $strRecordstatus = NULL; //generate sql statement $SQLstmt = "INSERT INTO slstore VALUES (" . "NULL, '$strCompanystoreID', '$strStorename', '$strAddress', '$strCity', " . "'$strSuburb', '$strStateID', '$strCountry', '$strZippostcode', '$strTelephone1', " . "'$strTelephone2', '$strFax', '$strEmail', '$strWebsite', '$strDescription', " . "'$strOpenmonday', '$strClosemonday', '$strOpentuesday', '$strClosetuesday', " . "'$strOpenwednesday', '$strClosewednesday', '$strOpenthursday', " . "'$strClosethursday', '$strOpenfriday', '$strClosefriday', '$strOpensaturday', " . "'$strClosesaturday', '$strOpensunday', '$strClosesunday', '$strOpencloseinfo', " . "'$strStoremanager', '$strMaplink', '$strDirections', '$strRecordstatus', " . " NULL, '{$_SESSION['username']}', NULL, '{$_SESSION['username']}'" . ")"; // execute statement if (dbaction($SQLstmt)) { $from_name = "Book A Party Room Owner"; $from_email = "sales@bookapartyroom.com"; $to_email = "sales@bookapartyroom.com"; $subject = "New Store Submission"; $message = "Dear Admin: A new store has been submitted to the site with the following information: Book A Party Room Submission Record: ............................................................................................. Party Room Name................$strCompanystoreID Room Capacity..................$strSuburb Company Name...................$strStorename Party Room Address.............$strAddress City...........................$strCity State..........................$strStateID Zip Code.......................$strZippostcode Telephone 1....................$strTelephone1 Telephone 2....................$strTelephone2 Fax Number.....................$strFax Email..........................$strEmail Website........................$strWebsite ............................................................................................. Hosted Occasions...............$strCountry ............................................................................................. Description for Room...........$strDescription ............................................................................................. Party Room Hours: ...............................$strOpenmonday.....$strClosemonday ...............................$strOpentuesday.....$strClosetuesday ...............................$strOpenwednesday.....$strClosewednesday ...............................$strOpenthursday.....$strClosethursday ...............................$strOpenfriday.....$strClosefriday ...............................$strOpensaturday.....$strClosesaturday ...............................$strOpensunday.....$strClosesunday Other Hours Information........$strOpencloseinfo ............................................................................................. Manager........................$strStoremanager Map Link.......................$strMaplink Directions.....................$strDirections ............................................................................................. "; $headers = "From: ".$from_name." <".$from_email.">\r\n"; $headers .= "Reply-To: ".$from_email."\r\n"; if(mail($to_email, $subject, $message, $headers, "-f".$from_email)); print("<P align = right>" . "<a href=\"index.php\">Thank You for Choosing Book A Party Room.com<br>Your Party Room has been Submitted Successfully.</a>"); //print("<P align = center>" . "<A HREF = login.php>Login Here</A>" //print("<div id=\"messagecontainer\">\n"); //print("<div id=\"userstatus\"><br>Thank You for Choosing Book a Party Room.com<br>Your Number One Source for Scheduling, Locating, and Partying!!<br><br>Your Party Room has been Successfully Submitted to us for review.<br>If you have any questions please email us at<br><br>sales@bookapartyroom.com.<br><br>Thank you again for visiting us!"); //print("<div id=\"logocontainer\"><div id=\"logo\"><img src=\"images/logo.gif\"></div></div>\n"); //print("</div>\n"); } ?> Correct me if I am wrong on this, but I think this is the right direction.
  8. I am sorry man, I really am doing my best here. The captcha just is not working for some reason, because it keeps going to the submission successful page. Sort of seems its ignoring the captcha code all together. I maybe wrong, but I think the submit button code is wrong.
  9. Same result here is the code changed again, you can also visit the site and see... the code... <?php // ---------------------------------------------------------------------- // File : inc_newstore.php // Description : displays form to enter a new store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); global $strFormadminstate; screenheading("New Party Room Submission"); print("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n"); print("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n"); print("<input type=\"hidden\" name=\"pageaction\" value=\"savestore\">\n"); print $strFormadminstate; print("<table class=\"newtable\" width=\"572\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"); print(" <tr>\n"); print(" <td width=\"110\" class=\"newhead\"> Party Room Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"companystoreID\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Room Capacity</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"suburb\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Business Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storename\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Address</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"address\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> City</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"city\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> State</td>\n"); print(" <td class=\"newtext\">"); include ("statedropdown.php"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Zip / Post Code</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"zippostcode\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 1</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone1\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 2</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone2\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Fax</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"fax\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Email</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"email\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Website</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"website\" size=\"50\"></td>\n"); print(" </tr>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Choose Hosted Occasions </td>\n"); print(" <td class=\"newtext\">"); countrydropdown(); print("</td>\n"); print(" <tr>\n"); print(" <td class=\"newhead\">A Brief Description of Your<br /> Party Room<br /></td>\n"); print(" <td class=\"newtext\"><textarea name=\"description\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onkeydown=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onmouseout=\"CheckFieldLength(description, 'charcount1', 'remaining1',255);\"></textarea><br>\n"); print("<small><span id=\"charcount1\">0</span> characters entered. | <span id=\"remaining1\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Party Room Hours</td>\n"); print(" <td class=\"newtext\">\n"); print("<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\">"); print(" <tr>\n"); print(" <td></td><td class=\"hourshead\">OPEN</td><td class=\"hourshead\">CLOSE</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Monday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openmonday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closemonday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Tuesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opentuesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closetuesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Wednesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openwednesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closewednesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Thursday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openthursday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closethursday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Friday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openfriday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closefriday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Saturday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensaturday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesaturday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Sunday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensunday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesunday\" size=\"15\"></td>\n"); print(" </tr>\n"); print("</table>\n"); print("<br>\n"); print("Other hours information<br>\n"); print("<textarea name=\"opencloseinfo\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onkeydown=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onmouseout=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2',255);\"></textarea><br>\n"); print("<small><span id=\"charcount2\">0</span> characters entered. | <span id=\"remaining2\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Manager</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storemanager\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Map Link</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"maplink\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Directions</td>\n"); print(" <td class=\"newtext\"><textarea name=\"directions\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onkeydown=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onmouseout=\"CheckFieldLength(direcitons, 'charcount3', 'remaining3',255);\"></textarea><br>\n"); print("<small><span id=\"charcount3\">0</span> characters entered. | <span id=\"remaining3\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Active</td>\n"); print(" <td class=\"newtext\"><input type=\"checkbox\" name=\"recordstatus\" value=\"active\" checked></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td> </td>\n"); print(" </tr>\n"); print("</table>\n"); print '<img src="captcha/easycaptcha.php" /><br /> Enter code from above image: <input type="text" name="confirm_code" />'; print(" <td><input type=\"submit\" value=\"Submit\"></td>\n"); if (empty($_REQUEST['confirm_code'])) { die(""); } else { if ( isset($_COOKIE['Captcha']) ) { list($Hash, $Time) = explode('.', $_COOKIE['Captcha']); if ( md5("OASDOIJQWOIJDASDOI".$_REQUEST['confirm_code'].$_SERVER['REMOTE_ADDR'].$Time) != $Hash ) { die("Captcha code is wrong."); } elseif( (time() - 5*60) > $Time) { die("Captcha code is only valid for 5 minutes."); } } else { die("No captcha cookie given. Make sure cookies are enabled."); } } print("</form>\n"); print("<div id=\"bottomspacer\"></div>\n"); ?> The site link... http://bapr.isgreat.org/store/administration.php?pageaction=newstore and finally where I got my captcha from... http://kestas.kuliukas.com/EasyCaptcha/ this really should not be that hard, I know the answer is right in front of me. I appreciate you helping me out with this... thank you
  10. I tested that, unfortunately same result.. here is the code with the change <?php // ---------------------------------------------------------------------- // File : inc_newstore.php // Description : displays form to enter a new store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); global $strFormadminstate; screenheading("New Party Room Submission"); print("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n"); print("<input type=\"hidden\" name=\"pageaction\" value=\"savestore\">\n"); print $strFormadminstate; print("<table class=\"newtable\" width=\"572\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"); print(" <tr>\n"); print(" <td width=\"110\" class=\"newhead\"> Party Room Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"companystoreID\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Room Capacity</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"suburb\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Business Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storename\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Address</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"address\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> City</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"city\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> State</td>\n"); print(" <td class=\"newtext\">"); include ("statedropdown.php"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Zip / Post Code</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"zippostcode\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 1</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone1\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 2</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone2\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Fax</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"fax\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Email</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"email\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Website</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"website\" size=\"50\"></td>\n"); print(" </tr>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Choose Hosted Occasions </td>\n"); print(" <td class=\"newtext\">"); countrydropdown(); print("</td>\n"); print(" <tr>\n"); print(" <td class=\"newhead\">A Brief Description of Your<br /> Party Room<br /></td>\n"); print(" <td class=\"newtext\"><textarea name=\"description\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onkeydown=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onmouseout=\"CheckFieldLength(description, 'charcount1', 'remaining1',255);\"></textarea><br>\n"); print("<small><span id=\"charcount1\">0</span> characters entered. | <span id=\"remaining1\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Party Room Hours</td>\n"); print(" <td class=\"newtext\">\n"); print("<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\">"); print(" <tr>\n"); print(" <td></td><td class=\"hourshead\">OPEN</td><td class=\"hourshead\">CLOSE</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Monday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openmonday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closemonday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Tuesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opentuesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closetuesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Wednesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openwednesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closewednesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Thursday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openthursday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closethursday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Friday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openfriday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closefriday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Saturday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensaturday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesaturday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Sunday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensunday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesunday\" size=\"15\"></td>\n"); print(" </tr>\n"); print("</table>\n"); print("<br>\n"); print("Other hours information<br>\n"); print("<textarea name=\"opencloseinfo\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onkeydown=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onmouseout=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2',255);\"></textarea><br>\n"); print("<small><span id=\"charcount2\">0</span> characters entered. | <span id=\"remaining2\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Manager</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storemanager\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Map Link</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"maplink\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Directions</td>\n"); print(" <td class=\"newtext\"><textarea name=\"directions\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onkeydown=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onmouseout=\"CheckFieldLength(direcitons, 'charcount3', 'remaining3',255);\"></textarea><br>\n"); print("<small><span id=\"charcount3\">0</span> characters entered. | <span id=\"remaining3\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Active</td>\n"); print(" <td class=\"newtext\"><input type=\"checkbox\" name=\"recordstatus\" value=\"active\" checked></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td> </td>\n"); print(" </tr>\n"); print("</table>\n"); print '<img src="captcha/easycaptcha.php" /><br /> Enter code from above image: <input type="text" name="confirm_code" />'; print(" <td><input type=\"submit\" value=\"Submit\"></td>\n"); if (empty($_REQUEST['confirm_code'])) { die(""); } else { if ( isset($_COOKIE['Captcha']) ) { list($Hash, $Time) = explode('.', $_COOKIE['Captcha']); if ( md5("OASDOIJQWOIJDASDOI".$_REQUEST['confirm_code'].$_SERVER['REMOTE_ADDR'].$Time) != $Hash ) { die("Captcha code is wrong."); } elseif( (time() - 5*60) > $Time) { die("Captcha code is only valid for 5 minutes."); } } else { die("No captcha cookie given. Make sure cookies are enabled."); } } print("<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\">\n"); print("<div id=\"bottomspacer\"></div>\n"); ?>
  11. Can you give me an example? sorry I never worked with Captchas before, this my first, and did not realize it was going to be a pain.
  12. Here is where I got my captcha php code from... http://kestas.kuliukas.com/EasyCaptcha/ unless you can suggest a better captcha system I should impliment. I thought the cookie setting code was this.. if (empty($_REQUEST['confirm_code'])) { die("Confirm code not given."); } else { if ( isset($_COOKIE['Captcha']) ) { list($Hash, $Time) = explode('.', $_COOKIE['Captcha']); if ( md5("OASDOIJQWOIJDASDOI".$_REQUEST['confirm_code'].$_SERVER['REMOTE_ADDR'].$Time) != $Hash ) { die("Captcha code is wrong."); } elseif( (time() - 5*60) > $Time) { die("Captcha code is only valid for 5 minutes."); } } else { die("No captcha cookie given. Make sure cookies are enabled."); } } is this not correct?
  13. Good Call, I should have caught that thank you very much, however even with that being changed, I can put any code I want in and it just goes on through. The goal is to stop spammers and prove they are humans. Here is the code changed... <?php // ---------------------------------------------------------------------- // File : inc_newstore.php // Description : displays form to enter a new store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); global $strFormadminstate; screenheading("New Party Room Submission"); print("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n"); print("<input type=\"hidden\" name=\"pageaction\" value=\"savestore\">\n"); print $strFormadminstate; print("<table class=\"newtable\" width=\"572\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"); print(" <tr>\n"); print(" <td width=\"110\" class=\"newhead\"> Party Room Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"companystoreID\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Room Capacity</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"suburb\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Business Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storename\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Address</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"address\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> City</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"city\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> State</td>\n"); print(" <td class=\"newtext\">"); include ("statedropdown.php"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Zip / Post Code</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"zippostcode\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 1</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone1\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 2</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone2\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Fax</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"fax\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Email</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"email\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Website</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"website\" size=\"50\"></td>\n"); print(" </tr>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Choose Hosted Occasions </td>\n"); print(" <td class=\"newtext\">"); countrydropdown(); print("</td>\n"); print(" <tr>\n"); print(" <td class=\"newhead\">A Brief Description of Your<br /> Party Room<br /></td>\n"); print(" <td class=\"newtext\"><textarea name=\"description\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onkeydown=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onmouseout=\"CheckFieldLength(description, 'charcount1', 'remaining1',255);\"></textarea><br>\n"); print("<small><span id=\"charcount1\">0</span> characters entered. | <span id=\"remaining1\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Party Room Hours</td>\n"); print(" <td class=\"newtext\">\n"); print("<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\">"); print(" <tr>\n"); print(" <td></td><td class=\"hourshead\">OPEN</td><td class=\"hourshead\">CLOSE</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Monday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openmonday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closemonday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Tuesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opentuesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closetuesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Wednesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openwednesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closewednesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Thursday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openthursday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closethursday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Friday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openfriday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closefriday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Saturday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensaturday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesaturday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Sunday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensunday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesunday\" size=\"15\"></td>\n"); print(" </tr>\n"); print("</table>\n"); print("<br>\n"); print("Other hours information<br>\n"); print("<textarea name=\"opencloseinfo\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onkeydown=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onmouseout=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2',255);\"></textarea><br>\n"); print("<small><span id=\"charcount2\">0</span> characters entered. | <span id=\"remaining2\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Manager</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storemanager\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Map Link</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"maplink\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Directions</td>\n"); print(" <td class=\"newtext\"><textarea name=\"directions\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onkeydown=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onmouseout=\"CheckFieldLength(direcitons, 'charcount3', 'remaining3',255);\"></textarea><br>\n"); print("<small><span id=\"charcount3\">0</span> characters entered. | <span id=\"remaining3\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Active</td>\n"); print(" <td class=\"newtext\"><input type=\"checkbox\" name=\"recordstatus\" value=\"active\" checked></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td> </td>\n"); print(" </tr>\n"); print("</table>\n"); print '<img src="captcha/easycaptcha.php" /><br /> Enter code from above image: <input type="text" name="confirm_code" />'; print(" <td><input type=\"submit\" value=\"Submit\"></td>\n"); if (empty($_REQUEST['confirm_code'])) { die(""); } else { if ( isset($_COOKIE['Captcha']) ) { list($Hash, $Time) = explode('.', $_COOKIE['Captcha']); if ( md5("OASDOIJQWOIJDASDOI".$_REQUEST['confirm_code'].$_SERVER['REMOTE_ADDR'].$Time) != $Hash ) { die("Captcha code is wrong."); } elseif( (time() - 5*60) > $Time) { die("Captcha code is only valid for 5 minutes."); } } else { die("No captcha cookie given. Make sure cookies are enabled."); } } print("</form>\n"); print("<div id=\"bottomspacer\"></div>\n"); ?> You can see I moved it, and does work, however when I put the code in, no matter what it is still goes on through. I want to prevent spammers for jumping on this thing. Your thoughts?
  14. Here is a newly added code, unsure if this will make a difference, but now everything within the captcha is linking. <?php // ---------------------------------------------------------------------- // File : inc_newstore.php // Description : displays form to enter a new store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); global $strFormadminstate; screenheading("New Party Room Submission"); print("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n"); print("<input type=\"hidden\" name=\"pageaction\" value=\"savestore\">\n"); print $strFormadminstate; print("<table class=\"newtable\" width=\"572\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"); print(" <tr>\n"); print(" <td width=\"110\" class=\"newhead\"> Party Room Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"companystoreID\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Room Capacity</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"suburb\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Business Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storename\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Address</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"address\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> City</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"city\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> State</td>\n"); print(" <td class=\"newtext\">"); include ("statedropdown.php"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Zip / Post Code</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"zippostcode\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 1</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone1\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 2</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone2\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Fax</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"fax\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Email</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"email\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Website</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"website\" size=\"50\"></td>\n"); print(" </tr>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Choose Hosted Occasions </td>\n"); print(" <td class=\"newtext\">"); countrydropdown(); print("</td>\n"); print(" <tr>\n"); print(" <td class=\"newhead\">A Brief Description of Your<br /> Party Room<br /></td>\n"); print(" <td class=\"newtext\"><textarea name=\"description\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onkeydown=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onmouseout=\"CheckFieldLength(description, 'charcount1', 'remaining1',255);\"></textarea><br>\n"); print("<small><span id=\"charcount1\">0</span> characters entered. | <span id=\"remaining1\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Party Room Hours</td>\n"); print(" <td class=\"newtext\">\n"); print("<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\">"); print(" <tr>\n"); print(" <td></td><td class=\"hourshead\">OPEN</td><td class=\"hourshead\">CLOSE</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Monday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openmonday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closemonday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Tuesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opentuesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closetuesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Wednesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openwednesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closewednesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Thursday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openthursday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closethursday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Friday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openfriday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closefriday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Saturday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensaturday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesaturday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Sunday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensunday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesunday\" size=\"15\"></td>\n"); print(" </tr>\n"); print("</table>\n"); print("<br>\n"); print("Other hours information<br>\n"); print("<textarea name=\"opencloseinfo\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onkeydown=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onmouseout=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2',255);\"></textarea><br>\n"); print("<small><span id=\"charcount2\">0</span> characters entered. | <span id=\"remaining2\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Manager</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storemanager\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Map Link</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"maplink\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Directions</td>\n"); print(" <td class=\"newtext\"><textarea name=\"directions\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onkeydown=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onmouseout=\"CheckFieldLength(direcitons, 'charcount3', 'remaining3',255);\"></textarea><br>\n"); print("<small><span id=\"charcount3\">0</span> characters entered. | <span id=\"remaining3\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Active</td>\n"); print(" <td class=\"newtext\"><input type=\"checkbox\" name=\"recordstatus\" value=\"active\" checked></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td> </td>\n"); print(" </tr>\n"); print("</table>\n"); print("</form>\n"); print '<img src="captcha/easycaptcha.php" /><br /> Enter code from above image: <input type="text" name="confirm_code" />'; print(" <td><input type=\"submit\" value=\"Submit\"></td>\n"); if (empty($_REQUEST['confirm_code'])) { die(""); } else { if ( isset($_COOKIE['Captcha']) ) { list($Hash, $Time) = explode('.', $_COOKIE['Captcha']); if ( md5("OASDOIJQWOIJDASDOI".$_REQUEST['confirm_code'].$_SERVER['REMOTE_ADDR'].$Time) != $Hash ) { die("Captcha code is wrong."); } elseif( (time() - 5*60) > $Time) { die("Captcha code is only valid for 5 minutes."); } } else { die("No captcha cookie given. Make sure cookies are enabled."); } } print("<div id=\"bottomspacer\"></div>\n"); ?> Here is the test site link... http://bapr.isgreat.org/store/administration.php?pageaction=newstore
  15. I am trying to impliment a captcha to my site, and I got everything working but when I hit the submit button nothing happens. Here is the link to the actual site... http://bapr.isgreat.org/store/administration.php?pageaction=newstore and here is my php code where I put in the catpcha code <?php // ---------------------------------------------------------------------- // File : inc_newstore.php // Description : displays form to enter a new store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); global $strFormadminstate; screenheading("New Party Room Submission"); print("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n"); print("<input type=\"hidden\" name=\"pageaction\" value=\"savestore\">\n"); print $strFormadminstate; print("<table class=\"newtable\" width=\"572\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n"); print(" <tr>\n"); print(" <td width=\"110\" class=\"newhead\"> Party Room Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"companystoreID\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Room Capacity</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"suburb\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Business Name</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storename\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Address</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"address\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> City</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"city\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> State</td>\n"); print(" <td class=\"newtext\">"); include ("statedropdown.php"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Zip / Post Code</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"zippostcode\" size=\"20\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 1</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone1\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Telephone 2</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"telephone2\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Fax</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"fax\" size=\"30\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Email</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"email\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Website</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"website\" size=\"50\"></td>\n"); print(" </tr>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Choose Hosted Occasions </td>\n"); print(" <td class=\"newtext\">"); countrydropdown(); print("</td>\n"); print(" <tr>\n"); print(" <td class=\"newhead\">A Brief Description of Your<br /> Party Room<br /></td>\n"); print(" <td class=\"newtext\"><textarea name=\"description\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onkeydown=\"CheckFieldLength(description, 'charcount1', 'remaining1', 255);\" onmouseout=\"CheckFieldLength(description, 'charcount1', 'remaining1',255);\"></textarea><br>\n"); print("<small><span id=\"charcount1\">0</span> characters entered. | <span id=\"remaining1\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Party Room Hours</td>\n"); print(" <td class=\"newtext\">\n"); print("<table cellpadding=\"2\" cellspacing=\"2\" border=\"0\">"); print(" <tr>\n"); print(" <td></td><td class=\"hourshead\">OPEN</td><td class=\"hourshead\">CLOSE</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Monday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openmonday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closemonday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Tuesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opentuesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closetuesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Wednesday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openwednesday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closewednesday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Thursday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openthursday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closethursday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Friday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"openfriday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closefriday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Saturday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensaturday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesaturday\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"hoursday\">Sunday</td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"opensunday\" size=\"15\"></td>\n"); print(" <td class=\"hourstext\"><input type=\"text\" name=\"closesunday\" size=\"15\"></td>\n"); print(" </tr>\n"); print("</table>\n"); print("<br>\n"); print("Other hours information<br>\n"); print("<textarea name=\"opencloseinfo\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onkeydown=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2', 255);\" onmouseout=\"CheckFieldLength(opencloseinfo, 'charcount2', 'remaining2',255);\"></textarea><br>\n"); print("<small><span id=\"charcount2\">0</span> characters entered. | <span id=\"remaining2\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Manager</td>\n"); print(" <td class=\"newtext\"><input type=\"text\" name=\"storemanager\" size=\"40\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Map Link</td>\n"); print(" <td class=\"newtext\">http:// <input type=\"text\" name=\"maplink\" size=\"50\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Directions</td>\n"); print(" <td class=\"newtext\"><textarea name=\"directions\" rows=\"5\" cols=\"40\" onkeyup=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onkeydown=\"CheckFieldLength(directions, 'charcount3', 'remaining3', 255);\" onmouseout=\"CheckFieldLength(direcitons, 'charcount3', 'remaining3',255);\"></textarea><br>\n"); print("<small><span id=\"charcount3\">0</span> characters entered. | <span id=\"remaining3\">255</span> characters remaining.</small>\n"); print("</td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"newhead\"> Active</td>\n"); print(" <td class=\"newtext\"><input type=\"checkbox\" name=\"recordstatus\" value=\"active\" checked></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td> </td>\n"); print(" </tr>\n"); print("</table>\n"); print("</form>\n"); print '<img src="captcha/easycaptcha.php" /><br /> Enter code from above image: <input type="text" name="confirm_code" />'; print(" <td><input type=\"submit\" value=\"Submit\"></td>\n"); print("</table>\n"); print("</form>\n"); print("<div id=\"bottomspacer\"></div>\n"); ?> Just trying to get the submit button to work correctly and verify the captcha code was entered in correctly. Here is the link where I found to use the Captcha system http://kestas.kuliukas.com/EasyCaptcha/ Thanks for your help!!
  16. I got it guys, I actually got it the night the night before last when I caught the error why the email was not being sent. There are 3 of us writing the code, but due to the holidays I am the only left to handle it at the moment. However granted I am still learning alot and like I said in the title "probably easy" which means the obvious would be in front of me and reading the script I skim and do not go line to line. Once I analyzed line for line I caught the reason why the email was not being sent or anything. However I am picking up some tips and tricks though. I want to know more about the "Magic Quotes" function so I been reading up on that. Thank you again guys for the efforts you put in to helping me with this project. I know alot of it was obvious, its like I said I skimmed through the lines and did not catch the most obvious like I should have. Like the sane goes 2 heads are better than one. I like to be taught and shown things by the experts as well, and you all are the experts. Thank you again for everything, I still got somethings I am going to look over, but hopefully before Christmas I can have this done with. Thank You again!! Happy Thanksgiving guys!! Jeff
  17. I know it does take a little time to get to the gmail address, my concern is do I have the code in the right spot? will the email have all the entries that I need in it? and finally, why does the message "Party Room Saved" not appear anymore after saveing a store? if you got an instant messenger we can speak through that, probably be easier... I will leave that up to you. Not a big deal. I tested this again, and its not saving the records now, are you sure I got this code in the right spot? I just tested it. Also the "Party Room Saved" still not showing up.
  18. I know it does take a little time to get to the gmail address, my concern is do I have the code in the right spot? will the email have all the entries that I need in it? and finally, why does the message "Party Room Saved" not appear anymore after saveing a store? if you got an instant messenger we can speak through that, probably be easier... I will leave that up to you. Not a big deal.
  19. Well, I am trying it on the webserver now. The address is http://bapr.isgreat.org/test/store/index.php The admin address is... http://bapr.isgreat.org/test/store/administration.php this is where i am adding the code... if (dbaction($SQLstmt)) } print("<div id=\"messagecontainer\">\n"); printmessage("Party Room Saved"); print("</div>\n"); $from_name = "Test"; $from_email = "North.pj@gmail.com"; $to_email = "North.pj@gmail.com"; $subject = "Hai"; $message = "Hai Chaitu."; $headers = "From: ".$from_name." <".$from_email.">\r\n"; $headers .= "Reply-To: ".$from_email."\r\n"; if(mail($to_email, $subject, $message, $headers, "-f".$from_email)); { echo "Mail Sent!"; } else { echo " Unable to send the mail!"; } ?> I just tried it, and seems the "Party Room Saved" message is gone, am I sticking this code in the right spot?
  20. Well, I am trying it on the webserver now. The address is http://bapr.isgreat.org/test/store/index.php The admin address is... http://bapr.isgreat.org/test/store/administration.php this is where i am adding the code... if (dbaction($SQLstmt)) } print("<div id=\"messagecontainer\">\n"); printmessage("Party Room Saved"); print("</div>\n"); $from_name = "Test"; $from_email = "North.pj@gmail.com"; $to_email = "North.pj@gmail.com"; $subject = "Hai"; $message = "Hai Chaitu."; $headers = "From: ".$from_name." <".$from_email.">\r\n"; $headers .= "Reply-To: ".$from_email."\r\n"; if(mail($to_email, $subject, $message, $headers, "-f".$from_email)); { echo "Mail Sent!"; } else { echo " Unable to send the mail!"; } ?>
  21. Like This? <?php // ---------------------------------------------------------------------- // File : inc_savestore.php // Description : saves a store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); screenheading("Save store record"); //accept and cleanse fields if (isset($_REQUEST['companystoreID'])) $strCompanystoreID = addslashes($_REQUEST['companystoreID']); else $strCompanystoreID = NULL; if (isset($_REQUEST['storename'])) $strStorename = addslashes($_REQUEST['storename']); else $strStorename = NULL; if (isset($_REQUEST['address'])) $strAddress = addslashes($_REQUEST['address']); else $strAddress = NULL; if (isset($_REQUEST['city'])) $strCity = addslashes($_REQUEST['city']); else $strCity = NULL; if (isset($_REQUEST['suburb'])) $strSuburb = addslashes($_REQUEST['suburb']); else $strSuburb = NULL; if (isset($_REQUEST['stateID'])) $strStateID = addslashes($_REQUEST['stateID']); else $strStateID = NULL; if (isset($_REQUEST['country'])) $strCountry = addslashes(implode(',',$_REQUEST['country'])); else $strCountry = NULL; if (isset($_REQUEST['zippostcode'])) $strZippostcode = addslashes($_REQUEST['zippostcode']); else $strZippostcode = NULL; if (isset($_REQUEST['telephone1'])) $strTelephone1 = addslashes($_REQUEST['telephone1']); else $strTelephone1 = NULL; if (isset($_REQUEST['telephone2'])) $strTelephone2 = addslashes($_REQUEST['telephone2']); else $strTelephone2 = NULL; if (isset($_REQUEST['fax'])) $strFax = addslashes($_REQUEST['fax']); else $strFax = NULL; if (isset($_REQUEST['email'])) $strEmail = addslashes($_REQUEST['email']); else $strEmail = NULL; if (isset($_REQUEST['website'])) $strWebsite = addslashes($_REQUEST['website']); else $strWebsite = NULL; if (isset($_REQUEST['description'])) $strDescription = addslashes($_REQUEST['description']); else $strDescription = NULL; if (isset($_REQUEST['openmonday'])) $strOpenmonday = addslashes($_REQUEST['openmonday']); else $strOpenmonday = NULL; if (isset($_REQUEST['closemonday'])) $strClosemonday = addslashes($_REQUEST['closemonday']); else $strClosemonday = NULL; if (isset($_REQUEST['opentuesday'])) $strOpentuesday = addslashes($_REQUEST['opentuesday']); else $strOpentuesday = NULL; if (isset($_REQUEST['closetuesday'])) $strClosetuesday = addslashes($_REQUEST['closetuesday']); else $strClosetuesday = NULL; if (isset($_REQUEST['openwednesday'])) $strOpenwednesday = addslashes($_REQUEST['openwednesday']); else $strOpenwednesday = NULL; if (isset($_REQUEST['closewednesday'])) $strClosewednesday = addslashes($_REQUEST['closewednesday']); else $strClosewednesday = NULL; if (isset($_REQUEST['openthursday'])) $strOpenthursday = addslashes($_REQUEST['openthursday']); else $strOpenthursday = NULL; if (isset($_REQUEST['closethursday'])) $strClosethursday = addslashes($_REQUEST['closethursday']); else $strClosethursday = NULL; if (isset($_REQUEST['openfriday'])) $strOpenfriday = addslashes($_REQUEST['openfriday']); else $strOpenfriday = NULL; if (isset($_REQUEST['closefriday'])) $strClosefriday = addslashes($_REQUEST['closefriday']); else $strClosefriday = NULL; if (isset($_REQUEST['opensaturday'])) $strOpensaturday = addslashes($_REQUEST['opensaturday']); else $strOpensaturday = NULL; if (isset($_REQUEST['closesaturday'])) $strClosesaturday = addslashes($_REQUEST['closesaturday']); else $strClosesaturday = NULL; if (isset($_REQUEST['opensunday'])) $strOpensunday = addslashes($_REQUEST['opensunday']); else $strOpensunday = NULL; if (isset($_REQUEST['closesunday'])) $strClosesunday = addslashes($_REQUEST['closesunday']); else $strClosesunday = NULL; if (isset($_REQUEST['opencloseinfo'])) $strOpencloseinfo = addslashes($_REQUEST['opencloseinfo']); else $strOpencloseinfo = NULL; if (isset($_REQUEST['storemanager'])) $strStoremanager = addslashes($_REQUEST['storemanager']); else $strStoremanager = NULL; if (isset($_REQUEST['maplink'])) $strMaplink = addslashes($_REQUEST['maplink']); else $strMaplink = NULL; if (isset($_REQUEST['directions'])) $strDirections = addslashes($_REQUEST['directions']); else $strDirections = NULL; if (isset($_REQUEST['recordstatus'])) $strRecordstatus = addslashes($_REQUEST['recordstatus']); else $strRecordstatus = NULL; //generate sql statement $SQLstmt = "INSERT INTO slstore VALUES (" . "NULL, '$strCompanystoreID', '$strStorename', '$strAddress', '$strCity', " . "'$strSuburb', '$strStateID', '$strCountry', '$strZippostcode', '$strTelephone1', " . "'$strTelephone2', '$strFax', '$strEmail', '$strWebsite', '$strDescription', " . "'$strOpenmonday', '$strClosemonday', '$strOpentuesday', '$strClosetuesday', " . "'$strOpenwednesday', '$strClosewednesday', '$strOpenthursday', " . "'$strClosethursday', '$strOpenfriday', '$strClosefriday', '$strOpensaturday', " . "'$strClosesaturday', '$strOpensunday', '$strClosesunday', '$strOpencloseinfo', " . "'$strStoremanager', '$strMaplink', '$strDirections', '$strRecordstatus', " . " NULL, '{$_SESSION['username']}', NULL, '{$_SESSION['username']}'" . ")"; // execute statement if (dbaction($SQLstmt)) } print("<div id=\"messagecontainer\">\n"); printmessage("Party Room Saved"); print("</div>\n"); } { $from_name = "Test"; $from_email = "North.pj@gmail.com"; $to_email = "North.pj@gmail.com"; $subject = "Hai"; $message = "Hai Chaitu."; $headers = "From: ".$from_name." <".$from_email.">\r\n"; $headers .= "Reply-To: ".$from_email."\r\n"; if(mail($to_email, $subject, $message, $headers, "-f".$from_email)); { echo "Mail Sent!"; } else { echo " Unable to send the mail!"; ?>
  22. Is there are particular line to put this on? I am going to test this to see if it works and will let you know. I am trying to find where I call the function though and cannot find it. Is it each line like $statename, $strAddress, etc... ?? I see where you have $headers, but where would i add the rest in the script?
  23. I have a form that I need help with. As you can see in the pictures provided the button I am talking about is the "save store" button. Right now when you click on the "save store" button, it takes all the data from the form and records it into the database. The request I am making is how do I make this one button do two functions. The first function being when the button is clicked, the data goes to the database for records (DONE ALREADY). The second function is to send a confirmation email of all the form data and notifying me that a new store has been successfully created. Lets get to the pictures and the coding... First the code... This is my administration.php file, notice it has "savestore" with an include of inc_savestore.php <?php // ---------------------------------------------------------------------- // File : administration.php // Description : store locator administration interface main script // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2006. All rights reserved. // // ---------------------------------------------------------------------- //start session session_start(); //no cache header('Cache-Control: no-cache'); header('Pragma: no-cache'); //settings and common functions include("settings.php"); include("common.php"); include("databasewrapper.php"); include("includes/countrydropdown.php"); //allow for magic quotes if (get_magic_quotes_gpc()) { function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } $_POST = array_map('stripslashes_deep', $_POST); $_GET = array_map('stripslashes_deep', $_GET); $_COOKIE = array_map('stripslashes_deep', $_COOKIE); $_REQUEST = array_map('stripslashes_deep', $_REQUEST); } //get an action to perform if (isset($_REQUEST['pageaction'])) $pageaction = $_REQUEST['pageaction']; else $pageaction = ""; if (isset($_REQUEST['key'])) $strKey = addslashes($_REQUEST['key']); else $strKey = ""; if (isset($_REQUEST['lastrec'])) $strLastrec = $_REQUEST['lastrec']; else $strLastrec = ""; //maintain state between pages $strAdminstate = get_admin_state(0); $strNavadminstate = get_admin_state(1); $strFormadminstate = get_admin_state(2); $strAdminstatelastrec = get_admin_state(3); //security check determines whether to go to main control, login, or checklogindetails if (isset($_SESSION['securityID'])) { if ($_SESSION['securityID'] == $SecurityID) { maincontrol(); } else { login(""); } } else { if ($pageaction == "checklogindetails") { checklogindetails(); } else { if (isset($SecurityOverride)) { if ($SecurityOverride == "ON") { setsecuritysession(); maincontrol(); } else { login(""); } } } } // ---------------------------------------------------------------------- // Function : maincontrol() // Description : constructs each page of the administration interface // dynamically presenting action screens based on the // pageaction variable // Usage : maincontrol() // // ---------------------------------------------------------------------- function maincontrol() { global $pageaction; global $SetDebug, $strAdminstate, $strNavadminstate, $strFormadminstate, $strAdminstatelastrec; //build the html page to where the action screen starts pagestart(); if ($SetDebug=="ON") { print("<div class=\"debug\">ADMIN: $strAdminstate<br>NAV ADMIN: $strNavadminstate<br><br>$strFormadminstate<br><br>LAST REC: $strAdminstatelastrec</div>\n"); } startpagecontainer(); pageheader(); //set area session to allow main menu to show current area if ($pageaction == "storelist" || $pageaction == "" || $pageaction == "checklogindetails") $_SESSION['area'] = "store"; if ($pageaction == "statelist") $_SESSION['area'] = "state"; if ($pageaction == "userlist") $_SESSION['area'] = "user"; mainmenu(); startpagecontent(); switch($pageaction) { //store actions case "storelist": include("includes/inc_storelist.php"); break; case "viewstore": include("includes/inc_viewstore.php"); break; case "newstore": include("includes/inc_newstore.php"); break; case "savestore": include("includes/inc_savestore.php"); break; case "editstore": include("includes/inc_editstore.php"); break; case "updatestore": include("includes/inc_updatestore.php"); break; case "deletestore": include("includes/inc_deletestore.php"); break; case "deleteconfirmstore": include("includes/inc_deleteconfirmstore.php"); break; //user actions case "userlist": include("includes/inc_userlist.php"); break; case "viewuser": include("includes/inc_viewuser.php"); break; case "newuser": include("includes/inc_newuser.php"); break; case "saveuser": include("includes/inc_saveuser.php"); break; case "edituser": include("includes/inc_edituser.php"); break; case "updateuser": include("includes/inc_updateuser.php"); break; case "deleteuser": include("includes/inc_deleteuser.php"); break; case "deleteconfirmuser": include("includes/inc_deleteconfirmuser.php"); break; //state actions case "statelist": include("includes/inc_statelist.php"); break; case "viewstate": include("includes/inc_viewstate.php"); break; case "newstate": include("includes/inc_newstate.php"); break; case "savestate": include("includes/inc_savestate.php"); break; case "editstate": include("includes/inc_editstate.php"); break; case "updatestate": include("includes/inc_updatestate.php"); break; case "deletestate": include("includes/inc_deletestate.php"); break; case "deleteconfirmstate": include("includes/inc_deleteconfirmstate.php"); break; //default action default : include("includes/inc_storelist.php"); break; } // finish building the html page after where the action screen finishes endpagecontent(); endpagecontainer(); pageend(); } // ---------------------------------------------------------------------- // Function : checklogindetails() // Description : compares login username and password to database and // logs you in or prints the login form again with an // error message // Usage : checklogindetails() // // ---------------------------------------------------------------------- function checklogindetails() { global $SecurityID; //accept clean data $strLogin = addslashes($_REQUEST['username']); $strPassword = addslashes($_REQUEST['password']); //build sql statement $SQLstmt = "SELECT * FROM sluser WHERE username='$strLogin' AND password='$strPassword' AND recordstatus='active'"; //check database for login details $rs = dbaction($SQLstmt); if ($row=getrsrow($rs)) { //user detail found //set session variables $_SESSION['securityID'] = $SecurityID; //from settings.php $_SESSION['username'] = $row['username']; $_SESSION['userfullname'] = $row['userfullname']; $_SESSION['accesslevel'] = $row['accesslevel']; $_SESSION['area'] = "store"; maincontrol(); } else { //user detail not found display login page with error login("login details incorrect, please try again!"); } } // ---------------------------------------------------------------------- // Function : setsecuritysession() // Description : sets security related session variables if overriding // security from the settings file // Usage : setsecuritysession() // // ---------------------------------------------------------------------- function setsecuritysession() { global $SecurityID; $_SESSION['securityID'] = $SecurityID; // from settings.php $_SESSION['username'] = "override"; $_SESSION['userfullname'] = "override"; $_SESSION['accesslevel'] = "Super"; $_SESSION['area'] = "store"; } // ---------------------------------------------------------------------- // Function : login() // Description : displays a login form with optional error message // Usage : login($strError) // Arguments : $strError - login error text // // ---------------------------------------------------------------------- function login($strError) { pagestart(); print("<table width=\"100%\"><tr><td align=\"center\">\n"); print("<div id=\"logindiv\">\n"); print("<div id=\"logincontent\">\n"); print("<div id=\"loginform\">\n"); print("<div id=\"loginheading\">\n"); print("<div id=\"loginheadingtext\">Login to Store Locator</div>\n"); print("</div>\n"); print("<table cellpadding=\"0\" cellspacing=\"8\" border=\"0\">\n"); print("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"post\">\n"); print("<input type=\"hidden\" name=\"pageaction\" value=\"checklogindetails\">\n"); print(" <tr>\n"); print(" <td class=\"loginformtext\">Username: </td>\n"); print(" <td><input type=\"text\" name=\"username\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td class=\"loginformtext\">Password: </td>\n"); print(" <td><input type=\"password\" name=\"password\" size=\"15\"></td>\n"); print(" </tr>\n"); print(" <tr>\n"); print(" <td></td>\n"); print(" <td><input type=\"submit\" value=\"login\"></td>\n"); print(" </tr>\n"); print("</form>\n"); print("</table>\n"); print("</div>\n"); //If a login error has occured display error message if ($strError!="") { print("<div id=\"loginerror\">$strError</div>\n"); } print("</div>\n"); print("</div>\n"); print("</table>\n"); print("\n"); pageend(); } ?> Now lets look at the inc_savestore.php file <?php // ---------------------------------------------------------------------- // File : inc_savestore.php // Description : saves a store record // Version : 1.0 // Created : 1/6/2007 // // Copyright (c) 2007. All rights reserved. // // ---------------------------------------------------------------------- include("inc_security.php"); screenheading("Save store record"); //accept and cleanse fields if (isset($_REQUEST['companystoreID'])) $strCompanystoreID = addslashes($_REQUEST['companystoreID']); else $strCompanystoreID = NULL; if (isset($_REQUEST['storename'])) $strStorename = addslashes($_REQUEST['storename']); else $strStorename = NULL; if (isset($_REQUEST['address'])) $strAddress = addslashes($_REQUEST['address']); else $strAddress = NULL; if (isset($_REQUEST['city'])) $strCity = addslashes($_REQUEST['city']); else $strCity = NULL; if (isset($_REQUEST['suburb'])) $strSuburb = addslashes($_REQUEST['suburb']); else $strSuburb = NULL; if (isset($_REQUEST['stateID'])) $strStateID = addslashes($_REQUEST['stateID']); else $strStateID = NULL; if (isset($_REQUEST['country'])) $strCountry = addslashes(implode(',',$_REQUEST['country'])); else $strCountry = NULL; if (isset($_REQUEST['zippostcode'])) $strZippostcode = addslashes($_REQUEST['zippostcode']); else $strZippostcode = NULL; if (isset($_REQUEST['telephone1'])) $strTelephone1 = addslashes($_REQUEST['telephone1']); else $strTelephone1 = NULL; if (isset($_REQUEST['telephone2'])) $strTelephone2 = addslashes($_REQUEST['telephone2']); else $strTelephone2 = NULL; if (isset($_REQUEST['fax'])) $strFax = addslashes($_REQUEST['fax']); else $strFax = NULL; if (isset($_REQUEST['email'])) $strEmail = addslashes($_REQUEST['email']); else $strEmail = NULL; if (isset($_REQUEST['website'])) $strWebsite = addslashes($_REQUEST['website']); else $strWebsite = NULL; if (isset($_REQUEST['description'])) $strDescription = addslashes($_REQUEST['description']); else $strDescription = NULL; if (isset($_REQUEST['openmonday'])) $strOpenmonday = addslashes($_REQUEST['openmonday']); else $strOpenmonday = NULL; if (isset($_REQUEST['closemonday'])) $strClosemonday = addslashes($_REQUEST['closemonday']); else $strClosemonday = NULL; if (isset($_REQUEST['opentuesday'])) $strOpentuesday = addslashes($_REQUEST['opentuesday']); else $strOpentuesday = NULL; if (isset($_REQUEST['closetuesday'])) $strClosetuesday = addslashes($_REQUEST['closetuesday']); else $strClosetuesday = NULL; if (isset($_REQUEST['openwednesday'])) $strOpenwednesday = addslashes($_REQUEST['openwednesday']); else $strOpenwednesday = NULL; if (isset($_REQUEST['closewednesday'])) $strClosewednesday = addslashes($_REQUEST['closewednesday']); else $strClosewednesday = NULL; if (isset($_REQUEST['openthursday'])) $strOpenthursday = addslashes($_REQUEST['openthursday']); else $strOpenthursday = NULL; if (isset($_REQUEST['closethursday'])) $strClosethursday = addslashes($_REQUEST['closethursday']); else $strClosethursday = NULL; if (isset($_REQUEST['openfriday'])) $strOpenfriday = addslashes($_REQUEST['openfriday']); else $strOpenfriday = NULL; if (isset($_REQUEST['closefriday'])) $strClosefriday = addslashes($_REQUEST['closefriday']); else $strClosefriday = NULL; if (isset($_REQUEST['opensaturday'])) $strOpensaturday = addslashes($_REQUEST['opensaturday']); else $strOpensaturday = NULL; if (isset($_REQUEST['closesaturday'])) $strClosesaturday = addslashes($_REQUEST['closesaturday']); else $strClosesaturday = NULL; if (isset($_REQUEST['opensunday'])) $strOpensunday = addslashes($_REQUEST['opensunday']); else $strOpensunday = NULL; if (isset($_REQUEST['closesunday'])) $strClosesunday = addslashes($_REQUEST['closesunday']); else $strClosesunday = NULL; if (isset($_REQUEST['opencloseinfo'])) $strOpencloseinfo = addslashes($_REQUEST['opencloseinfo']); else $strOpencloseinfo = NULL; if (isset($_REQUEST['storemanager'])) $strStoremanager = addslashes($_REQUEST['storemanager']); else $strStoremanager = NULL; if (isset($_REQUEST['maplink'])) $strMaplink = addslashes($_REQUEST['maplink']); else $strMaplink = NULL; if (isset($_REQUEST['directions'])) $strDirections = addslashes($_REQUEST['directions']); else $strDirections = NULL; if (isset($_REQUEST['recordstatus'])) $strRecordstatus = addslashes($_REQUEST['recordstatus']); else $strRecordstatus = NULL; //generate sql statement $SQLstmt = "INSERT INTO slstore VALUES (" . "NULL, '$strCompanystoreID', '$strStorename', '$strAddress', '$strCity', " . "'$strSuburb', '$strStateID', '$strCountry', '$strZippostcode', '$strTelephone1', " . "'$strTelephone2', '$strFax', '$strEmail', '$strWebsite', '$strDescription', " . "'$strOpenmonday', '$strClosemonday', '$strOpentuesday', '$strClosetuesday', " . "'$strOpenwednesday', '$strClosewednesday', '$strOpenthursday', " . "'$strClosethursday', '$strOpenfriday', '$strClosefriday', '$strOpensaturday', " . "'$strClosesaturday', '$strOpensunday', '$strClosesunday', '$strOpencloseinfo', " . "'$strStoremanager', '$strMaplink', '$strDirections', '$strRecordstatus', " . " NULL, '{$_SESSION['username']}', NULL, '{$_SESSION['username']}'" . ")"; // execute statement if (dbaction($SQLstmt)) { print("<div id=\"messagecontainer\">\n"); printmessage("Party Room Saved"); print("</div>\n"); } ?> Now lets see some pictures... This is a view of the form: Now this is the button itself I am trying to make send an email to me: Finally this is after you click the "save store" button. The data is written to the database, but just need it to email me telling me the store has been created. Now this is probably very easy and I am not catching it right off. I appreciate you taking the time to help me out with this. Thank you. I will be googleing to coduct more research.
  24. Did you get a chance to look at the zip file and the video? I cannot believe I missed that, trust me I am not a dumb a$$ LOL, I should have caught that. Changing the number of characters in the database (duh!). Well, now my next task is to get the "save store" button to not only submit its data to the DB but also send a confirmation email that a store has been created. What are your thoughts on that? Thank you again by the way. There are two files I think that hold this static link. The common.php and the inc_savestore.php. I cannot find where the link is attached though. I have tried creating new stores, and once I create them I got the message "Party Room Saved" however that is still hyperlinked. If you need more detail take a look at the video link I provided. I will keep working with this. Thank You again, and let me know your thoughts.
  25. Did you get a chance to look at the zip file and the video? I cannot believe I missed that, trust me I am not a dumb a$$ LOL, I should have caught that. Changing the number of characters in the database (duh!). Well, now my next task is to get the "save store" button to not only submit its data to the DB but also send a confirmation email that a store has been created. What are your thoughts on that? Thank you again by the way.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.