FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » Test Forum » php script for insert avatars into mysql
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
php script for insert avatars into mysql [message #7847] Tue, 17 December 2002 19:18
Anonymous   Austria

is that cool ?[ 0 votes ]
1. yes 0 / 0%
2. no 0 / 0%
3. equal 0 / 0%
4. who matters 0 / 0%

<?
$user = "user";
$password = "password";
$hostname = "localhost_or_IP";
$path = 'images/avatars/';
mysql_connect($hostname, $user, $password)
or die("Unable to connect to SQL server");
$this_id = mysql_insert_id();
$dir_handle = @opendir($path) or die("Unable to open $path");
while($file = readdir($dir_handle)) {
if (substr($file, -3) == 'jpg') {
$result = mysql_db_query("fudforum", "INSERT INTO fud23_avatar (img) VALUES ('$file')");
} }
closedir($dir_handle);
?>
[Message index]
 
Read Message
Previous Topic: Muster
Next Topic: test topic
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 22 21:29:43 GMT 2024

Total time taken to generate the page: 0.04863 seconds