I figured out, through trial and terror, how to add an IP address to a table via a form variable passed through inet_aton, but I'm having a hard time hammering out the proper syntax for adding a new row to a table, using input from 3 variables, with two of them using inet_aton. The syntax for adding one or several regular varchar entries from a form is no trouble, but inet_aton is using "set", and that doesn't seem to play well with "values".
To add a single inet_aton'd ip address to a table, what's working for me now is:
$sql = "INSERT INTO `sc_alert` SET ip = INET_ATON('".$ip."')";
To get all three into a new row, should I perhaps break them up into seperate querys, something like so:
$sql = "INSERT INTO `customers` ('name') VALUES ('?name')";
$sql = "INSERT INTO `sc_alert` SET begin_range = INET_ATON('".$alpha."')";
$sql = "INSERT INTO `sc_alert` SET end_range = INET_ATON('".$omega."')";
Which is what I tried at first, with no joy, possibly because the three querys maybe weren't all getting to the same row? Any suggestions?