Skip to content

Commit

Permalink
Bugfix: Changed str_replace in insert/update survey to match <br /> i…
Browse files Browse the repository at this point in the history
…n html edit survey section (was causing multiple <BR>'s to occur!)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@106 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Mar 21, 2003
1 parent 3530a52 commit 8945953
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/database.php
Expand Up @@ -246,7 +246,7 @@
$description = addcslashes($description, "'");
$welcome = addcslashes($welcome, "'");
}
$isquery = "INSERT INTO surveys (sid, short_title, description, admin, active, welcome, expires, adminemail) VALUES ('', '$short_title', '$description', '$admin', 'N', '".str_replace("\n", "<BR>", $welcome)."', '$expires', '$adminemail')";
$isquery = "INSERT INTO surveys (sid, short_title, description, admin, active, welcome, expires, adminemail) VALUES ('', '$short_title', '$description', '$admin', 'N', '".str_replace("\n", "<br />", $welcome)."', '$expires', '$adminemail')";
$isresult = mysql_query ($isquery);
if ($isresult)
{
Expand All @@ -271,7 +271,7 @@
$welcome = addcslashes($welcome, "'");
}
$usquery = "UPDATE surveys SET short_title='$short_title', description='$description',";
$usquery .= " admin='$admin', welcome='".str_replace("\n", "<BR>", $welcome)."',";
$usquery .= " admin='$admin', welcome='".str_replace("\n", "<br />", $welcome)."',";
$usquery .= " expires='$expires', adminemail='$adminemail'";
$usquery .= " WHERE sid=$sid";
$usresult = mysql_query($usquery);
Expand Down

0 comments on commit 8945953

Please sign in to comment.