[Openfirst-cvscommit] guestbook signthanks.php,1.14,1.15
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-04-02 02:01:51
|
Update of /cvsroot/openfirst/guestbook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27094/guestbook Modified Files: signthanks.php Log Message: Now checks for post values and assigns defaults. Fixes Bug #165. Index: signthanks.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/signthanks.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** signthanks.php 12 Apr 2004 22:27:22 -0000 1.14 --- signthanks.php 2 Apr 2005 02:01:41 -0000 1.15 *************** *** 52,61 **** return $password; } ! $deletecode = RandomPassword(16); ! $query = "INSERT INTO ofirst_guestbook VALUES('" . $_POST["guest"] . "', '" . $_POST["email"] . "', '" . $_POST["icq"] . "', '" . $_POST["aim"] . "', '" . $_POST["msn"] . "', '" . $_POST["yim"] . "', '" . $_POST["irc"] . "', '" . $_POST["webpage"] . "', '" . $_POST["location"] . "', '" . $_POST["comment"] . "', '" . date("D M j G:i:s T Y") . "', '$deletecode');"; $result = ofirst_dbquery($query); ! $message = "Someone has posted a message in your guestbook. --- 52,72 ---- return $password; } ! $deletecode = RandomPassword(16); ! ! if (!isset($_POST['guest']) ) $_POST['guest'] = '(anonymous)'; ! if (!isset($_POST['email']) ) $_POST['email'] = ''; ! if (!isset($_POST['icq']) ) $_POST['icq'] = ''; ! if (!isset($_POST['aim']) ) $_POST['aim'] = ''; ! if (!isset($_POST['msn']) ) $_POST['msn'] = ''; ! if (!isset($_POST['yim']) ) $_POST['yim'] = ''; ! if (!isset($_POST['irc']) ) $_POST['irc'] = ''; ! if (!isset($_POST['webpage']) ) $_POST['webpage'] = ''; ! if (!isset($_POST['location']) ) $_POST['location'] = 'somewhere'; ! if (!isset($_POST['comment']) ) $_POST['comment'] = '(none)'; ! $query = "INSERT INTO ofirst_guestbook VALUES('" . $_POST["guest"] . "', '" . $_POST["email"] . "', '" . $_POST["icq"] . "', '" . $_POST["aim"] . "', '" . $_POST["msn"] . "', '" . $_POST["yim"] . "', '" . $_POST["irc"] . "', '" . $_POST["webpage"] . "', '" . $_POST["location"] . "', '" . $_POST["comment"] . "', '" . date("D M j G:i:s T Y") . "', '$deletecode');"; $result = ofirst_dbquery($query); ! $message = "Someone has posted a message in your guestbook. |