Location: PHPKode > scripts > Dynamic FreeDNS IP Address Update Client > dynamicfreedns_1_1/insert.php
<HTML>
<HEAD>
<TITLE>Dynamic FreeDNS IP Address Updater Results</TITLE></HEAD>
<BODY>
<H2>Dynamic FreeDNS IP Address Updater Domain and Update Code Results:</H2>

<?php

if (!$_POST[domain]) {

	echo "No Domain Name Entered";
	?>
	<BR><BR><TABLE><TR><TD><A HREF="ins.php">Go Back</A></TD></TR></TABLE>
	<?	
	exit;
	}
	
 if(!ereg("[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]", $_POST[domain])) {$error_msg.="The Domain Name you Entered is Invalid<BR><BR>";

echo $error_msg;

	?>
	<BR><BR><TABLE><TR><TD><A HREF="ins.php">Go Back</A></TD></TR></TABLE>
	<?	
	
exit;
	}
	
	
	if (!$_POST[freedns1]) {

	echo "No Update Code from FreeDNS Entered for Domain: ".$_POST[domain];
		
	?>
	<BR><BR><TABLE><TR><TD><A HREF="ins.php">Go Back</A></TD></TR></TABLE>
	<?
	
	exit;
	}
		
	include "dbconnect.php";

$sql="INSERT INTO `domains` (`id`, `domain`) VALUES ('$_POST[id]','$_POST[domain]')";

if (!mysql_query($sql,$con2))
  {
  die('Error: ' . mysql_error());
  }
	
$sql="INSERT INTO `update` (`id`, `freedns1`, `freedns2`, `freedns3`, `freedns4`, `freedns5`, `freedns6`, `freedns7`, `freedns8`, `freedns9`, `freedns10`, `freedns11`, `freedns12`) VALUES ('$_POST[id]','$_POST[freedns1]','$_POST[freedns2]','$_POST[freedns3]','$_POST[freedns4]','$_POST[freedns5]','$_POST[freedns6]','$_POST[freedns7]','$_POST[freedns8]','$_POST[freedns9]','$_POST[freedns10]','$_POST[freedns11]','$_POST[freedns12]')";

if (!mysql_query($sql,$con2))
  {
  die('Error: ' . mysql_error());
  }

?>
<TABLE border="1"><TR><TD colspan="3">
<?
echo "Domain: ".$_POST[domain]."<BR>";
?>
</TD></TR>
<TR><TD>
<?
	if (!$_POST[freedns1] ){}else{
	echo $_POST[domain];
}
?>
</TD><TD>
<?
if (!$_POST[freedns1] ){}else{echo "|      Record Update Code Added: ";  }
?>
</TD><TD>
<?
if (!$_POST[freedns1] ){}else{
echo $_POST[freedns1]."<BR>";
	}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns2] ){}else{
	echo $_POST[domain];
	}
?>
</TD><TD>
<?
if (!$_POST[freedns2] ){}else{echo "|      Record Update Code Added: ";  }
?>
</TD><TD>
<?
if (!$_POST[freedns2] ){}else{
echo $_POST[freedns2]."<BR>";
	}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns3] ){}else{
	echo "ftp.".$_POST[domain];
}
?>
</TD><TD>
<?
if (!$_POST[freedns3] ){}else{echo "|      Record Update Code Added: ";  }
?>
</TD><TD>
<?
if (!$_POST[freedns3] ){}else{
echo $_POST[freedns3]."<BR>";
	}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns4] ){}else{
	echo "irc.".$_POST[domain];
}
?>
</TD><TD>
<?
if (!$_POST[freedns4] ){}else{echo "|      Record Update Code Added: ";  }
?>
</TD><TD>
<?
if (!$_POST[freedns4] ){}else{
echo $_POST[freedns4]."<BR>";
	}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns5] ){}else{
	echo "mail.".$_POST[domain];
}
?>
</TD><TD>
<?
if (!$_POST[freedns5] ){}else{echo "|      Record Update Code Added: ";  }
?>
</TD><TD>
<?
if (!$_POST[freedns5] ){}else{
echo $_POST[freedns5]."<BR>";
	}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns6] ){}else{
	echo "www.".$_POST[domain];
}
?>
</TD><TD>
<?
if (!$_POST[freedns6] ){}else{echo "|      Record Update Code Added: ";  }
?>
</TD><TD>
<?
if (!$_POST[freedns6] ){}else{
echo $_POST[freedns6]."<BR>";
	}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns7] ){}else{
	echo "Update URL 7";
}
?>
</TD><TD>
<?
if (!$_POST[freedns7] ){}else{echo "|      Record Update Code Added: ";  }
	
?>
</TD><TD>
<?
if (!$_POST[freedns7] ){}else{
echo $_POST[freedns7]."<BR>";
}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns8] ){}else{
	echo "Update URL 8";
}
?>
</TD><TD>
<?
if (!$_POST[freedns8] ){}else{echo "|      Record Update Code Added: ";  }
	
?>
</TD><TD>
<?
if (!$_POST[freedns8] ){}else{
echo $_POST[freedns8]."<BR>";
}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns9] ){}else{
	echo "Update URL 9";
}
?>
</TD><TD>
<?
if (!$_POST[freedns9] ){}else{echo "|      Record Update Code Added: ";  }
	
?>
</TD><TD>
<?
if (!$_POST[freedns9] ){}else{
echo $_POST[freedns9]."<BR>";
}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns10] ){}else{
	echo "Update URL 10";
}
?>
</TD><TD>
<?
if (!$_POST[freedns10] ){}else{echo "|      Record Update Code Added: ";  }
	
?>
</TD><TD>
<?
if (!$_POST[freedns10] ){}else{
echo $_POST[freedns10]."<BR>";
}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns11] ){}else{
	echo "Update URL 11";
}
?>
</TD><TD>
<?
if (!$_POST[freedns11] ){}else{echo "|      Record Update Code Added: ";  }
	
?>
</TD><TD>
<?
if (!$_POST[freedns11] ){}else{
echo $_POST[freedns11]."<BR>";
}
?>
</TD></TR>
<TR><TD>
<?
if (!$_POST[freedns12] ){}else{
	echo "Update URL 12";
}
?>
</TD><TD>
<?
if (!$_POST[freedns12] ){}else{echo "|      Record Update Code Added: ";  }
	
?>
</TD><TD>
<?
if (!$_POST[freedns12] ){}else{
echo $_POST[freedns12];
}
?>

</TD></TR></TABLE>
<?
include "closedb.php";

include "footer.php";
?>
Return current item: Dynamic FreeDNS IP Address Update Client