help me please Posted June 5, 2009 Share Posted June 5, 2009 else { $view = @fsockopen($_POST['ip'],$_POST['port'],$errorNumber,$errorMessage,1); if($view){ mysql_query("INSERT INTO `servers` (`name`, `port`, `desc`, `pass`, `ip`, `ip2`) VALUES ('". htmlentities(mysql_real_escape_string($_POST['name'])) ."', '". htmlentities(mysql_real_escape_string($_POST['port'])) ."', '". htmlentities(mysql_real_escape_string($_POST['desc'])) ."', '". htmlentities(mysql_real_escape_string($_POST['pass'])) ."', '". htmlentities(mysql_real_escape_string($_POST['ip'])) ."', '". $_SERVER['REMOTE_ADDR'] ."')") or die('Could not connect: ' . mysql_error()); echo "The server Has been added to the database"; echo "<meta http-equiv=Refresh content=2;url='index.php'>"; } else { echo "The server is offline or does not exist"; echo "<meta http-equiv=Refresh content=2;url='index.php'>"; } } } } i try to add a server to my site thats online. it comes up offline. is there anything wrong with my fsock??? Quote Link to comment Share on other sites More sharing options...
help me please Posted June 5, 2009 Author Share Posted June 5, 2009 anyhelp plz Quote Link to comment Share on other sites More sharing options...
jxrd Posted June 5, 2009 Share Posted June 5, 2009 Why are you suppressing errors when something is obviously going wrong??? Quote Link to comment Share on other sites More sharing options...
help me please Posted June 6, 2009 Author Share Posted June 6, 2009 Why are you suppressing errors when something is obviously going wrong??? yes so whats the error... Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted June 6, 2009 Share Posted June 6, 2009 Well, obviously you should remove the error suppression and perhaps try to check the values of $errorNumber and $errorMessage variables you are defining. How about trying to help yourself? I believe numerous people already told you so. Did you read that document about how to ask questions I referred you to? If you haven't, do that and don't post here before you've read it completely. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.