mysql_query("UPDATE hostip SET time = '".date("d/m/y h:m:s")."' WHERE ipaddress = '".$ip."'");

Whats the problem in this query.... Its giving me syntax error...

Date format is incorrect, use Y-m-d format or the mysql NOW() function.

I already used that format in insert query and it worked fine... but in update query it is giving me error. thank you for a nice suggestion to use NOW() function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.