zackcez Posted August 5, 2008 Share Posted August 5, 2008 Well here's the partial of my code: } else { if ($serverCount == '1') { if (!isset($_POST['server_name']) || !isset($_POST['server_ip']) || !isset($_POST['server_features']) { //Line with error //eror message stating please complete all required fields } else { $server_ip = $_POST['server_ip']; $fp = @fsockopen($server_ip, 43594, $errno, $errstr, 10); if ($fp) { $updateData = mysql_query("UPDATE server_status SET server_ip='".$_POST['server_ip']."', server_site='".$_POST['server_site']."', up='1', total_uptime='1', total_downtime='0', server_features='".$_POST['server_features']."' WHERE server_id='".$myData['server_id']."'"); } else { //Error saying something like server offline } } } elseif ($serverCount == '0') { if (!isset($_POST['server_name']) || !isset($_POST['server_ip']) || !isset($_POST['server_features']) { //eror message stating please complete all required fields } else { $server_ip = $_POST['server_ip']; $fp = @fsockopen($server_ip, 43594, $errno, $errstr, 10); if ($fp) { $insertData = mysql_query("INSERT INTO server_status (owner_id, server_ip, server_site, server_features) VALUES('".$userid."', '".$_POST['server_ip']."', '".$_POST['server_site']."', '".$_POST['server_features']."')"); } else { //erorr saying offline } } } else { die(); } } Proabably something stupid i missed, but if anyone can see it, please tell me lol Quote Link to comment https://forums.phpfreaks.com/topic/118330-solved-unexpected/ Share on other sites More sharing options...
Ell20 Posted August 5, 2008 Share Posted August 5, 2008 Replace: if (!isset($_POST['server_name']) || !isset($_POST['server_ip']) || !isset($_POST['server_features']) { With: if (!isset($_POST['server_name']) || !isset($_POST['server_ip']) || !isset($_POST['server_features'])) { Quote Link to comment https://forums.phpfreaks.com/topic/118330-solved-unexpected/#findComment-608950 Share on other sites More sharing options...
akitchin Posted August 5, 2008 Share Posted August 5, 2008 ell20 beat me to this, but i wanted to mention that syntax highlighting would definitely help you here. Quote Link to comment https://forums.phpfreaks.com/topic/118330-solved-unexpected/#findComment-608951 Share on other sites More sharing options...
zackcez Posted August 5, 2008 Author Share Posted August 5, 2008 Lol thanks Quote Link to comment https://forums.phpfreaks.com/topic/118330-solved-unexpected/#findComment-608953 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.