Hi Richard,
There is a function called EXPLODE() which satisfies your requirements.
Explode takes a string delimited by a specified character and seperates it into an array.
For example:
$octet = explode($ipaddress, ".");
This will return the following array values for an IP address of 255.255.255.255:
$octet[0] = 255;
$octet[1] = 255;
$octet[2] = 255;
$octet[3] = 255;
So, it is only a question of writing your MySQL query as such:
mysql_query("INSERT INTO [TableName] (octet1,octet2,octet3,octet4) VALUES ('".$octet[0]."','".$octet[1]."','".$octet[2]."','".$octet[3]."')");
Regards,
David