[PHP-DB] php mysql calendar

2009-08-04 Thread nikos
Hello list
Can someone suggest me a php mysql calender, easy configurable for
special needs?
I found some googling but the most of them query records form a specific
table and its impossible to change the sql query.
Thank you in advance
Nikos


RE: [PHP-DB] Bad picture colors

2006-04-28 Thread nikos gatsis
Martin you really save my ass!!
imagecopyresampled() is what I need.
It is 3 times slower but how cares, I run it in a local server.

Thank you vary much!

  _  

 
Γατσής Νίκος - Gatsis Nikos
Web developer
tel.: 2108256721 - 2108256722
fax: 2108256712
email: [EMAIL PROTECTED]
http://www.qbit.gr 

-Original Message-
From: Martin Alterisio [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 10:50 PM
To: nikos
Cc: PHP-mailist (PHP-mailist)
Subject: Re: [PHP-DB] Bad picture colors

2006/4/27, nikos <[EMAIL PROTECTED]>:
>
> Hello list
>
> I use the following code to shrink some photos.
>
> $directory='/var/www/html/offroads/tmp/';
> $dir=opendir($directory);
> while($file=readdir($dir)) {
> $dirfile=$directory.$file;
> if(is_file($dirfile)) {
> copy($dirfile,$directory."sm/sm_".$file);
> $imgReal = ImageCreateFromJPEG($dirfile);
> $x = ImagesX($imgReal);
> $y = ImagesY($imgReal);
> $newX=$x*0.1783;
> $newY=$y*0.1783;
> $img = ImageCreate($newX,$newY);
> ImageCopyResized($img, $imgReal, 0, 0, 0, 0,
> $newX,
> $newY, $x, $y);
> //$newimg=imagecolorstotal($img);
> ImageJPEG($img,$directory."sm/sm_".$file);
> clearstatcache();
> }
> }
> closedir($dir);
>
> My problem is that the color results are very bad. How can I take picture
> with good colors?
>
> Thank you
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Try using imagecopyresampled() instead of imagecopyresized(). It uses a more
precise algorithm which means: more time to complete. But since it seems
you're creating a cache of resized images that won't mather once the resize
its done.

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



RE: [PHP-DB] Bad picture colors

2006-04-28 Thread nikos
Martin you really save my ass!!
imagecopyresampled() is what I need.
It is 3 times slower but how cares, I run it in a local server.

Thank you vary much!

  _  

 
Γατσής Νίκος - Gatsis Nikos
Web developer
tel.: 2108256721 - 2108256722
fax: 2108256712
email: [EMAIL PROTECTED]
http://www.qbit.gr 

-Original Message-
From: Martin Alterisio [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 10:50 PM
To: nikos
Cc: PHP-mailist (PHP-mailist)
Subject: Re: [PHP-DB] Bad picture colors

2006/4/27, nikos <[EMAIL PROTECTED]>:
>
> Hello list
>
> I use the following code to shrink some photos.
>
> $directory='/var/www/html/offroads/tmp/';
> $dir=opendir($directory);
> while($file=readdir($dir)) {
> $dirfile=$directory.$file;
> if(is_file($dirfile)) {
> copy($dirfile,$directory."sm/sm_".$file);
> $imgReal = ImageCreateFromJPEG($dirfile);
> $x = ImagesX($imgReal);
> $y = ImagesY($imgReal);
> $newX=$x*0.1783;
> $newY=$y*0.1783;
> $img = ImageCreate($newX,$newY);
> ImageCopyResized($img, $imgReal, 0, 0, 0, 0,
> $newX,
> $newY, $x, $y);
> //$newimg=imagecolorstotal($img);
> ImageJPEG($img,$directory."sm/sm_".$file);
> clearstatcache();
> }
> }
> closedir($dir);
>
> My problem is that the color results are very bad. How can I take picture
> with good colors?
>
> Thank you
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Try using imagecopyresampled() instead of imagecopyresized(). It uses a more
precise algorithm which means: more time to complete. But since it seems
you're creating a cache of resized images that won't mather once the resize
its done.

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



RE: [PHP-DB] Bad picture colors

2006-04-27 Thread nikos
Im not sure if browsers can "play" pngs Dwight
Thnak you
  _  

 
Γατσής Νίκος - Gatsis Nikos
Web developer
tel.: 2108256721 - 2108256722
fax: 2108256712
email: [EMAIL PROTECTED]
http://www.qbit.gr 

-Original Message-
From: Dwight Altman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 7:41 PM
To: 'nikos'; 'PHP-mailist (PHP-mailist)'
Subject: RE: [PHP-DB] Bad picture colors

Could it be related to quality in JPEG lossy compression?  Can you try PNG
instead?

-----Original Message-
From: nikos [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 11:28 AM
To: PHP-mailist (PHP-mailist)
Subject: [PHP-DB] Bad picture colors

Hello list

I use the following code to shrink some photos.

$directory='/var/www/html/offroads/tmp/';
$dir=opendir($directory);
while($file=readdir($dir)) {
$dirfile=$directory.$file;
if(is_file($dirfile)) {
copy($dirfile,$directory."sm/sm_".$file);
$imgReal = ImageCreateFromJPEG($dirfile);
$x = ImagesX($imgReal);
$y = ImagesY($imgReal);
$newX=$x*0.1783;
$newY=$y*0.1783;
$img = ImageCreate($newX,$newY);
ImageCopyResized($img, $imgReal, 0, 0, 0, 0, $newX,
$newY, $x, $y);
//$newimg=imagecolorstotal($img);
ImageJPEG($img,$directory."sm/sm_".$file);
clearstatcache();
}
}
closedir($dir);

My problem is that the color results are very bad. How can I take picture
with good colors?

Thank you

-- 

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



[PHP-DB] Bad picture colors

2006-04-27 Thread nikos
Hello list

I use the following code to shrink some photos.

$directory='/var/www/html/offroads/tmp/';
$dir=opendir($directory);
while($file=readdir($dir)) {
$dirfile=$directory.$file;
if(is_file($dirfile)) {
copy($dirfile,$directory."sm/sm_".$file);
$imgReal = ImageCreateFromJPEG($dirfile);
$x = ImagesX($imgReal);
$y = ImagesY($imgReal);
$newX=$x*0.1783;
$newY=$y*0.1783;
$img = ImageCreate($newX,$newY);
ImageCopyResized($img, $imgReal, 0, 0, 0, 0, $newX,
$newY, $x, $y);
//$newimg=imagecolorstotal($img);
ImageJPEG($img,$directory."sm/sm_".$file);
clearstatcache();
}
}
closedir($dir);

My problem is that the color results are very bad. How can I take picture
with good colors?

Thank you

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



[PHP-DB] striping \n or \r

2006-02-15 Thread nikos gatsis
Hello list

Does anybody knows how to strip new lines (\n) or \r from a string?
I try 
$lead=str_replace('(0x0D)',' ',str_replace('(0x0A)',' ',$lead));

or 
$lead=str_replace('\n',' ',str_replace('\r',' ',$lead));

with no results

Thank you
Nikos

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



[PHP-DB] mysql_client_encoding in greek

2006-02-12 Thread nikos gatsis
Hello list.
 
I install mysql 4.1.7 and php 5.1.2 on win2000. I use apache 2.0.45
My problem is that the result from dbs are like ??.
Its obvious that is a character set problem.
The dbs are set as Greek, as the default-character-set. In php.ini is
set default_charset = "iso-8859-7" which is the Greek model.
But when I run mysql_client_encoding I got swedish_something!
 
How can I solve these?
Thank you in advance
 


RE: [PHP-DB] Shrinking gifs.

2005-06-21 Thread nikos
Thank you Martin
I install new gd, reconfigure php and now is running OK.

But, it was a mass to realize that shortening gifs results to loss
transparency(!).
So I turn them all to jpegs and use the ImageCreateFromJPG instead.
My code looks like this:





-Original Message-
From: Martin Norland [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 21, 2005 4:31 PM
To: PHP-mailist (PHP-mailist)
Subject: Re: [PHP-DB] Shrinking gifs. .


nikos wrote:
> Hello list
> I'd like to make a thumbnaile list using some gifs.
> I use the following code but I got error (Call to undefined function:
> imagecreatefromgif() ).
> Does anybody knows what's wrong?
[snip]
> RH-9 Linux
> Apache httpd-2.0.40-21.11
> PHP Version 4.3.11
> gd-1.8.4-11

gif support was removed from gd in 1.6*.  It was re-added in 2.0.28. 
This is all due to the Unisys patent on the LZW compression that gifs
use.

short answer - you just don't have support for making gifs, it was a 
licensing issue at the time the software you're using was 
released/packaged.  Upgrade gd.

* funny, since gd stood for 'gif draw' originally.

cheers,
-- 
- Martin Norland, Sys Admin / Database / Web Developer, International 
Outreach x3257
The opinion(s) contained within this email do not necessarily represent 
those of St. Jude Children's Research Hospital.

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

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



RE: [PHP-DB] Shrinking gifs

2005-06-21 Thread nikos
I'm afraid I dont know such command
 

-Original Message-
From: Darryl Steyn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 21, 2005 2:50 PM
To: nikos
Subject: Re: [PHP-DB] Shrinking gifs


afaik, you need to use imagemagik to resize a gif




[PHP-DB] Shrinking gifs

2005-06-21 Thread nikos
Hello list
I'd like to make a thumbnaile list using some gifs.
I use the following code but I got error (Call to undefined function:
imagecreatefromgif() ).
Does anybody knows what's wrong?

function viewsm($ph) {
$ph='photo/'.$ph;
echo $ph;
$imgReal = imagecreatefromgif($ph);
$x = ImagesX($imgReal);
$y = ImagesY($imgReal);
$newX=$x*0.50;
$newY=$y*0.50;
$img = ImageCreate($newX,$newY);
ImageCopyResized($img, $imgReal, 0, 0, 0, 0, $newX, $newY, $x,
$y);
return $img;
}

RH-9 Linux
Apache httpd-2.0.40-21.11
PHP Version 4.3.11
gd-1.8.4-11

Thanks
Nikos

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



RE: [PHP-DB] Mass mail

2004-09-20 Thread nikos
Thank you Miles

Do you put the mail() function in a while{} loop for each mail address
or make a "bactch" of them?

-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 20, 2004 4:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mass mail


Yes - we're doing 900 per night.
It's a one page letter providing the day's headlines with a link to
where 
subscribers can view it.

Viewing is done through a Flash movie so as to provide as secure an 
environment as possible. But now we're digressing into digital rights 
management.

Code itself is nothing special; fetch names and heads from the database,

build the list of heads, then run down the returned set of names and
email 
addresses, creating the "To;" portion of the header, then bung the whole

thing into the mail() function. Set the appropriate field in the
database 
with whateer mail() returns, same info name, email & result of mail() is

fed to a browser for user feedback.

Whole thing takes about 4 min to run. After each message is sent 
set_time_limit(20) is called so whole thing doesn't time out.

You may also want to look at the mailing functions which Manuel Lemos
has 
on his site.

HTH - Miles Thompson

At 10:18 AM 9/20/2004, nikos wrote:


>Hello list
>
>A client of mine sends thousands of mails as newsletters and wants as 
>to make an Interface to admin this list. Its easy to put this mail list

>in a MySQL table and make the interface on PHP language and with mail()

>function to send a newsletter.
>
>The question is that if this function can handle a thousand mail or 
>more or there is a most appropriate way
>
>Thank you
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

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

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



RE: [PHP-DB] Re: Mass mail

2004-09-20 Thread nikos
Hello Ben, thank you for answering.

I concern about the execution time of the script. 
If I do a while{} and there send a mail() for each of mail addresses it
might take some minutes.


-Original Message-
From: Ben Galin [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 20, 2004 5:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: Mass mail



On Sep 20, 2004, at 7:13 AM, Manuel Lemos wrote:

> Now, for the actual composing and sending of the newsletters, there
> are some optimizations that can be done depending on whether the 
> newsletters  are going to be personalized (avoid it at all costs if 
> you can) or not.

May I ask why?  Are you referring to the additional time it would take 
the script to run or to a security issue or something else?

Thanks, Ben

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

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



[PHP-DB] Mass mail

2004-09-20 Thread nikos


Hello list

A client of mine sends thousands of mails as newsletters and wants as to
make an Interface to admin this list. Its easy to put this mail list in
a MySQL table and make the interface on PHP language and with mail()
function to send a newsletter.

The question is that if this function can handle a thousand mail or more
or there is a most appropriate way

Thank you

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



Re: [PHP-DB] Uploading files

2004-02-27 Thread nikos
Im just doing a copy(...) in first place. In second Ill put some information
in MySQL.

I've made application inserting photos in BLOB columns without problems.
Now I want to copy big files (>5M) in my server.


- Original Message -
From: "Daniel Brunner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 11:22 PM
Subject: Re: [PHP-DB] Uploading files


> Hello,
>
>
> Are you uploading files into MYSQL or any other DB??
>
>
> Or are you uploading the files to a directory and inserting the
> location of the file in the database??
>
>
>
> Dan
>
>
> On Feb 27, 2004, at 3:19 PM, [EMAIL PROTECTED] wrote:
>
> > Pavel my form works fine with files < 1M
> >
> > - Original Message -
> > From: "Pavel Lobovich" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: "PHP-mailist" <[EMAIL PROTECTED]>
> > Sent: Friday, February 27, 2004 6:50 PM
> > Subject: Re: [PHP-DB] Uploading files
> >
> >
> >>> If your on a slow connection, it might be timing out.
> >>>
> >>> Try putting:
> >>>
> >>> set_time_limit(0);
> >>>
> >>> At the top of the page where the file is being uploaded to (not
> >>> from),
> >>> and see if that helps.
> >>
> >> You dont have to do it. Script execution will not start before all
> >> posted files are uploaded. If your browser refuses a connection and
> >> sends "Server not found" then check your form (especially action
> >> attribute ).
> >>
> >> Sorry for my english.
> >>
> >> Pavel.
> >>
> >>
> >>
> >>>
> >>>
> >>> On Fri, 2004-02-27 at 10:29, nikos wrote:
> >>>> It is allready 8M
> >>>>
> >>>> - Original Message -
> >>>> From: "Adam Voigt" <[EMAIL PROTECTED]>
> >>>> To: "nikos" <[EMAIL PROTECTED]>
> >>>> Cc: "PHP-mailist" <[EMAIL PROTECTED]>
> >>>> Sent: Friday, February 27, 2004 5:13 PM
> >>>> Subject: Re: [PHP-DB] Uploading files
> >>>>
> >>>>
> >>>>> Your max post size needs to be upped to, try making it 6M and see
> >>>>> if
> >>>>> that makes a difference.
> >>>>>
> >>>>>
> >>>>> On Fri, 2004-02-27 at 10:05, nikos wrote:
> >>>>>> Hello list
> >>>>>>
> >>>>>> Allthough I set my PHP.in upload_max_file=4M my system refused to
> > upload
> >>>>>> files bigger than 1M and the browser send an "server not found"
> > error.
> >>>>>>
> >>>>>> Does anybody know anything about that?
> >>>>>> Thank you
> >>>>> --
> >>>>>
> >>>>> Adam Voigt
> >>>>> [EMAIL PROTECTED]
> >>>>>
> >>>>> --
> >>>>> PHP Database Mailing List (http://www.php.net/)
> >>>>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>>>>
> >>> --
> >>>
> >>> Adam Voigt
> >> [EMAIL PROTECTED]
> >>
> >> --
> >> PHP Database Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



Re: [PHP-DB] Uploading files

2004-02-27 Thread nikos
Adam, everything happens "rapidly". I dont think that the connection is the
problem. I work in a local lan.
Thank you

- Original Message -
From: "Adam Voigt" <[EMAIL PROTECTED]>
To: "nikos" <[EMAIL PROTECTED]>
Cc: "PHP-mailist" <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 5:38 PM
Subject: Re: [PHP-DB] Uploading files


> If your on a slow connection, it might be timing out.
>
> Try putting:
>
> set_time_limit(0);
>
> At the top of the page where the file is being uploaded to (not from),
> and see if that helps.
>
>
> On Fri, 2004-02-27 at 10:29, nikos wrote:
> > It is allready 8M
> >
> > - Original Message -
> > From: "Adam Voigt" <[EMAIL PROTECTED]>
> > To: "nikos" <[EMAIL PROTECTED]>
> > Cc: "PHP-mailist" <[EMAIL PROTECTED]>
> > Sent: Friday, February 27, 2004 5:13 PM
> > Subject: Re: [PHP-DB] Uploading files
> >
> >
> > > Your max post size needs to be upped to, try making it 6M and see if
> > > that makes a difference.
> > >
> > >
> > > On Fri, 2004-02-27 at 10:05, nikos wrote:
> > > > Hello list
> > > >
> > > > Allthough I set my PHP.in upload_max_file=4M my system refused to
upload
> > > > files bigger than 1M and the browser send an "server not found"
error.
> > > >
> > > > Does anybody know anything about that?
> > > > Thank you
> > > --
> > >
> > > Adam Voigt
> > > [EMAIL PROTECTED]
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> --
>
> Adam Voigt
> [EMAIL PROTECTED]
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



Re: [PHP-DB] Uploading files

2004-02-27 Thread nikos
Pavel my form works fine with files < 1M

- Original Message -
From: "Pavel Lobovich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "PHP-mailist" <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 6:50 PM
Subject: Re: [PHP-DB] Uploading files


> > If your on a slow connection, it might be timing out.
> >
> > Try putting:
> >
> > set_time_limit(0);
> >
> > At the top of the page where the file is being uploaded to (not from),
> > and see if that helps.
>
> You dont have to do it. Script execution will not start before all
> posted files are uploaded. If your browser refuses a connection and
> sends "Server not found" then check your form (especially action
> attribute ).
>
> Sorry for my english.
>
> Pavel.
>
>
>
> >
> >
> > On Fri, 2004-02-27 at 10:29, nikos wrote:
> > > It is allready 8M
> > >
> > > - Original Message -
> > > From: "Adam Voigt" <[EMAIL PROTECTED]>
> > > To: "nikos" <[EMAIL PROTECTED]>
> > > Cc: "PHP-mailist" <[EMAIL PROTECTED]>
> > > Sent: Friday, February 27, 2004 5:13 PM
> > > Subject: Re: [PHP-DB] Uploading files
> > >
> > >
> > > > Your max post size needs to be upped to, try making it 6M and see if
> > > > that makes a difference.
> > > >
> > > >
> > > > On Fri, 2004-02-27 at 10:05, nikos wrote:
> > > > > Hello list
> > > > >
> > > > > Allthough I set my PHP.in upload_max_file=4M my system refused to
upload
> > > > > files bigger than 1M and the browser send an "server not found"
error.
> > > > >
> > > > > Does anybody know anything about that?
> > > > > Thank you
> > > > --
> > > >
> > > > Adam Voigt
> > > > [EMAIL PROTECTED]
> > > >
> > > > --
> > > > PHP Database Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > --
> >
> > Adam Voigt
> [EMAIL PROTECTED]
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



Re: [PHP-DB] Uploading files

2004-02-27 Thread nikos

It is allready 8M

- Original Message - 
From: "Adam Voigt" <[EMAIL PROTECTED]>
To: "nikos" <[EMAIL PROTECTED]>
Cc: "PHP-mailist" <[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 5:13 PM
Subject: Re: [PHP-DB] Uploading files


> Your max post size needs to be upped to, try making it 6M and see if
> that makes a difference.
>
>
> On Fri, 2004-02-27 at 10:05, nikos wrote:
> > Hello list
> >
> > Allthough I set my PHP.in upload_max_file=4M my system refused to upload
> > files bigger than 1M and the browser send an "server not found" error.
> >
> > Does anybody know anything about that?
> > Thank you
> -- 
>
> Adam Voigt
> [EMAIL PROTECTED]
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



[PHP-DB] Uploading files

2004-02-27 Thread nikos
Hello list

Allthough I set my PHP.in upload_max_file=4M my system refused to upload
files bigger than 1M and the browser send an "server not found" error.

Does anybody know anything about that?
Thank you

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



Re: [PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Nikos Gatsis
Thank you Recardo
Is possible to know the dimensions (x, y) of the stored image?

I try ImageCreateFromJPEG($mystoredpict) and ImagesX($mystoredpict) but
dosen't work

- Original Message - 
From: "Ricardo Lopes" <[EMAIL PROTECTED]>
To: "Nikos Gatsis" <[EMAIL PROTECTED]>
Cc: "PHP DB" <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 4:41 PM
Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db


> To know the size of the images you could use a library like GD or
something
> like that.
>
> You can also store one big image in your database and use the graphics
> library to create a temporary image that will be send to the client with
the
> size / scale you want to send to the client. This way your 50k or 5000k
> image will be used to create a small image ~5k that will be send to the
> client.
>
> Hope this helps
>
> - Original Message -
> From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> To: "PHP-mailist" <[EMAIL PROTECTED]>
> Sent: Monday, February 16, 2004 2:23 PM
> Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db
>
>
> > Thanx
> > but, first I dont know the real size of the stored pictures and second I
> > dont think that is a good idea to shrink a 50k photo.
> >
> > - Original Message -
> > From: "Frisley Velasquez" <[EMAIL PROTECTED]>
> > To: "Nikos Gatsis" <[EMAIL PROTECTED]>
> > Sent: Monday, February 16, 2004 4:16 PM
> > Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db
> >
> >
> > > Hi, the only thing you need to do, is to add a varible where you
specify
> > the
> > > width and the height of the pics. then add the var in the query. This
to
> > be
> > > parsed not just as a  but as  > > height="...">, so your images will be the width and height you want.
> > >
> > > Or if you would like dif. sizes, add a column in the table so you can
> > enter
> > > the width and height of each one, so you can call this ones(width and
> > > height) in each case.
> > >
> > > - Original Message -
> > > From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> > > To: "PHP-mailist" <[EMAIL PROTECTED]>
> > > Sent: Monday, February 16, 2004 6:56 AM
> > > Subject: [PHP-DB] - Resizeing Images stored in mysql db
> > >
> > >
> > > > Hello list
> > > >
> > > > I store images in a mysql table and use then in a web site.
> > > >
> > > > Is possible to change the size of these images;
> > > >
> > > >
> > > > Following the code I'm allredy use.
> > > >
> > > >  $query="SELECT photoxl FROM books WHERE books_id = '$books_id'";
> > > >  $result=mysql_db_query($database, $query, $conn) or Die
> > > > ("...".mysql_error());
> > > >  list($photoxl)=mysql_fetch_row($result);
> > > >  $type = $photoxl_type;
> > > >  if (!empty($photoxl)) {
> > > >   header("Content-Type: {$type}");
> > > >   echo $photoxl;
> > > >  }
> > > >
> > > > Thank you  in advance
> > > >
> > > > --
> > > > PHP Database Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



Re: [PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Nikos Gatsis
Thanx
but, first I dont know the real size of the stored pictures and second I
dont think that is a good idea to shrink a 50k photo.

- Original Message - 
From: "Frisley Velasquez" <[EMAIL PROTECTED]>
To: "Nikos Gatsis" <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 4:16 PM
Subject: Re: [PHP-DB] - Resizeing Images stored in mysql db


> Hi, the only thing you need to do, is to add a varible where you specify
the
> width and the height of the pics. then add the var in the query. This to
be
> parsed not just as a  but as  height="...">, so your images will be the width and height you want.
>
> Or if you would like dif. sizes, add a column in the table so you can
enter
> the width and height of each one, so you can call this ones(width and
> height) in each case.
>
> - Original Message -
> From: "Nikos Gatsis" <[EMAIL PROTECTED]>
> To: "PHP-mailist" <[EMAIL PROTECTED]>
> Sent: Monday, February 16, 2004 6:56 AM
> Subject: [PHP-DB] - Resizeing Images stored in mysql db
>
>
> > Hello list
> >
> > I store images in a mysql table and use then in a web site.
> >
> > Is possible to change the size of these images;
> >
> >
> > Following the code I'm allredy use.
> >
> >  $query="SELECT photoxl FROM books WHERE books_id = '$books_id'";
> >  $result=mysql_db_query($database, $query, $conn) or Die
> > ("...".mysql_error());
> >  list($photoxl)=mysql_fetch_row($result);
> >  $type = $photoxl_type;
> >  if (!empty($photoxl)) {
> >   header("Content-Type: {$type}");
> >   echo $photoxl;
> >  }
> >
> > Thank you  in advance
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>

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



[PHP-DB] - Resizeing Images stored in mysql db

2004-02-16 Thread Nikos Gatsis
Hello list

I store images in a mysql table and use then in a web site.

Is possible to change the size of these images;


Following the code I'm allredy use.

 $query="SELECT photoxl FROM books WHERE books_id = '$books_id'";
 $result=mysql_db_query($database, $query, $conn) or Die
("...".mysql_error());
 list($photoxl)=mysql_fetch_row($result);
 $type = $photoxl_type;
 if (!empty($photoxl)) {
  header("Content-Type: {$type}");
  echo $photoxl;
 }

Thank you  in advance

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



Re: [PHP-DB] Something ease... I guess

2003-12-16 Thread Nikos Gatsis
Thanx everybody

It was easy indeed!

- Original Message - 
From: "Martin Marques" <[EMAIL PROTECTED]>
To: "Nikos Gatsis" <[EMAIL PROTECTED]>; "PHP-mailist" <[EMAIL PROTECTED]>
Sent: Tuesday, December 16, 2003 3:55 PM
Subject: Re: [PHP-DB] Something ease... I guess


> El Mar 16 Dic 2003 10:44, Nikos Gatsis escribiσ:
> > Hello list
> >
> > I have 4 variables, $check1, $check2, $check3, $check4
> >
> > How can i use a for loop to echo each one.
> >
> > (lets say echo $check($i)...)
>
> foreach(list($check1, $check2,...) AS $c){
> echo $c;
> }
>
>
> -- 
>  15:20:02 up 16 days, 21:36,  3 users,  load average: 1.37, 0.91, 0.69
> -
> Martνn Marquιs| select 'mmarques' || '@' || 'unl.edu.ar'
> Centro de Telematica  |  DBA, Programador, Administrador
>  Universidad Nacional
>   del Litoral
> -
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



[PHP-DB] Something ease... I guess

2003-12-16 Thread Nikos Gatsis
Hello list

I have 4 variables, $check1, $check2, $check3, $check4

How can i use a for loop to echo each one.

(lets say echo $check($i)...)

Thanx

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



Re: [PHP-DB] password generator

2003-12-11 Thread Nikos Gatsis
Thanx you all guys, great tools indeed!

- Original Message - 
From: "Roger Spears" <[EMAIL PROTECTED]>
To: "php database" <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 6:33 PM
Subject: Re: [PHP-DB] password generator


> Here's one I've used recently with success
> 
> http://www.devhood.com/tools/tool_details.aspx?tool_id=784
> 
> Thanks,
> Roger
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



[PHP-DB] password generator

2003-12-10 Thread Nikos Gatsis


 
Hello list

Is there any PHP script that generate password with digits from [a-zA-Z0-9] to suggest 
me?
Thanx

[PHP-DB] {PHP-DB} password generator

2003-12-10 Thread Nikos Gatsis


Hello list

Is there any PHP script that generate password with digits from [a-zA-Z0-9] to suggest 
me?
Thanx

[PHP-DB] Re: Transfering large mysql database

2003-12-09 Thread Nikos Gatsis
Why dont you gzip the files of database and write them in a CD?
Its safe and (maybe) faster if the tables are large files.

Nikos

> - Original Message -
> From: "J.Veenhuijsen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 09, 2003 1:13 PM
> Subject: [PHP-DB] Re: Transfering large mysql database
>
>
> > You can use phpmyadmin to export structure and data.
> > You have to be aware that the first line of the output
> > has to commented (# at start of line)
> > Otherwise phpmyadmin generates an error.
> >
> > Jochem
> >
> >
> > Harlan Lax wrote:
> >
> > > Does anyone have a recomendation on an app that will help me transfer
a
> > > large table from one host provider to another.  I have tried
phpmyadmin
> but
> > > if I export to SQL the import doesn't seem to work.  If I export to
csv
> I
> > > lose the column formating.
> > >
> > > On one host I have access to the root and on the other I am very
limted.
> > >
> > > Thanks
> > > Harlan
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>

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



Re: [PHP-DB] character problem with mssql

2003-12-06 Thread Nikos Gatsis
If problem is in your database use htmlentities(). It while translate all
characters to HTML entities (check PHP manual).
Else you should check web page's character code.
Nikos

> Hi;
>
> I use php and mssql. I have got a character problem. I must use turkish
> chracters. When I select datas from database it works true and I can see
> turkish characters but when I want to insert new datas to database it set
> wrong character.
>
> For example "ÞÝ" characetrs look like "?" How can I solve this problem? My
> data type is char 100.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



Re: [PHP-DB] eregi sentence

2003-12-01 Thread Nikos Gatsis
Ivan hello
Yoy really help me a lot!
Thanx

- Original Message - 
From: "Ivan Fomichev" <[EMAIL PROTECTED]>
To: "Nikos Gatsis" <[EMAIL PROTECTED]>
Sent: Sunday, November 30, 2003 6:56 PM
Subject: Re: [PHP-DB] eregi sentence


> Hello Nikos,
>
> Sunday, November 30, 2003, 10:29:19 AM, you wrote:
>
> NG> Can somebody tell me what is wrong with the following?
> NG> $body=eregi_replace("]*)>(.+)", " NG> target=\"_blank\" class=\"down_txt\">\\3",
$body);
>
> 1) /.+/ is too greedy. You should use something like /[^"]+/ or /.+?/
instead
>(second is supported only in Perl-compatible regexps). The best
solution
>could be /[^'"]+?/ however.
> 2) /
>$body = preg_replace(
>'#<[Aa]\s[^>]*?[Hh][Rr][Ee][Ff]\s*=\s*([\'"])([^\'">]+?)\1[^>]*?>'
.
>'([^<]*?)]*?>#s',
>'' .
>'\3',
>$body
>);
>
>This regexp is not perfect, but I hope it has enough margin of safety,
at
>least if your HTML code is more or less correct. E. g., all href values
>must be quoted and '<', '>', '"' and "'" without special meaning must
be
>written as HTML entities.
>
> -- 
> Best regards,
>  Ivanmailto:[EMAIL PROTECTED]
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



[PHP-DB] eregi sentence

2003-11-30 Thread Nikos Gatsis
Hello list.

Can somebody tell me what is wrong with the following?

$body=eregi_replace("]*)>(.+)", "\\3", $body);

where $body is comming from a MySQL BLOB with text.
All I want to do is to "replace" the " or
" whith

but it doesn't seems to work right.

For example, in the same text replace the http://www.eclipse.org/";>
but not the http://developers.sun.com/prodtech/javatools/community/";>

Please help
Thank you

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



[PHP-DB]

2003-04-02 Thread nikos
Title: Glacier



 
Is there a way to transfer mysql data to xml files?
I have to use database contents from a static contition, lets say, 
presentating a site from cd-rom
If is an other way I'll like to deal with
Thanx
 


QbitΓατσής 
Νίκος - Gatsis NikosWeb developertel.: 2108256721 - 
2108256722fax: 2108256712email: 
[EMAIL PROTECTED]http://www.qbit.gr 
 


[PHP-DB]

2003-04-01 Thread nikos
Title: Glacier



Hello everyone.
This is a litle of topic but I need your help. Is there any toutorial or a 
good documentation for mailman?
www.list.org doesn't help me much
Thanx


QbitΓατσής 
Νίκος - Gatsis NikosWeb developertel.: 2108256721 - 
2108256722fax: 2108256712email: 
[EMAIL PROTECTED]http://www.qbit.gr 
 


[PHP-DB]

2003-02-18 Thread nikos
GlacierHi List
I run mysql 3,23.. in a RH 7.2 Linux web server.=20
Sudenly mysql crash and non of my db's runnig. Mysqld (re) starts [OK].=20
The message in my browser is that mysql.sock file is missing
Does knows why? What is this file?
Thanx






[PHP-DB]

2003-02-12 Thread nikos
Hi List!

I'm trying to Drop a Table and aI get an error as follows:
"Error on delete of './horceng/oikology.MYI' (Errcode: 13)"

Does anybody know what is the error 13?
Thanks


Qbit
&Ggr;&agr;&tgr;&sgr;&eeacgr;&sfgr; &Ngr;&iacgr;&kgr;&ogr;&sfgr; - Gatsis Nikos
Web developer
tel.: 2108256721 - 2108256722
fax: 2108256712
email: [EMAIL PROTECTED]
http://www.qbit.gr 



[PHP-DB]

2003-02-12 Thread nikos
Hi List!

I'm trying to Drop a Table and aI get an error as follows:
"Error on delete of './horceng/oikology.MYI' (Errcode: 13)"

Does anybody know what is the error 13?
Thanks


Qbit
&Ggr;&agr;&tgr;&sgr;&eeacgr;&sfgr; &Ngr;&iacgr;&kgr;&ogr;&sfgr; - Gatsis Nikos
Web developer
tel.: 2108256721 - 2108256722
fax: 2108256712
email: [EMAIL PROTECTED]
http://www.qbit.gr 



[PHP-DB] Ordering...

2003-02-10 Thread nikos
Hi list!
How can I "Order By" in MySQL a column asceding and an other column desceding?



Qbit
&Ggr;&agr;&tgr;&sgr;&eeacgr;&sfgr; &Ngr;&iacgr;&kgr;&ogr;&sfgr; - Gatsis Nikos
Web developer
tel.: 2108256721 - 2108256722
fax: 2108256712
email: [EMAIL PROTECTED]
http://www.qbit.gr 



Re: [PHP-DB] page splitting

2003-02-02 Thread Nikos Gatsis
Or  try the attached code
Nikos

- Original Message -
From: "Maxim Maletsky" <[EMAIL PROTECTED]>
To: "Shahar Tal" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, February 02, 2003 7:30 PM
Subject: Re: [PHP-DB] page splitting


>
> you should get a class that does that. PHP Classes (phpclasses.org) is a
> good place to start
>
> --
> Maxim Maletsky
> [EMAIL PROTECTED]
>
>
> On Sun, 2 Feb 2003 17:37:12 +0200 "Shahar Tal" <[EMAIL PROTECTED]>
wrote:
>
> > Hello all!
> >
> > First of all i'd like to say thanks. many of you helped me here a lot,
and I
> > can't thank you enough for it.
> >
> > For my next question.
> > I have a query. it takes up all the rows from a certain database, and
> > displays them.
> > I want to do the simple thing, page splitting. make it show a certain
number
> > of records everytime, let's say, 10, and then
> > automatically show the links like [<<] 1 2 3 [>>] to move between the
pages.
> >
> > I'm looking for the most simple and easy way to do it, as it should be a
> > very easy thing to do.
> >
> > Thank you all, once again :)
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>





0) {
$url="$PHP_SELF?screen=$screen-1;
echo " << \n";
}
for ($i=0; $i<$pages; $i++) {
$I=$i+1;
$url="$PHP_SELF?screen=" . $i; 
 
echo "".$I."";
}
if ($screen < $pages-1) {
$url="$PHP_SELF?screen=";
$url .= $screen+1;
echo " >> ";
}
?>

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


[PHP-DB] - Update help

2003-01-30 Thread nikos
Hello list
I've download some patches for PHP 4.0.6. and I dont know how to use it.
For example rfc1867.c.diff-4.0.6 file how can I "run" it and do the update?
I have PH 7,2 Linux and Apache 1,32
Thank you



[PHP-DB] Find and replace in a string

2003-01-26 Thread Nikos Gatsis
Hi list!
I have a sting that contains some occurances of "{...}" sub-strings, where "" is 
some text.
Which is the way to find and replace the "{...}" with an other of my own.
This sub-strings start with "{" and end with "}".
Thanks




[PHP-DB] - mail() with atachment

2003-01-12 Thread Nikos Gatsis
Hello list!
Does anybody knows how to send a mail through a php page using mail() function 
including an attachment file?
Thanx
Nikos



Re: [PHP-DB] SHOW PICTURE FROM DATABASE

2002-12-31 Thread nikos
Steve

a. its a typo of mine in the e-mail
b. the "_type" is the type of the binary data. From the PHP manual read: 
"$userfile_type - The mime type of the file if the browser provided this information. 
An example would be "image/gif"
c. I'll try the file size

Thank you anyway

  - Original Message - 
  From: Steve Cayford 
  To: Nikos Gatsis 
  Cc: PHP-mailist 
  Sent: Tuesday, December 31, 2002 1:07 AM
  Subject: Re: [PHP-DB] SHOW PICTURE FROM DATABASE


  Some suggestions...

  On Monday, December 30, 2002, at 03:55  PM, Nikos Gatsis wrote:
  > where showpict.php:
  >
  >  $query="SELECT pict FROM pict WHERE pro_id= '$pro_id";

  (You're missing an end ' there, but apparently that's not the problem)

  >  $result=mysql_db_query($database, $query, $conn) or Die 
  > (mysql_error());
  >  list($photo)=mysql_fetch_row($result);
  >  $type = $photo_type;

  Where did the $photo_type variable come from? What's in it?

  >  if (!empty($photo)) {
  >   header("Content-Type: {$type}");

  I believe this header should be in the form header("Content-Type: 
  image/jpeg") or whatever image type you have.

  You should probably include an additional header
  header("Content-Length: " . strlen($photo));

  >   echo $photo;
  >  }
  >
  > THANX
  > Nikos


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




Re: [PHP-DB] SHOW PICTURE FROM DATABASE

2002-12-31 Thread nikos
I've done it allredy!
It brings up a line of unknown characters

  - Original Message - 
  From: John W. Holmes 
  To: 'Nikos Gatsis' ; 'PHP-mailist' 
  Sent: Tuesday, December 31, 2002 1:08 AM
  Subject: RE: [PHP-DB] SHOW PICTURE FROM DATABASE


  > I have a php script that call binary data of pictures stored in
  database.
  > The script works fine in IE but not in Netscape (ver 4.7, &  6.01).
  > Any ideas?
  > 
  > -
  > the html tag is like: 
  > 
  > where showpict.php:
  > 
  >  $query="SELECT pict FROM pict WHERE pro_id= '$pro_id";
  >  $result=mysql_db_query($database, $query, $conn) or Die
  (mysql_error());
  >  list($photo)=mysql_fetch_row($result);
  >  $type = $photo_type;
  >  if (!empty($photo)) {
  >   header("Content-Type: {$type}");
  >   echo $photo;
  >  }

  Call up showpict.php?pro_id=1 in Netscape and see if you get an error.
  Just type it in and call it up by itself.

  ---John W. Holmes...

  PHP Architect - A monthly magazine for PHP Professionals. Get your copy
  today. http://www.phparch.com/





[PHP-DB] SHOW PICTURE FROM DATABASE

2002-12-30 Thread Nikos Gatsis
Hello there and Marry Christmas!

I have a php script that call binary data of pictures stored in database. 
The script works fine in IE but not in Netscape (ver 4.7, &  6.01).
Any ideas?

-
the html tag is like: 

where showpict.php:

 $query="SELECT pict FROM pict WHERE pro_id= '$pro_id";
 $result=mysql_db_query($database, $query, $conn) or Die (mysql_error());
 list($photo)=mysql_fetch_row($result);
 $type = $photo_type;
 if (!empty($photo)) {
  header("Content-Type: {$type}");
  echo $photo;
 }

THANX
Nikos



[PHP-DB] PDFlib

2002-11-25 Thread nikos
Hello everybody
Does evrybody know if there is a free version of PDFlib
Thanx
Nikos



[PHP-DB] Array question

2002-11-08 Thread nikos
Does anybody know how to remove an item from an array?
Let's say

$array('banna', 'apple','cherry')
foreach ($array as $value) {
if ($value=='chery') DELETE $value FROM $array
...

Thanks




[PHP-DB] default-character-set problem

2002-11-06 Thread nikos
Hello there...
I have a problem with sort order. I use greek and english characters.
The manual says to put the following lines to my.cnf:
[client]
character-sets-dir=/usr/local/mysql/share/mysql/charsets
default-character-set=greek

i restart the demon but the problem still exist.

I have 3.23.49 ver on Red Hat Linux 7.2

Thanx list




Re: [PHP-DB] to determine how much server space left on the web server?

2002-09-27 Thread nikos

exec command return only the last row of the result.
Try backtrics (``) operators (not '' quots):

e.g.
$output = 'df -h';
echo "$output";


> 
> exec("df -h");
>
> ?>
>
> On Tue, 17 Sep 2002, Bo wrote:
>
> > Any ideas of how to write a php script to determine the disk space left
in
> > my account at my web server?
> >
> >
> >
> >
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP-DB] Sessions and their function

2002-09-12 Thread nikos

You sould register sessions first, and if have been registered, are passing
with session_start() in each page at the top, before the  tag..

If you want to pass variables from a page to another, put them in the url:
test.php?var=3&name=george (e.g.)

Be sure that the page you refer is dynamic (.php)

-

- Original Message -
From: "LOUD, Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 12, 2002 12:02 PM
Subject: [PHP-DB] Sessions and their function


> Hi,
>
> I know this my sound stupid but here it goes..
>
> Can sessions be used to pass variables from one page to the next to create
> persistent data? I have this working to a certain extent but can only pass
a
> variable to my second page, but not from my second page onto the third.
Also
> in my second page I cannot change the value of this variable i.e. bob =
100
> on page 1, in page 2 I can display bob equalling 100 but then I want to a)
> alter the value of bob to 50 and b) send bob and its new value to third
> page. Can this be done by using sessions?
>
> Also how do you pass the session id of one page onto the next? do you pass
> it on the end of the page reference e.g.
>
> echo "";
>
> Any help would be grateful even if it was to tell me that I have got the
> wrong idea about sessions altogehter.
>
> Thanks
>
> Mark
>
>
>
> CONFIDENTIALITY NOTICE
> The information contained in this e-mail is intended only for the
> confidential use of the above named recipient. If you are not the intended
> recipient or person responsible for delivering it to the intended
recipient,
> you have received this communication in error and must not distribute or
> copy it.  Please accept the sender's apologies, notify the sender
> immediately by return e-mail and delete this communication.  Thank you.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



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




Fw: [PHP-DB] whats wrong with my sql insert statement?

2002-09-10 Thread nikos


> Try remove (;) at the end of the expresion, before quote ("): VALUES
> ('$first_name','$location','$phone', '$blabla')...(;)..."
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 4:38 AM
> Subject: Re: [PHP-DB] whats wrong with my sql insert statement?
>
>
> > Thanks for your suggestions.
> > first my /etc/php.ini
> > register_globals = on
> > second i made the change as you suggested and i added a
> > [$blabla = "truly random";]
> > when the input.php is excuated, 'blabla' value is inserted into the
> > table. '$first_name' is still left blank.
> > this leads me to believe that '$first_name' is blank to start with!
> > somehow the input.html gives input.php blank $first_name , $location .
> > care to look at my input.html ? thanks alot.
> >
> > #
> >  >
> > $db_name ="cheese_catalog";
> > $table_name = "user";
> > $blabla = " bla bla";
> > $connection = @mysql_connect("localhost","test","new0pass") or
> > die("Couldn't Connect.");
> > $db = @mysql_select_db($db_name, $connection) or die("Couldn't select
> > database.");
> > if ("none_required"=="none_required") {
> >
> > $sql = "INSERT INTO $table_name (first_name,location,phone,messages)
> > VALUES ('$first_name','$location','$phone', '$blabla');";
> > $result = @mysql_query($sql, $connection) or die("Error #".
> > mysql_errno() . ": " . mysql_error());
> >
> > include("input_added.html");
> >
> > }
> >
> > ?>
> > #
> >
> >
> > Michael Hazelden wrote:
> > > Hi there,
> > >
> > > Two things:
> > >
> > > (a) in my experience - you should use single quotes in your query to
> > > surround the values and so you don't need to escape them either (e.g.
> > > '$first_name')
> > >
> > > and (b) Make sure register_globals is on - otherwise you need to use
> > > $_POST[first_name]
> > >
> > > Cheers,
> > >
> > > Michael.
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: 10 September 2002 01:15
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-DB] whats wrong with my sql insert statement?
> > >
> > >
> > > Hi
> > > I am using redhat 7.3 with mysql-3.23.49-3 php-4.1.2-7.3.4
> > > apache-1.3.23-11.
> > > I want to insert few values into a mysql table. This input.php sort
> > > works. it will add a new entray to the table but with blank values.
What
> > > did I do wrong?
> > > #
> > > #
> > > # file name input.php
> > >  > >
> > > $db_name ="cheese_catalog";
> > > $table_name = "user";
> > > $connection = @mysql_connect("localhost","test","test") or
die("Couldn't
> > > Connect.");
> > > $db = @mysql_select_db($db_name, $connection) or die("Couldn't select
> > > database.");
> > > if ("none_required"=="none_required") {
> > >
> > > $sql = "INSERT INTO $table_name (first_name,location,phone,messages)
> > > VALUES (\"$first_name\",\"$location\",\"$phone\", \"$messages\");";
> > > $result = @mysql_query($sql, $connection) or die("Error #".
> > > mysql_errno() . ": " . mysql_error());
> > >
> > > include("input_added.html");
> > >
> > > }
> > >
> > > ?>
> > > #
> > >
> > > # file name input.html
> > > #
> > > 
> > > 
> > > New Record
> > > 
> > > 
> > > Please fill out the following information:
> > > 
> > > 
> > >   
> > >first_name:
> > > > > maxlength=255 value="">
> > >   
> > >   
> > >location:
> > > > > maxlength=255 value="">
> > >   
> > >   
> > >phone:
> > > > > maxlength=255 value="">
> > >   
> > >   
> > >   messages:
> > > > > maxlength=255 value="">
> > >   
> > >   
> > > 
> > > > > name="submit" value="Enter"> 
> > >   
> > > 
> > > 
> > > 
> > > 
> > > #
> > > #
> > >
> > >
> > >
> > >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


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




Fw: [PHP-DB] php -> checkboxes -> mysql

2002-09-10 Thread nikos


> You should first check if checkbox value stored in the databese is 1 or 0.
> After use an if clause:
> if ($checkbox==1) {
> echo ""
> }
> elseif ($checkbox==0) {
> ""
> }
>
> Nikos
> --
--
> ---
>
> - Original Message -
> From: "Chris" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 12:03 AM
> Subject: [PHP-DB] php -> checkboxes -> mysql
>
>
> > Greetings,
> >
> > I am just starting with php and need some help/code example for
> > setting checkbox values from mysql. My setup is the following:
> >
> > The mysql database holds data and checkbox values in respective columes.
> > For example
> >
> > name address phone homeno workno pagerno
> > Chris  555-1212 1 0 0
> >
> > 1 = checkbox should be checked
> > 0 = checkbox should not be checked
> >
> > On the webpage side I would have name, address and phone number
textboxes,
> > and then 3 checkboxes for the "homeno", "workno" and "pagerno".
> >
> > When the page loads I would like to have the checkboxes be automatically
> > checked or left uncheck based on the mysql query to the db. I do not
want
> > to do any grouping or anything, just query mysql for the homeno value,
set
> > it, then check the workno value, set it, etc..
> >
> > Any help is GREATLY appreciated.
> > Chris
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>


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




Fw: [PHP-DB] Conversion from access to mysql

2002-09-10 Thread nikos


> You should install MyQDBC. Then use it to export the Access tables in
MySQL
>
> Nikos
> --
--
> --
>
> - Original Message -
> From: "Chris Grigor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 12:47 PM
> Subject: [PHP-DB] Conversion from access to mysql
>
>
> > Hey there all
> >
> > This is more than likely a common question, anyone have any guidelines,
> do's
> > or dont's
> > about converting an access db to mysql db...
> >
> > Regards
> >
> > Chris
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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




Fw: [PHP-DB] Conversion from access to mysql

2002-09-10 Thread nikos


> You should install MyQDBC. Then use it to export the Access tables in
MySQL
>
> Nikos
> --
--
> --
>
> - Original Message -
> From: "Chris Grigor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 12:47 PM
> Subject: [PHP-DB] Conversion from access to mysql
>
>
> > Hey there all
> >
> > This is more than likely a common question, anyone have any guidelines,
> do's
> > or dont's
> > about converting an access db to mysql db...
> >
> > Regards
> >
> > Chris
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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




Fw: [PHP-DB] Conversion from access to mysql

2002-09-10 Thread nikos


Untitled
Document ---
- Qbit &Ggr;&agr;&tgr;&sgr;&eeacgr;&sfgr; &Ngr;&iacgr;&kgr;&ogr;&sfgr; Web developer tel.: 0108256721 - 0108256722
fax: 0108256712 email: [EMAIL PROTECTED] http://www.qbit.gr
- Original Message -
From: "nikos" <[EMAIL PROTECTED]>
To: "Chris Grigor" <[EMAIL PROTECTED]>
Sent: Tuesday, September 10, 2002 2:46 PM
Subject: Re: [PHP-DB] Conversion from access to mysql


> You should install MyQDBC. Then use it to export the Access tables in
MySQL
>
> Nikos
> --
--
> --
>
> - Original Message -
> From: "Chris Grigor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 12:47 PM
> Subject: [PHP-DB] Conversion from access to mysql
>
>
> > Hey there all
> >
> > This is more than likely a common question, anyone have any guidelines,
> do's
> > or dont's
> > about converting an access db to mysql db...
> >
> > Regards
> >
> > Chris
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>


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