Adding a date to the image name

images php coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Fri Dec 23, 2011 12:39 pm

Adding a date to the image name

Postby omarphp » Fri Dec 23, 2011 12:46 pm

Hello All,

I'm new to php and this my first post here :) my problem is that i want to add the date() function before the image name when the user upload his image. below is the sql statement that is used to save the image name:
if (isset($data['image'])) {
$this->db->query("UPDATE " . DB_PREFIX . "product SET image = '" . $this->db->escape($data['image']) . "' WHERE product_id = '" . (int)$product_id . "'");

Thanks in advance

Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 3 guests