[PHP] next?

2004-05-07 Thread Maxi Yedid
Hello

I have products with category number (as a field in the same table).

A user can access any category, and he gets a list of products under that
cat.

What I want is, when the user enters a product, to have a next link that
would allow him to pass to the next record in that selection.

is that possible?

thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Access Database

2004-03-26 Thread Maxi Yedid
Hello

I need data from a Microsoft Access database; however my hosting does not
allow ODBC connections with php; so I was wondering if there is a way to
import the access database to Mysql by a process in the server (like for
example someone uploads the database thru a form, and after the uploading
process automatically migates to Mysql).

would that be possible?

thanks

maxi

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] images

2004-03-16 Thread Maxi Yedid
hello

I'm using the following function from the php manual (user's posts) and get
the following error.

What I do is upload a file from the user and save it in the server; that's
working fine; what I want is to save a copy of the file in thumbnail size.


-
function resampimagejpg($forcedwidth, $forcedheight, $sourcefile, $destfile,$imgcomp)
   {
   $g_imgcomp=100-$imgcomp;
   $g_srcfile=$sourcefile;
   $g_dstfile=$destfile;
   $g_fw=$forcedwidth;
   $g_fh=$forcedheight;

   if(file_exists($g_srcfile))
   {
   $g_is=getimagesize($g_srcfile);
   if(($g_is[0]-$g_fw)=($g_is[1]-$g_fh))
   {
   $g_iw=$g_fw;
   $g_ih=($g_fw/$g_is[0])*$g_is[1];
   }
   else
   {
   $g_ih=$g_fh;
   $g_iw=($g_ih/$g_is[1])*$g_is[0];
   }
   $img_src=imagecreatefromjpeg($g_srcfile);
   $img_dst=imagecreate($g_iw,$g_ih);

   imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $g_iw, $g_ih,$g_is[0], 
$g_is[1]);
   imagejpeg($img_dst, $g_dstfile, $g_imgcomp);
   imagedestroy($img_dst);
   return true;
   }
   else
   return false;
   }
--
** This is where I call the function:

  $archivo = $forma['imagen']['tmp_name'];
  echo(bFile Uploaded Information:/b br . $archivo . br);

  if(is_uploaded_file($archivo)) {
   $directo = /home/public_html/img_products/;
   $archivito = $directo . $forma['imagen']['name'];

   $archivote = /home/public_html/img_small_products/ .
$forma['imagen']['name'];  //

   echo br . $archivito . hr;
move_uploaded_file($forma['imagen']['tmp_name'],$archivito) ;

   resampimagejpg(100, 100, $archivito, $archivote, 0);
= Here I call the function

--

This is the error I get:

Warning: imagejpeg(): Unable to open '/home/public_html/img_small_products/A2_6.jpg' 
for writing in /home/public_html/admin/products.php on line 286

any idea? Thanks!

max



[PHP] creating thumbnails

2004-03-12 Thread Maxi Yedid
hello

I have a form from where you can upload an image.

the script saves the file on the server in a folder.

what I want now is when it saves the file; I also want to save a copy of
that file in another folder with thumbnail size. How do I create a copy
with for example 100 x 100 and save that?

thanks

max

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php