I have a mysql table with the following 2 data fields

...
`regdate` date NOT NULL,
`regip` varchar(30) NOT NULL default '',
.,.,

Is this the correct way to capture both the current date (YYYY-MM-DD) and the IP address.
PHP Code:
$date curdate();
$ip $_SERVER['REMOTE_ADDR'];