you can use varchar, and limit the amount of characters in a name... varchar(15) for example. Or, you can use tinytext, text, blob..
I would use varchar(21). This gives you 17 characters for a name, a period and 3 letter extension. You would need to have some sort of filter to make sure the name fits.. or just use tinytext, whatever fills your boat.
Code: Select all
$query = "INSERT INTO table ('filename') VALUES ('something.pic')";
For further information:http://us2.php.net/mysql_query