php-windows Digest 20 Aug 2002 21:05:44 -0000 Issue 1299

Topics (messages 15361 through 15399):

Query within Mail Function
        15361 by: James Meers
        15362 by: DL Neil
        15363 by: DL Neil
        15364 by: James Meers
        15366 by: Ross Fleming

Re: Redirect
        15365 by: Ross Fleming

resolution?
        15367 by: Afan Pasalic
        15368 by: Svensson, B.A.T. (HKG)
        15369 by: Rich Gray
        15370 by: Ross Fleming
        15371 by: Afan Pasalic
        15372 by: Mikey
        15373 by: Svensson, B.A.T. (HKG)
        15374 by: David Hollister
        15375 by: Afan Pasalic
        15376 by: Svensson, B.A.T. (HKG)
        15377 by: Svensson, B.A.T. (HKG)
        15378 by: Afan Pasalic
        15379 by: David Hollister
        15380 by: Afan Pasalic
        15381 by: Afan Pasalic
        15382 by: Ross Fleming
        15383 by: Afan Pasalic
        15384 by: Afan Pasalic
        15385 by: Jim Hunter
        15386 by: Afan Pasalic
        15387 by: Svensson, B.A.T. (HKG)
        15388 by: Afan Pasalic
        15389 by: Ross Fleming
        15390 by: Svensson, B.A.T. (HKG)
        15391 by: Svensson, B.A.T. (HKG)
        15392 by: DL Neil
        15393 by: php

Any good tutorials on working with IMAP/POP3 and php
        15394 by: R.S. Herhuth
        15395 by: Scott Carr
        15396 by: David Hollister

Comunications Port Accsess
        15397 by: Adam Horden
        15398 by: David Hollister
        15399 by: Syl

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hi, 
 
Please bear with my limited knowledge of PHP...
 
Does anyone know if it is possible to code a sql query within the message part of the 
mail function, e.g.:
 
mail( "$to_mail","$sumject","
 
$sql = mysql_query("select * from table")
or   die("error with query\n");
 
       while ($row  =  mysql_fetch_array($sql)) {
       $db_name=$row["name"];
       $db_email=$row["email"];      
       $db_age=$row["age"];    
       
       echo"$name - $email - $age";
       
       }
 
" );
 
This obviously is wrong, does anyone know if its possible, if so, what is the right 
way of writing it??
 
Cheers
 
James
--- End Message ---
--- Begin Message ---
Hi James,

Please bear with my limited knowledge of PHP...

Does anyone know if it is possible to code a sql query within the message
part of the mail function, e.g.:

mail( "$to_mail","$sumject","

$sql = mysql_query("select * from table")
or   die("error with query\n");

       while ($row  =  mysql_fetch_array($sql)) {
       $db_name=$row["name"];
       $db_email=$row["email"];
       $db_age=$row["age"];

       echo"$name - $email - $age";

       }

" );

This obviously is wrong, does anyone know if its possible, if so, what is
the right way of writing it??


=What's wrong with:
$sql = mysql_query("select * from table")
or   die("error with query\n");
       while ($row  =  mysql_fetch_array($sql)) {
       $db_name=$row["name"];
       $db_email=$row["email"];
       $db_age=$row["age"];
       }
etc...
mail( "$to_mail","$sumject","$name - $email - $age" );

Regards,
=dn


--- End Message ---
--- Begin Message ---
James,

> I have a rather long list of names and I want to email the whole list and
not one by one, do you know what I mean?


May I suggest that you always reply to the list: someone else may answer
better/faster/in color...
Also how about a clear specification of need: why are you retrieving a
subscriber's age if you're sending the same msg to everyone? That is why I
thought you wanted to send personal messages! (not that I was even sure that
was correct at the time...)

There are regular discussions about the over-use of MAIL()/the limitations
of the interface to SMTP servers, eg sending too many messages or
overloading the To, CC, or BCC fields. I think the last ended but a day or
so ago. Accordingly if your "rather long" is 'too long' then you're buying
into problems! Mind you the above seems to apply mainly to *nix users - IIRC
Windows users get a better deal from their implementation. Fortunately my
client mailouts are very customised/sub-sets and the lists are therefore not
very long - so I can't further offer useful advice on this. YMMV!

The logic you appear to be discussing might look something like this:

construct mail message/contents
construct SQL query
execute query
check response

clear addressee list (I tend to put myself/postmaster as the first name)

while there's MySQL data available
  extract pertinent fields from MySQL resultset
  append separator character(s), name and email address fields to addressee
list
  end while

call MAIL() using addressee list


Making sense now?
=dn



-----Original Message-----

Hi James,

Please bear with my limited knowledge of PHP...

Does anyone know if it is possible to code a sql query within the message
part of the mail function, e.g.:

mail( "$to_mail","$sumject","

$sql = mysql_query("select * from table")
or   die("error with query\n");

       while ($row  =  mysql_fetch_array($sql)) {
       $db_name=$row["name"];
       $db_email=$row["email"];
       $db_age=$row["age"];

       echo"$name - $email - $age";

       }

" );

This obviously is wrong, does anyone know if its possible, if so, what is
the right way of writing it??


=What's wrong with:
$sql = mysql_query("select * from table")
or   die("error with query\n");
       while ($row  =  mysql_fetch_array($sql)) {
       $db_name=$row["name"];
       $db_email=$row["email"];
       $db_age=$row["age"];
       }
etc...
mail( "$to_mail","$sumject","$name - $email - $age" );

Regards,
=dn



--- End Message ---
--- Begin Message ---
Thanks,

My aim is to run this script at the end of each day so it will email me a list of all 
the new users.

My problem is trying to get the query to run and print out all results within the 
message part of the email. I am not using it for mailing list etc... its just a simple 
way of me getting a list of all new users.

I need to know how to put the list into the message part of the mail function? 

Jambo

-----Original Message-----
From: DL Neil [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 17:12
To: James Meers
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Query within Mail Function

James,

> I have a rather long list of names and I want to email the whole list and
not one by one, do you know what I mean?


May I suggest that you always reply to the list: someone else may answer
better/faster/in color...
Also how about a clear specification of need: why are you retrieving a
subscriber's age if you're sending the same msg to everyone? That is why I
thought you wanted to send personal messages! (not that I was even sure that
was correct at the time...)

There are regular discussions about the over-use of MAIL()/the limitations
of the interface to SMTP servers, eg sending too many messages or
overloading the To, CC, or BCC fields. I think the last ended but a day or
so ago. Accordingly if your "rather long" is 'too long' then you're buying
into problems! Mind you the above seems to apply mainly to *nix users - IIRC
Windows users get a better deal from their implementation. Fortunately my
client mailouts are very customised/sub-sets and the lists are therefore not
very long - so I can't further offer useful advice on this. YMMV!

The logic you appear to be discussing might look something like this:

construct mail message/contents
construct SQL query
execute query
check response

clear addressee list (I tend to put myself/postmaster as the first name)

while there's MySQL data available
  extract pertinent fields from MySQL resultset
  append separator character(s), name and email address fields to addressee
list
  end while

call MAIL() using addressee list


Making sense now?
=dn



-----Original Message-----

Hi James,

Please bear with my limited knowledge of PHP...

Does anyone know if it is possible to code a sql query within the message
part of the mail function, e.g.:

mail( "$to_mail","$sumject","

$sql = mysql_query("select * from table")
or   die("error with query\n");

       while ($row  =  mysql_fetch_array($sql)) {
       $db_name=$row["name"];
       $db_email=$row["email"];
       $db_age=$row["age"];

       echo"$name - $email - $age";

       }

" );

This obviously is wrong, does anyone know if its possible, if so, what is
the right way of writing it??


=What's wrong with:
$sql = mysql_query("select * from table")
or   die("error with query\n");
       while ($row  =  mysql_fetch_array($sql)) {
       $db_name=$row["name"];
       $db_email=$row["email"];
       $db_age=$row["age"];
       }
etc...
mail( "$to_mail","$sumject","$name - $email - $age" );

Regards,
=dn


--- End Message ---
--- Begin Message ---
<?
$sql = mysql_query("select * from table") or die ("error");

$body = "";

while ($row = mysql_fetch_array($sql)) {
  $body .= $row['name']." - ".$row['email']." - ".$row['age']."\n";
}

mail ($to_mail, $subject, $body);

?>

Ross

PS Just as an added bonus tip: Don't store an age in a database.  I'm 21
now, but won't be in a month.  Store a dob and calculate it from that



> -----Original Message-----
> From: James Meers [mailto:[EMAIL PROTECTED]]
> Sent: 20 August 2002 13:32
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Query within Mail Function
>
>
> Hi,
>
> Please bear with my limited knowledge of PHP...
>
> Does anyone know if it is possible to code a sql query within the
> message part of the mail function, e.g.:
>
> mail( "$to_mail","$sumject","
>
> $sql = mysql_query("select * from table")
> or   die("error with query\n");
>
>        while ($row  =  mysql_fetch_array($sql)) {
>        $db_name=$row["name"];
>        $db_email=$row["email"];
>        $db_age=$row["age"];
>
>        echo"$name - $email - $age";
>
>        }
>
> " );
>
> This obviously is wrong, does anyone know if its possible, if so,
> what is the right way of writing it??
>
> Cheers
>
> James
>

--- End Message ---
--- Begin Message ---
It may sound rather obvious, but don't send any header information :)  The
error you are getting means that you have echoed or printed something to the
output, and have already started generating the HTML page.  Don't do this.
Jump into the php code straight away (no introductory HTML code) and test
the conditions you want to test.  Observe:
<?php

if (user_and_pass_ok)
{
  set a cookie or session var to log them in;
  header("Location: home.html");
}
else
{
  either print an error message OR;
  header("Location: login.html");
  but not both.  Print an error or redirect.
}

?>



> -----Original Message-----
> From: Rodrigo San Martin [mailto:[EMAIL PROTECTED]]
> Sent: 20 August 2002 07:46
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Redirect
>
>
> Halo.
>
> I need som help with my script. I need to find a way to redirect my script
> to another file. I start with the login file, which is a html
> file, and send
> variables through it to a file I call do_login. This checks if
> username and
> password is correct. On the top of this file I have a if statement that
> checks if the user has writen on the username and password box.
> If not, they
> get sent back to the login.html by a header("location:login.html");
>
> Now, if username and password checks out i want to sent them to the start
> page. The problem is the I already have sent header information
> and cant use
> Header() anymore.
>
> Can someone tell me an easy way to solve this problem
>
> Thanks...
>
>
>
> ------------------------------------------
> Rodrigo San Martin
> Institutt for datateknologi og informatikk
>
> http://www.idi.ntnu.no/~rodrigo
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

--- End Message ---
--- Begin Message ---
Hi,
how an I find resolution on visitors monitor?
I need, according his resolution, use different image size...

afan
--- End Message ---
--- Begin Message ---
> how an I find resolution on visitors monitor?
> I need, according his resolution, use different image size...

And how will you handle the possibility that a user
can change the screen resolution during a session? 
--- End Message ---
--- Begin Message ---
Afan
PHP runs on the server ... you will need to use javascript or some other
client side stuff to determine that...
Rich

-----Original Message-----
From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 18:00
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] resolution?


Hi,
how an I find resolution on visitors monitor?
I need, according his resolution, use different image size...

afan

--- End Message ---
--- Begin Message ---
You don't.  I'd be more than annoyed if a web site could find out details
that specific to me.  The resolution of the screen is inconsequential
anyway, there's no guarantee that they've got their browser window
maximised.  Web page design shouldn't really be concerned with this type of
information anyway.  Design your page, aim it at 1024*768 (pretty much
today's standard, if not higher) and note this at the bottom of the page.
Designed properly it shouldn't be illegible at a different size.

You could if you really wanted to I suppose, specify the size of the window
using javascript or whatever.

Ross

> -----Original Message-----
> From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
> Sent: 20 August 2002 18:00
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] resolution?
>
>
> Hi,
> how an I find resolution on visitors monitor?
> I need, according his resolution, use different image size...
>
> afan
>

--- End Message ---
--- Begin Message ---
It's about desktop wallpapers. Before I had three links, for each resolution, and 
visitor have to click according his resolution. Now I want to give just one link and 
it will show to visitor (full size window) how it should look like. It will not be a 
"long term using resolution code"... Got it?

afan




----- Original Message ----- 
  From: Svensson, B.A.T. (HKG) 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, August 20, 2002 1:06 PM
  Subject: RE: [PHP-WIN] resolution?


  > how an I find resolution on visitors monitor?
  > I need, according his resolution, use different image size...

  And how will you handle the possibility that a user
  can change the screen resolution during a session? 

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

--- End Message ---
--- Begin Message ---
Use JavaScript to find out client side information...

> -----Original Message-----
> From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
> Sent: 20 August 2002 18:00
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] resolution?
> 
> 
> Hi,
> how an I find resolution on visitors monitor?
> I need, according his resolution, use different image size...
> 
> afan
> 

--- End Message ---
--- Begin Message ---
> > how an I find resolution on visitors monitor?
> > I need, according his resolution, use different image size...
> 
> And how will you handle the possibility that a user
> can change the screen resolution during a session? 

And worse: the evil minded end user may even switch
the entire monitor, from lest say SVGA to VGA.

And even worse: have you considered how you would
like to handle the case if they visit the website via
a ANSI terminal emulator under windows, and on top
of this the lunatic evil users might even suddenly
press [Alt][Enter] during the session and change
the monitor to a green fluoresce VT220 terminal.
--- End Message ---
--- Begin Message ---
Links to download wallpaper or links to the same site in varying
resolutions?  Sounds like you have too much time on your hands.  Is it
really worth it?

-----Original Message-----
From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 12:18 PM
To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] resolution?

It's about desktop wallpapers. Before I had three links, for each
resolution, and visitor have to click according his resolution. Now I want
to give just one link and it will show to visitor (full size window) how it
should look like. It will not be a "long term using resolution code"... Got
it?

afan




----- Original Message -----
  From: Svensson, B.A.T. (HKG)
  To: [EMAIL PROTECTED]
  Sent: Tuesday, August 20, 2002 1:06 PM
  Subject: RE: [PHP-WIN] resolution?


  > how an I find resolution on visitors monitor?
  > I need, according his resolution, use different image size...

  And how will you handle the possibility that a user
  can change the screen resolution during a session?

  --
  PHP Windows Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
links to open new window, full size, full screen and according visitors resolution 
I'll put appropriate image (600x480 or 800x600 or 1024x740) as a background.




  ----- Original Message ----- 
  From: David Hollister 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, August 20, 2002 1:20 PM
  Subject: RE: [PHP-WIN] resolution?


  Links to download wallpaper or links to the same site in varying
  resolutions?  Sounds like you have too much time on your hands.  Is it
  really worth it?

  -----Original Message-----
  From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 20, 2002 12:18 PM
  To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
  Subject: Re: [PHP-WIN] resolution?

  It's about desktop wallpapers. Before I had three links, for each
  resolution, and visitor have to click according his resolution. Now I want
  to give just one link and it will show to visitor (full size window) how it
  should look like. It will not be a "long term using resolution code"... Got
  it?

  afan




  ----- Original Message -----
    From: Svensson, B.A.T. (HKG)
    To: [EMAIL PROTECTED]
    Sent: Tuesday, August 20, 2002 1:06 PM
    Subject: RE: [PHP-WIN] resolution?


    > how an I find resolution on visitors monitor?
    > I need, according his resolution, use different image size...

    And how will you handle the possibility that a user
    can change the screen resolution during a session?

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

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

--- End Message ---
--- Begin Message ---
You raise a very good point there Ross:

Never violate the users integrity!

A suggestion would be to make the website
first fit lets say display things fitted for a 800x600
resolution, and then have an option menu where the user
can select other resolutions - which then are set during
the rest of the session: that is the user will have
control of things.

It is not good design principles to make the user feel
vulnerable, stupid, or removing control from them.

> -----Original Message-----
> From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 7:06 PM
> To: Afan Pasalic; PHP Windows mailing list
> Subject: RE: [PHP-WIN] resolution?
> 
> 
> You don't.  I'd be more than annoyed if a web site could find out details
> that specific to me.  The resolution of the screen is inconsequential
> anyway, there's no guarantee that they've got their browser window
> maximised.  Web page design shouldn't really be concerned with this type of
> information anyway.  Design your page, aim it at 1024*768 (pretty much
> today's standard, if not higher) and note this at the bottom of the page.
> Designed properly it shouldn't be illegible at a different size.
> 
> You could if you really wanted to I suppose, specify the size of the window
> using javascript or whatever.
> 
> Ross
> 
> > -----Original Message-----
> > From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
> > Sent: 20 August 2002 18:00
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] resolution?
> >
> >
> > Hi,
> > how an I find resolution on visitors monitor?
> > I need, according his resolution, use different image size...
> >
> > afan
> >
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
> It's about desktop wallpapers. Before I had three links, for each
> resolution, and visitor have to click according his resolution. Now I want
> to give just one link and it will show to visitor (full size window) how it
> should look like. It will not be a "long term using resolution code"... Got
> it?

And assume the user wants to have the megamaxsized images for his
monitor at home, and tries to download the picture at work with
a 800x600 resolution, wouldn't that be a pity then?
 
--- End Message ---
--- Begin Message ---
I repeat again: it's just for one, only one page, to show wallpaper it should look 
like, before user download it! Not a whole site.





  ----- Original Message ----- 
  From: Svensson, B.A.T. (HKG) 
  To: Ross Fleming 
  Cc: Php Win32 list 
  Sent: Tuesday, August 20, 2002 1:25 PM
  Subject: RE: [PHP-WIN] resolution?


  You raise a very good point there Ross:

  Never violate the users integrity!

  A suggestion would be to make the website
  first fit lets say display things fitted for a 800x600
  resolution, and then have an option menu where the user
  can select other resolutions - which then are set during
  the rest of the session: that is the user will have
  control of things.

  It is not good design principles to make the user feel
  vulnerable, stupid, or removing control from them.

  > -----Original Message-----
  > From: Ross Fleming [mailto:[EMAIL PROTECTED]]
  > Sent: Tuesday, August 20, 2002 7:06 PM
  > To: Afan Pasalic; PHP Windows mailing list
  > Subject: RE: [PHP-WIN] resolution?
  > 
  > 
  > You don't.  I'd be more than annoyed if a web site could find out details
  > that specific to me.  The resolution of the screen is inconsequential
  > anyway, there's no guarantee that they've got their browser window
  > maximised.  Web page design shouldn't really be concerned with this type of
  > information anyway.  Design your page, aim it at 1024*768 (pretty much
  > today's standard, if not higher) and note this at the bottom of the page.
  > Designed properly it shouldn't be illegible at a different size.
  > 
  > You could if you really wanted to I suppose, specify the size of the window
  > using javascript or whatever.
  > 
  > Ross
  > 
  > > -----Original Message-----
  > > From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
  > > Sent: 20 August 2002 18:00
  > > To: [EMAIL PROTECTED]
  > > Subject: [PHP-WIN] resolution?
  > >
  > >
  > > Hi,
  > > how an I find resolution on visitors monitor?
  > > I need, according his resolution, use different image size...
  > >
  > > afan
  > >
  > 
  > 
  > -- 
  > PHP Windows Mailing List (http://www.php.net/)
  > To unsubscribe, visit: http://www.php.net/unsub.php
  > 

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

--- End Message ---
--- Begin Message ---
>And assume the user wants to have the megamaxsized images for his
>monitor at home, and tries to download the picture at work with
>a 800x600 resolution, wouldn't that be a pity then?

Is megamaxsized anything like supersize or are those different species?  

--- End Message ---
--- Begin Message ---
I want to try to escape to tile background, that's the point.
Does this really add any significant... - that's other question, for me yes, for 
others maybe not...
Does the user really need... - let's say, they will appreciate it...

  ----- Original Message ----- 
  From: Corn Vollney-R7019C 
  To: 'Afan Pasalic' ; David Hollister ; [EMAIL PROTECTED] 
  Sent: Tuesday, August 20, 2002 1:27 PM
  Subject: RE: [PHP-WIN] resolution?


  Ideally, this should be invisible to the user. Use a simpler..tilable background. 
Use a base color from your chosen palete. Re-assess why you need to have different 
resolution sizes..does this really add any significant value to your site? Does the 
user really need it or do you just want it?

  V

  -----Original Message-----
  From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 20, 2002 12:24 PM
  To: David Hollister; [EMAIL PROTECTED]
  Subject: Re: [PHP-WIN] resolution?


  links to open new window, full size, full screen and according visitors resolution 
I'll put appropriate image (600x480 or 800x600 or 1024x740) as a background.




    ----- Original Message ----- 
    From: David Hollister 
    To: [EMAIL PROTECTED] 
    Sent: Tuesday, August 20, 2002 1:20 PM
    Subject: RE: [PHP-WIN] resolution?


    Links to download wallpaper or links to the same site in varying
    resolutions?  Sounds like you have too much time on your hands.  Is it
    really worth it?

    -----Original Message-----
    From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
    Sent: Tuesday, August 20, 2002 12:18 PM
    To: Svensson, B.A.T. (HKG); [EMAIL PROTECTED]
    Subject: Re: [PHP-WIN] resolution?

    It's about desktop wallpapers. Before I had three links, for each
    resolution, and visitor have to click according his resolution. Now I want
    to give just one link and it will show to visitor (full size window) how it
    should look like. It will not be a "long term using resolution code"... Got
    it?

    afan




    ----- Original Message -----
      From: Svensson, B.A.T. (HKG)
      To: [EMAIL PROTECTED]
      Sent: Tuesday, August 20, 2002 1:06 PM
      Subject: RE: [PHP-WIN] resolution?


      > how an I find resolution on visitors monitor?
      > I need, according his resolution, use different image size...

      And how will you handle the possibility that a user
      can change the screen resolution during a session?

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

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

--- End Message ---
--- Begin Message ---
Yeah,that's true! That point I forgot. Thanks.


  ----- Original Message ----- 
  From: Svensson, B.A.T. (HKG) 
  To: Php Win32 list 
  Sent: Tuesday, August 20, 2002 1:28 PM
  Subject: RE: [PHP-WIN] resolution?


  > It's about desktop wallpapers. Before I had three links, for each
  > resolution, and visitor have to click according his resolution. Now I want
  > to give just one link and it will show to visitor (full size window) how it
  > should look like. It will not be a "long term using resolution code"... Got
  > it?

  And assume the user wants to have the megamaxsized images for his
  monitor at home, and tries to download the picture at work with
  a 800x600 resolution, wouldn't that be a pity then?
   

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

--- End Message ---
--- Begin Message ---
The definitive point is...  you can't do it in php.

exit(1);

Ross

> -----Original Message-----
> From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
> Sent: 20 August 2002 18:36
> To: Svensson, B.A.T. (HKG); Php Win32 list
> Subject: Re: [PHP-WIN] resolution?
> 
> 
> Yeah,that's true! That point I forgot. Thanks.
> 
> 
>   ----- Original Message ----- 
>   From: Svensson, B.A.T. (HKG) 
>   To: Php Win32 list 
>   Sent: Tuesday, August 20, 2002 1:28 PM
>   Subject: RE: [PHP-WIN] resolution?
> 
> 
>   > It's about desktop wallpapers. Before I had three links, for each
>   > resolution, and visitor have to click according his 
> resolution. Now I want
>   > to give just one link and it will show to visitor (full size 
> window) how it
>   > should look like. It will not be a "long term using 
> resolution code"... Got
>   > it?
> 
>   And assume the user wants to have the megamaxsized images for his
>   monitor at home, and tries to download the picture at work with
>   a 800x600 resolution, wouldn't that be a pity then?
>    
> 
>   -- 
>   PHP Windows Mailing List (http://www.php.net/)
>   To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
--- End Message ---
--- Begin Message ---
Sorry, try then from list....

Thanks.



----- Original Message ----- 
  From: Svensson, B.A.T. (HKG) 
  To: Afan Pasalic 
  Sent: Tuesday, August 20, 2002 1:33 PM
  Subject: RE: [PHP-WIN] resolution?


  I can't read mail directly sent to me from you:
  please send them in plain/text ASCII format.
--- End Message ---
--- Begin Message ---
Ok. That's answer I asked. Huh!

Thanks!

afan


  ----- Original Message ----- 
  From: Ross Fleming 
  To: Afan Pasalic ; Svensson, B.A.T. (HKG) ; Php Win32 list 
  Sent: Tuesday, August 20, 2002 1:36 PM
  Subject: RE: [PHP-WIN] resolution?


  The definitive point is...  you can't do it in php.

  exit(1);

  Ross

  > -----Original Message-----
  > From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
  > Sent: 20 August 2002 18:36
  > To: Svensson, B.A.T. (HKG); Php Win32 list
  > Subject: Re: [PHP-WIN] resolution?
  > 
  > 
  > Yeah,that's true! That point I forgot. Thanks.
  > 
  > 
  >   ----- Original Message ----- 
  >   From: Svensson, B.A.T. (HKG) 
  >   To: Php Win32 list 
  >   Sent: Tuesday, August 20, 2002 1:28 PM
  >   Subject: RE: [PHP-WIN] resolution?
  > 
  > 
  >   > It's about desktop wallpapers. Before I had three links, for each
  >   > resolution, and visitor have to click according his 
  > resolution. Now I want
  >   > to give just one link and it will show to visitor (full size 
  > window) how it
  >   > should look like. It will not be a "long term using 
  > resolution code"... Got
  >   > it?
  > 
  >   And assume the user wants to have the megamaxsized images for his
  >   monitor at home, and tries to download the picture at work with
  >   a 800x600 resolution, wouldn't that be a pity then?
  >    
  > 
  >   -- 
  >   PHP Windows Mailing List (http://www.php.net/)
  >   To unsubscribe, visit: http://www.php.net/unsub.php
  > 
  >
--- End Message ---
--- Begin Message ---
You don't need to know resolution at all. The user knows what size their
monitor is and they can select the correct image to view. If the image is
larger then their browser then they can just scroll to see the extra.
Determining screen/browser resolution is not 100 % accurate so you shouldn't
try. Just supply the various links and allow the user to choose the one that
they want to download. They can 'try' the various sizes to see which one
they want to download. I don't want a background image on my desktop that
takes up the entire screen, I like to have a border around it so that my
icons are not on the image. Give the user the choice. If you ONLY allowed me
to download the file that would fill my screen I would not be a happy camper


Freedom of choice is a good thing.

Jim Hunter

-------Original Message-------

From: Afan Pasalic
Date: Tuesday, August 20, 2002 10:33:01
To: Svensson, B.A.T. \(HKG\); Ross Fleming
Cc: Php Win32 list
Subject: Re: [PHP-WIN] resolution?

I repeat again: it's just for one, only one page, to show wallpaper it
should look like, before user download it! Not a whole site.





----- Original Message ----- 
From: Svensson, B.A.T. (HKG) 
To: Ross Fleming 
Cc: Php Win32 list 
Sent: Tuesday, August 20, 2002 1:25 PM
Subject: RE: [PHP-WIN] resolution?


You raise a very good point there Ross:

Never violate the users integrity!

A suggestion would be to make the website
first fit lets say display things fitted for a 800x600
resolution, and then have an option menu where the user
can select other resolutions - which then are set during
the rest of the session: that is the user will have
control of things.

It is not good design principles to make the user feel
vulnerable, stupid, or removing control from them.

> -----Original Message-----
> From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 7:06 PM
> To: Afan Pasalic; PHP Windows mailing list
> Subject: RE: [PHP-WIN] resolution?
> 
> 
> You don't. I'd be more than annoyed if a web site could find out details
> that specific to me. The resolution of the screen is inconsequential
> anyway, there's no guarantee that they've got their browser window
> maximised. Web page design shouldn't really be concerned with this type of
> information anyway. Design your page, aim it at 1024*768 (pretty much
> today's standard, if not higher) and note this at the bottom of the page.
> Designed properly it shouldn't be illegible at a different size.
> 
> You could if you really wanted to I suppose, specify the size of the
window
> using javascript or whatever.
> 
> Ross
> 
> > -----Original Message-----
> > From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
> > Sent: 20 August 2002 18:00
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] resolution?
> >
> >
> > Hi,
> > how an I find resolution on visitors monitor?
> > I need, according his resolution, use different image size...
> >
> > afan
> >
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
That's ok, but I wanted to show how exactly will look like wallpaper - before user 
will download it. That's why I want to use fullscreen window (by javascript, no 
borders, toolbars...) and set as background wallpaper - according the resolution of 
screen.
Scrolling you can see what I will offer, buit this way I'm going to show you how it 
would looks like.



  ----- Original Message ----- 
  From: Corn Vollney-R7019C 
  To: 'Afan Pasalic' ; Ross Fleming ; Svensson, B.A.T. \(HKG\) 
  Sent: Tuesday, August 20, 2002 1:42 PM
  Subject: RE: [PHP-WIN] resolution?


  Correction...you could use php to build a simple app. to let you scroll through 
various images at various resolutions and then download the one you want.

  V

  -----Original Message-----
  From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 20, 2002 12:40 PM
  To: Ross Fleming; Svensson, B.A.T. \(HKG\); Php Win32 list
  Subject: Re: [PHP-WIN] resolution?


  Ok. That's answer I asked. Huh!

  Thanks!

  afan


    ----- Original Message ----- 
    From: Ross Fleming 
    To: Afan Pasalic ; Svensson, B.A.T. (HKG) ; Php Win32 list 
    Sent: Tuesday, August 20, 2002 1:36 PM
    Subject: RE: [PHP-WIN] resolution?


    The definitive point is...  you can't do it in php.

    exit(1);

    Ross

    > -----Original Message-----
    > From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
    > Sent: 20 August 2002 18:36
    > To: Svensson, B.A.T. (HKG); Php Win32 list
    > Subject: Re: [PHP-WIN] resolution?
    > 
    > 
    > Yeah,that's true! That point I forgot. Thanks.
    > 
    > 
    >   ----- Original Message ----- 
    >   From: Svensson, B.A.T. (HKG) 
    >   To: Php Win32 list 
    >   Sent: Tuesday, August 20, 2002 1:28 PM
    >   Subject: RE: [PHP-WIN] resolution?
    > 
    > 
    >   > It's about desktop wallpapers. Before I had three links, for each
    >   > resolution, and visitor have to click according his 
    > resolution. Now I want
    >   > to give just one link and it will show to visitor (full size 
    > window) how it
    >   > should look like. It will not be a "long term using 
    > resolution code"... Got
    >   > it?
    > 
    >   And assume the user wants to have the megamaxsized images for his
    >   monitor at home, and tries to download the picture at work with
    >   a 800x600 resolution, wouldn't that be a pity then?
    >    
    > 
    >   -- 
    >   PHP Windows Mailing List (http://www.php.net/)
    >   To unsubscribe, visit: http://www.php.net/unsub.php
    > 
    >
--- End Message ---
--- Begin Message ---
Afan:

my point is this: let the decision making process be handled
by the human and not the machine. Machines are simply not
smart enough - yet - to handles these kind of decisions,
since what you tries to do is to interpret the users
intention.

The decision you're trying to make automatically in
this case is to figure out the users true intention.

Trying to perceive another humans intention is even a
hard task for a human, not mentioningthe numerous
problem trying to make a machine do the very same thing.
This limitation might exists because the machine is not
able to perform a conscious introperspection [spell check?]
and thus can't even understand what it even means to have an
intention.

That's why you should avoid doing it automagical.

In particular do not expand windows to max size or other
envirionment changes without asking the user about it first:
it will only frustrate a user if he feels that the program is
in control and he is not. 

In general: never force an option onto a user if there
exists several option: let the user deiced first, and
then execute the request.

As human we don't want to be pushed around, but like to feel
that we do have control of the direct surrounding, and preferable
a little bit more (some even becomes politician to achieve the
"little bit more" part).
--- End Message ---
--- Begin Message ---
Thanks. Well said. You're right. I agree.

afan

  ----- Original Message ----- 
  From: Svensson, B.A.T. (HKG) 
  To: Afan Pasalic ; [EMAIL PROTECTED] 
  Sent: Tuesday, August 20, 2002 1:54 PM
  Subject: RE: [PHP-WIN] resolution?


  Afan:

  my point is this: let the decision making process be handled
  by the human and not the machine. Machines are simply not
  smart enough - yet - to handles these kind of decisions,
  since what you tries to do is to interpret the users
  intention.

  The decision you're trying to make automatically in
  this case is to figure out the users true intention.

  Trying to perceive another humans intention is even a
  hard task for a human, not mentioningthe numerous
  problem trying to make a machine do the very same thing.
  This limitation might exists because the machine is not
  able to perform a conscious introperspection [spell check?]
  and thus can't even understand what it even means to have an
  intention.

  That's why you should avoid doing it automagical.

  In particular do not expand windows to max size or other
  envirionment changes without asking the user about it first:
  it will only frustrate a user if he feels that the program is
  in control and he is not. 

  In general: never force an option onto a user if there
  exists several option: let the user deiced first, and
  then execute the request.

  As human we don't want to be pushed around, but like to feel
  that we do have control of the direct surrounding, and preferable
  a little bit more (some even becomes politician to achieve the
  "little bit more" part).
--- End Message ---
--- Begin Message ---
That's not the question that was asked however.  He asked whether you could
show an image dependant on what the resolution was, ie without user
intervention (removing the need for the user to scroll through the various
images or make a selection at all)

I stand by my answer.

Ross

> -----Original Message-----
> From: Corn Vollney-R7019C [mailto:[EMAIL PROTECTED]]
> Sent: 20 August 2002 18:42
> To: 'Afan Pasalic'; Ross Fleming; Svensson, B.A.T. \(HKG\)
> Subject: RE: [PHP-WIN] resolution?
>
>
> Correction...you could use php to build a simple app. to let you
> scroll through various images at various resolutions and then
> download the one you want.
>
> V
>
> -----Original Message-----
> From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 12:40 PM
> To: Ross Fleming; Svensson, B.A.T. \(HKG\); Php Win32 list
> Subject: Re: [PHP-WIN] resolution?
>
>
> Ok. That's answer I asked. Huh!
>
> Thanks!
>
> afan
>
>
>   ----- Original Message -----
>   From: Ross Fleming
>   To: Afan Pasalic ; Svensson, B.A.T. (HKG) ; Php Win32 list
>   Sent: Tuesday, August 20, 2002 1:36 PM
>   Subject: RE: [PHP-WIN] resolution?
>
>
>   The definitive point is...  you can't do it in php.
>
>   exit(1);
>
>   Ross
>
>   > -----Original Message-----
>   > From: Afan Pasalic [mailto:[EMAIL PROTECTED]]
>   > Sent: 20 August 2002 18:36
>   > To: Svensson, B.A.T. (HKG); Php Win32 list
>   > Subject: Re: [PHP-WIN] resolution?
>   >
>   >
>   > Yeah,that's true! That point I forgot. Thanks.
>   >
>   >
>   >   ----- Original Message -----
>   >   From: Svensson, B.A.T. (HKG)
>   >   To: Php Win32 list
>   >   Sent: Tuesday, August 20, 2002 1:28 PM
>   >   Subject: RE: [PHP-WIN] resolution?
>   >
>   >
>   >   > It's about desktop wallpapers. Before I had three links, for each
>   >   > resolution, and visitor have to click according his
>   > resolution. Now I want
>   >   > to give just one link and it will show to visitor (full size
>   > window) how it
>   >   > should look like. It will not be a "long term using
>   > resolution code"... Got
>   >   > it?
>   >
>   >   And assume the user wants to have the megamaxsized images for his
>   >   monitor at home, and tries to download the picture at work with
>   >   a 800x600 resolution, wouldn't that be a pity then?
>   >
>   >
>   >   --
>   >   PHP Windows Mailing List (http://www.php.net/)
>   >   To unsubscribe, visit: http://www.php.net/unsub.php
>   >
>   >
>
>

--- End Message ---
--- Begin Message ---
It is a little bit hard for me to read an e-mail from you in this list sent directly 
and only to me.

> Sorry, try then from list....
> 
> Thanks.
> 
> 
> 
> ----- Original Message ----- 
>   From: Svensson, B.A.T. (HKG) 
>   To: Afan Pasalic 
>   Sent: Tuesday, August 20, 2002 1:33 PM
>   Subject: RE: [PHP-WIN] resolution?
> 
> 
>   I can't read mail directly sent to me from you:
>   please send them in plain/text ASCII format.
> 
--- End Message ---
--- Begin Message ---
I don't get the principal benefit? It seams like in both case the image
need to be downloaded anyway to the remote machine in order to display it
on the remote machines monitor.

> That's ok, but I wanted to show how exactly will look like wallpaper -
> before user will download it. That's why I want to use fullscreen window
> (by javascript, no borders, toolbars...) and set as background wallpaper
> - according the resolution of screen.
> Scrolling you can see what I will offer, buit this way I'm going to show
> you how it would looks like.
>
--- End Message ---
--- Begin Message ---
Afan,

links to open new window, full size, full screen and according visitors
resolution I'll put appropriate image (600x480 or 800x600 or 1024x740) as a
background.


So what about the (Windows) tool bar
- is it hidden or present?
- what size is it?
- which of the four sides of the screen is it attached to?

=dn


--- End Message ---
--- Begin Message ---
If you really want to use it. I'd say use a CSS file to make your margins to
0
------ save this as css.css -----------
Body {
    margin:0;
}

img {
    height:100%;
    width:100%;
}
-------------------------------------

in the html file put this

<html>
<head>
<title>something</title>
<link rel="stylsheet" href="css.css" type="text/css">
</head>
<body>
<img src="whatever" alt="something">
</body>
</html>

have the user press F11 to make it fullscreen.

That is how I would do it. Use it if that would help out.


--- End Message ---
--- Begin Message ---

I'm looking for some really good tutorials on working with email and
PHP.  I'm hoping for some serious industrial strength stuff.  I would
even purchase a book or two if need be.

Thanks,
Ron
--- End Message ---
--- Begin Message ---
You can look at the IMP project from HORDE.  http://www.horde.org

It uses IMAP, POP3, LDAP and a couple other acronyms as well as being used by
several companies in the 10000 user range.

I use it for all of my email including this one.
-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting "R.S. Herhuth" <[EMAIL PROTECTED]>:

> 
> I'm looking for some really good tutorials on working with email and
> PHP.  I'm hoping for some serious industrial strength stuff.  I would
> even purchase a book or two if need be.
> 
> Thanks,
> Ron
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Ya - IMP is good.  Personally, I like SquirrelMail (www.squirrelmail.org).
Download the code and use these open source projects as learning material.
Then you can better the effort or start something new.  

-----Original Message-----
From: R.S. Herhuth [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 20, 2002 2:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Any good tutorials on working with IMAP/POP3 and php


I'm looking for some really good tutorials on working with email and
PHP.  I'm hoping for some serious industrial strength stuff.  I would
even purchase a book or two if need be.

Thanks,
Ron

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi Guys,

I devloped a general purpose output board from the serial port. This will
allow me to do anything I wanted to do. My idea was If i could code it in a
website based languages I could control the interface any where!

I am unning a 2k advance server running on wundows with apache 2 and php
latest. I am running mySQL also. There is 20gigs of space 128mB of memory.
Just fought giveing you the specs might help.

I wanted to know if there was any way I can control the serial port from
php?

I have looked at a few sites and looked in all my books but there dosent
seem to be anything documented.

Thanks,
Adam


--- End Message ---
--- Begin Message ---
I love serial.  What about command shell instructions?  

-----Original Message-----
From: Adam Horden [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 06, 2002 3:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Comunications Port Accsess

Hi Guys,

I devloped a general purpose output board from the serial port. This will
allow me to do anything I wanted to do. My idea was If i could code it in a
website based languages I could control the interface any where!

I am unning a 2k advance server running on wundows with apache 2 and php
latest. I am running mySQL also. There is 20gigs of space 128mB of memory.
Just fought giveing you the specs might help.

I wanted to know if there was any way I can control the serial port from
php?

I have looked at a few sites and looked in all my books but there dosent
seem to be anything documented.

Thanks,
Adam



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
> I wanted to know if there was any way I can control the serial port from
> php?

A Google search revealed

http://www.trios.org/php/serialport/
http://www.lspace.nildram.co.uk/freeware.html


Syl



--- End Message ---

Reply via email to