Faracus Posted February 13, 2008 Share Posted February 13, 2008 This might seem like a silly question, but how do I make sure that a certain block of code only operates on a certain condition. I thought that I could put it in to the if function, but when I test it, I just get a blank screen. <?php$con = mysql_connect("localhost","****","*****");if (!$con){die('Could not connect: ' . mysql_error());}mysql_select_db("ShackGuys Accounts", $con);$sql="UPDATE accounts SET sgmmorpg = 'n'WHERE uname = '" . mysql_real_escape_string($_POST['uname']) . "' AND password = '" . mysql_real_escape_string($_POST['pass']) . "'";$result = mysql_query($sql, $con);if (mysql_affected_rows($con)){ echo "Project Removed. <a href='index.html'>Click Here</a> to continue";$file = "$_POST[gname].ini";if (!unlink($file)) { echo ("Error deleting $file"); }else { echo ("Character Deleted Sucessfuly"); }<br>$file = "$_POST[gname].html";if (!unlink($file)) { echo ("Error deleting $file"); }else { echo ("Personal Page Deleted Sucessfuly"); }<br>$file = "$_POST[gname]";if (!unlink($file)) { echo ("Error deleting $file"); }else { echo ("Congratulations You Have Opted-Out Sucessfuly"); }}else{ echo "Account not found. Please go back and check your information and try again.";}mysql_close($con);?> Link to comment Share on other sites More sharing options...
justsomeguy Posted February 13, 2008 Share Posted February 13, 2008 There are some <br>s in the code that are causing problems, remove those. Those are HTML, not PHP. Link to comment Share on other sites More sharing options...
Faracus Posted February 14, 2008 Author Share Posted February 14, 2008 then how would I get it to go on a new line?Edit: never mind, I figured it out as well. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.