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 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'])) { 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. 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 Link to comment https://forums.phpfreaks.com/topic/118330-solved-unexpected/#findComment-608953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.