fullySanitize($_GET['key']); if (strlen($key) == 0) $key = "singles-US"; $depth = 1; // 1 for country, 2 for state, 3 for city $keys = explode("-", $key); $cat = $keys[0]; // this is cat_path $country = $keys[1]; // this is loc_path of country $state = ""; // this is loc_path of state $city = ""; // this is loc_path of city $catdisp = ""; // this is display value for category, ex. "Christian Singles" $peopledisp = ""; // this is display value for people of above category, which may differ from above $locdesc = ""; // description of the top location, ex. "Reno, NV" $toplocpath = $country; if (count($keys) > 2) { $state = $keys[2]; $toplocpath = $state; $depth = 2; } if (count($keys) > 3) { $city = $keys[3] . '_' . strtolower($state); $toplocpath = $city; $depth = 3; } $trans = TransManager::getInstance(); $trans->beginTrans(); $pdo = $trans->getPDO(); $stmt = $pdo->prepare('SELECT display, people_disp FROM category WHERE cat_path = ?'); $stmt->bindParam(1, $cat); $stmt->execute(); $myrow = $stmt->fetch(PDO::FETCH_NUM); $catdisp = $myrow[0]; $peopledisp = $myrow[1]; $stmt = $pdo->prepare('SELECT name FROM location WHERE loc_path = ?'); $stmt->bindParam(1, $toplocpath); $stmt->execute(); $myrow = $stmt->fetch(PDO::FETCH_NUM); $locdesc = $myrow[0]; ?> Submit Tip for <?= $peopledisp ?> in <?= $locdesc ?>

Submit a Dating Tip on DatingDiversions.com

Metrodate.com - the Ultimate Singles Resource

You are about to submit a dating tip for in

If this is not the most appropriate category for your tip, please go back and select a different category.

Your Name:
Your Email
Your Location:
Your tip or piece of advice:
fullySanitize($_POST['name']); $tip = $input->fullySanitize($_POST['tip']); $email = $input->fullySanitize($_POST['email']); $location = $input->fullySanitize($_POST['location']); ?> Thank You for Submiting a Dating Tip '; $emailinput = ''; $locationinput = ''; $nametd = ''; $tiptd = ''; if (strlen($name) == 0) $nametd = 'Your Name: '; else $nametd = 'Your Name: '; if (strlen($tip) == 0) $tiptd = 'Your tip or piece of advice:'; else $tiptd = 'Your tip or piece of advice:'; ?>

There Was a Problem With Your Submission

Metrodate.com - the Ultimate Singles Resource

Please fill in the red field(s):

Your Email
Your Location:
fullySanitize($_GET['key']); $depth = 1; // 1 for country, 2 for state, 3 for city $keys = explode("-", $key); $cat = $keys[0]; // this is cat_path $country = $keys[1]; // this is loc_path of country $state = ""; // this is loc_path of state $city = ""; // this is loc_path of city if (count($keys) > 2) { $state = $keys[2]; $toplocpath = $state; $depth = 2; } if (count($keys) > 3) { $city = $keys[3] . '_' . strtolower($state); $toplocpath = $city; $depth = 3; } $trans = TransManager::getInstance(); $trans->beginTrans(); $pdo = $trans->getPDO(); $stmt = $pdo->prepare('SELECT location_cat_id FROM location_cat WHERE cat_path = ? AND loc_path = ?'); $stmt->bindParam(1, $cat); $stmt->bindParam(2, $toplocpath); $stmt->execute(); $myrow = $stmt->fetch(PDO::FETCH_NUM); $loccatid = $myrow[0]; if (!stristr($tip, 'a href') && !stristr($tip, '[url') && !stristr($tip, 'http://')) { $stmt = $pdo->prepare('INSERT INTO tip (name, email, location, body, location_cat_id, admin_flag) VALUES (?, ?, ?, ?, ?, \'U\')'); if (strlen($name) != 0) $stmt->bindParam(1, $name); else $stmt->bindValue(1, null); if (strlen($email) != 0) $stmt->bindParam(2, $email); else $stmt->bindValue(2, null); if (strlen($location) != 0) $stmt->bindParam(3, $location); else $stmt->bindValue(3, null); if (strlen($tip) != 0) $stmt->bindParam(4, $tip); else $stmt->bindValue(4, null); $stmt->bindParam(5, $loccatid); $stmt->execute(); } $trans->commit(); $trans->disconnect(); ?>

Thank You For Your Submission

Thank you , your submission has been recorded

All submissions are reviewed before they "go live" on DatingDiversions.com. Therefore your tip or advice will not be displayed immediately.

Thank you again for contributing to DatingDiversions.com.