Re: [PHP] timestamp to readabe date and time ?

2004-04-11 Thread Don Read

On 11-Apr-2004 Ryan A wrote:
> 


> If you are using timestamp(14), here is how i do it: (after
the
> select)
> 
> if(($row = mysql_fetch_row($result))>=1)
> {
>   $d_year = substr($row[4],0,4);
>   $d_month = substr($row[4],4,2);
>   $d_day = substr($row[4],6,2);
>   $d_hours = substr($row[4],8,2);
>   $d_mins = substr($row[4],10,2);
>   $d_secs = substr($row[4],12,2);
> }

Ugh!

list($y, $m, $d, $h, $i, $s) = split('[-:/. ]', $row[x]);



-- 
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

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



[PHP] Re: PHP-GTK mailing list

2004-04-11 Thread David Robley
[EMAIL PROTECTED] (Cosmin) wrote in news:[EMAIL PROTECTED]:

> sorry for the off topic but i didn't knew where to ask this. 
> does anyone know what's happening with the php-gtk mailing list. I
> haven't received a message for more than a month now and any message
> that i try to send comes back saying 
> 
> "Hi. This is the qmail-send program at pb1.pair.com.
> I'm afraid I wasn't able to deliver your message to the following
> addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
> <[EMAIL PROTECTED]>:
> Unable to open .qmail-php-gtk-general: access denied. (#4.3.0)
> I'm not going to try again; this message has been in the queue too
> long."
> 
> 
> sorry again for the off topic but I hope that one of the persons who's
> in charge of the php-gtk mailing list will read this message and
> hopefully fix this problem

If you have an old message from the gtk list, look at the headers and you 
will find an address for the list maintainer - just send a query to that 
address.

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



[PHP] cannot find server even though the page is there?

2004-04-11 Thread Andy B
hi...
i have a page on my test web server... it has php/mysql stuff in it that
points to another db elsewhere that i have remote access to... my ip
address/domain name exist but when i go to it to test the page it says
cannot find server?? im lost now...it worked last night why not now...

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



Re: [PHP] ATTN: List Admins

2004-04-11 Thread David Robley
[EMAIL PROTECTED] (Elfyn McBratney) wrote in
news:[EMAIL PROTECTED]: 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> [postmaster@ added to Cc:]
> 
> Hello,
> 
> On Saturday 10 Apr 2004 00:39, -{ Rene Brehmer }- wrote:
>> I'll second that ... keep getting this in response from them:
>>
>> Thank you !!
>>
>> Your message has been received; we will treat your message and get
>> back to you as soon as possible.
>>
>> Besides the fact that mailman more or less makes this list useless
>> for me ... this is just another annoyance...
>>
>> Rene
>>
>> At 16:19 09-04-2004, Ryan A wrote:
>> >Please take out these two addresses:
>> >
>> >"Information Desk" <[EMAIL PROTECTED]>
>> >"Advance Credit Suisse Bank" <[EMAIL PROTECTED]>
>> >
>> >everytime we post to the list we get their damn autoresponders.
> 
> Yes, postmaster, please do.  The spam mennaces hit me 10+ times on
> every post i make to php-general@ (yes, only three or four today :)

Everybody - there is in the headers of every message to this list, an 
addres for the list maintainer. Please try directing your requests to those 
addresses where you are more likely to get help, rather than a bunch of 'Me 
too!'s that sem to follow any of these messages.

Also, most mail/newsreader apps these days have some form of filter

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



[PHP] [solved][ignore]Re: [PHP] cannot find server even though the page is there?

2004-04-11 Thread Andy B
found problem...apache died somehow for some reasonall better now


- Original Message - 
From: "Andy B" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 11, 2004 6:32 AM
Subject: [PHP] cannot find server even though the page is there?


> hi...
> i have a page on my test web server... it has php/mysql stuff in it that
> points to another db elsewhere that i have remote access to... my ip
> address/domain name exist but when i go to it to test the page it says
> cannot find server?? im lost now...it worked last night why not now...
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



[PHP] Re: timestamp to readabe date and time ?

2004-04-11 Thread Rainer Müller
Damian Brown schrieb:

I need to output a date and time that  shows more clearly than just
outputting the timestamp
what is the correct way to go about it ?
I have looked at getdate(), but I haven't fathomed it out yet !
--
www.phpexpert.org/truefaith.htm
"True Faith is not just when you believe in God and yourself, it is when
others begin to believe in you as well" - Damian John Paul Brown 2004
It is from an MySQL database with the field types DATETIME, DATE or 
TIME? When you can use the mysql function DATE_FORMAT()

Example:
SELECT *,DATE_FORMAT(mydate,'%d.%m.%y - %H:%i') AS mydate FROM foo
(mydate is the name of the column)
Rainer

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


RE: [PHP] PHP OO concepts

2004-04-11 Thread Ralph G

OOP? Stay tuned for PHP5

-Original Message-
From: jdavis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 07, 2004 1:45 PM
To: PHP List
Subject: [PHP] PHP OO concepts

Hello,
 
 I have am checking out PHP OOP and it's pretty smooth. I have a decent
amount of Java experience so PHP OOP is  really easy
to pick up. However I have a few questions I was hoping someone
could help me with.

Can php have a main()? If not ... how to you start a program that is
purley PHP OOP or is this even possible?

How popular is PHP OOP? Should I use PHP OOP for small dynamic web
pages? Is this the convention?

Thanks,
jd




-- 
[EMAIL PROTECTED]

"Bad spellers of the world untie!"

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

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



Re: [PHP] ATTN: List Admins

2004-04-11 Thread Elfyn McBratney
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday 11 Apr 2004 10:35, David Robley wrote:
> [EMAIL PROTECTED] (Elfyn McBratney) wrote in
> > On Saturday 10 Apr 2004 00:39, -{ Rene Brehmer }- wrote:
> >> I'll second that ... keep getting this in response from them:
> >>
> >> Thank you !!
> >>
> >> Your message has been received; we will treat your message and get
> >> back to you as soon as possible.
> >>
> >> Besides the fact that mailman more or less makes this list useless
> >> for me ... this is just another annoyance...
> >>
> >> Rene
> >>
> >> At 16:19 09-04-2004, Ryan A wrote:
> >> >Please take out these two addresses:
> >> >
> >> >"Information Desk" <[EMAIL PROTECTED]>
> >> >"Advance Credit Suisse Bank" <[EMAIL PROTECTED]>
> >> >
> >> >everytime we post to the list we get their damn autoresponders.
> >
> > Yes, postmaster, please do.  The spam mennaces hit me 10+ times on
> > every post i make to php-general@ (yes, only three or four today :)
>
> Everybody - there is in the headers of every message to this list, an
> addres for the list maintainer. Please try directing your requests to those
> addresses where you are more likely to get help, rather than a bunch of 'Me
> too!'s that sem to follow any of these messages.

Please check the headers of this post - Only List-{help,unsubscribe,post} are 
present (plus the -help address, which is not a human), there is not an 
address to contact the list admin..  postmaster@ seems perfectly fine to use 
in such a case.

> Also, most mail/newsreader apps these days have some form of filter

Yes they do, but I'm still using dial-up, so am annoyed when I recieve 
 of spam notes that still have to be downloaded..

These people need to unsubscribed, I shouldn't have to screen my mail because 
of some arseholes. 8)

Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

"When I say something, I put my name next to it." -- Isaac Jaffee

>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
<< ~  Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux  ~ >>
>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAeWuVaIgMKkVlSLQRAi1XAKCq/bYhA4zyUSN3hOv5tyfNCe04jACgrT3k
w2N+xPIpi6k9sTG5eZOKRCc=
=MYdh
-END PGP SIGNATURE-

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



php-general Digest 11 Apr 2004 15:02:14 -0000 Issue 2699

2004-04-11 Thread php-general-digest-help

php-general Digest 11 Apr 2004 15:02:14 - Issue 2699

Topics (messages 183097 through 183123):

timestamp to readabe date and time ?
183097 by: Damian Brown
183098 by: Ryan A
183099 by: Andy Ladouceur
183104 by: Damian Brown
183106 by: Andy Ladouceur
183107 by: Damian Brown
183108 by: Damian Brown
183116 by: Don Read
183121 by: Rainer Müller

Re: phpextdist and phpize
183100 by: Curt Zirzow

Re: php as cgi and module at same time
183101 by: Curt Zirzow

Re: Most bizarre date problem ever
183102 by: Curt Zirzow

Re: video thumbnail generation
183103 by: Curt Zirzow

Re: PHP e-commerce questions
183105 by: PHP Email List

trying to output a hyperlink
183109 by: Damian Brown
183111 by: John W. Holmes
183112 by: John W. Holmes
183113 by: Andy Ladouceur

Re: PHP5 and pear
183110 by: electroteque

SOLVED:Re: trying to output a hyperlink
183114 by: Damian Brown

SOLVED:Re: [PHP] timestamp to readabe date and time ?
183115 by: Damian Brown

Re: PHP-GTK mailing list
183117 by: David Robley

cannot find server even though the page is there?
183118 by: Andy B

Re: List Admins
183119 by: David Robley
183123 by: Elfyn McBratney

[solved][ignore]Re: [PHP] cannot find server even though the page is there?
183120 by: Andy B

Re: PHP OO concepts
183122 by: Ralph G

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 ---
I need to output a date and time that  shows more clearly than just
outputting the timestamp

what is the correct way to go about it ?
I have looked at getdate(), but I haven't fathomed it out yet !

--
www.phpexpert.org/truefaith.htm
"True Faith is not just when you believe in God and yourself, it is when
others begin to believe in you as well" - Damian John Paul Brown 2004
--- End Message ---
--- Begin Message ---

On 4/11/2004 3:25:09 AM, Damian Brown ([EMAIL PROTECTED]) wrote:
> I need to output a date and time that  shows more clearly than just
> outputting the timestamp
>
> what is the correct way to go about it ?
> I have looked at getdate(), but I haven't fathomed it out yet !

If you are using timestamp(14), here is how i do it: (after the select)

if(($row = mysql_fetch_row($result))>=1)
{
  $d_year = substr($row[4],0,4);
  $d_month = substr($row[4],4,2);
  $d_day = substr($row[4],6,2);
  $d_hours = substr($row[4],8,2);
  $d_mins = substr($row[4],10,2);
  $d_secs = substr($row[4],12,2);
}

I am using a  mysql_fetch_row as i am getting a lot of fields from the db,
you may want to use the fetch_array or something else but eh above should
give you an idea. The reason I like it like this is because the
year,month,date etc is all in different varialbes which I can format the way
I want it...or can even give the client the option of specifying the
format...but thats another thing altogether

HTH.

Cheers,
-Ryan
--- End Message ---
--- Begin Message ---
The second parameter of PHP's date() function takes a timestamp as an 
argument, this may be what you're looking for?

Andy

Damian Brown wrote:
I need to output a date and time that  shows more clearly than just
outputting the timestamp
what is the correct way to go about it ?
I have looked at getdate(), but I haven't fathomed it out yet !
--
www.phpexpert.org/truefaith.htm
"True Faith is not just when you believe in God and yourself, it is when
others begin to believe in you as well" - Damian John Paul Brown 2004
--- End Message ---
--- Begin Message ---
I have tried that, but it gives a date in the future
and all records have the same time
the code is



and it gives an output of

Monday 18th of January 2038 10:14:07 PM

I need it to proces the timestamp in the database table so that it shows the
different times
Thanks in advance for a solution

> The second parameter of PHP's date() function takes a timestamp as an
> argument, this may be what you're looking for?
>
> Andy
>
> Damian Brown wrote:
> > I need to output a date and time that  shows more clearly than just
> > outputting the timestamp
> >
> > what is the correct way to go about it ?
> > I have looked at getdate(), but I haven't fathomed it out yet !
> >
> > --
> > www.phpexpert.org/truefaith.htm
> > "True Faith is not just when you believe in God and yourself, it is when
> > others begin to believe in you as well" - Damian John Paul Brown 2004
--- End Message ---
--- Begin Message ---
And these are UNIX timestamps? Odd. I can't see date giving the wrong 
output, could you post the timestamp you're using?

Thanks

Andy

Damian Brown wrote:

I have tried that, but it gives a date in the future
and all records have the same time
the c

Re: [PHP] Re: trying to output a hyperlink

2004-04-11 Thread Michal Migurski
>Although, it could be shortened even more, to:
>
>Click here";
>   echo $link;?>

Or still more, to:
Click Here

...which starts to approach the original legibility of HTML for me, and
the syntax hilighting in BBEdit is corrrect. I've been tending to use
constructions like that instead of templating classes like smarty or
printf constructiions, and I've been very pleased with em.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



[PHP] Re: adding items to a list or menu

2004-04-11 Thread Robert
"R.G. Vervoort" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Not sure if it is a php question but since i am working in php here it is.
> 
> Ho can i add items to (the item label=visual text and the value=index
> number) a list object on a website.
> 
> I am having a list with 4 items and i would like to add the text from a
> textfield (textfield1.value) to the list object so it will hold 5 items.
> 
> thanks for any suggestions
> 
> Roy
> The Netherlands

PHP is server side, it looks like you want to send items to a client
side app (javascript?) you could do something like this:

--->Snip!

\n"; //Not a javascript guy,
but you get the point

foreach($array as $key=>$item) {
   echo "\n textdata.item$key=$item";
}

?>
 etc.

<---

Not sure how javascript looks (started working with it in last 2 days)
but you can change that echo statement to what it should be in
javascript

Cheers!

Robert

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



[PHP] PHP5 RC1 rpms for Mandrake 10

2004-04-11 Thread Andrei Verovski (aka MacGuru)
Hi,

Anyone can suggest me where I can get PHP5 RC1 rpms (with possible max# of 
extensions) for Mandrake 10? I have tried to make them myself, but run into 
numerous problems.

Thanks in advance for any suggestion(s)

Andrei Verovski (aka MacGuru)

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



[PHP] function imagecreatefromjpeg pb

2004-04-11 Thread Cosas minovela
about GD, Warning: imagecreatefromjpeg(): '/var/www/html/datos/2004/02/crio25.jpg' is 
not a valid JPEG file. how can i solve it please?

image pass the EOF and BOF test, so this is not the problem :)

[PHP] RE: function imagecreatefromjpeg pb

2004-04-11 Thread Cosas minovela





about GD, Warning: imagecreatefromjpeg(): 
'/var/www/html/datos/2004/02/crio25.jpg' is not a valid JPEG file. how can i 
solve it please?
 
image pass the EOF and BOF test, so this is not the 
problem :)
 
here you got the image with problems , i'm sorry 
about the content of image...
 
http://www.paginadespud.com/datos/2004/02/crio25.jpg
 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] creating log files out of a delete statement

2004-04-11 Thread Andy B
hi...

i have a section of a website that deletes records from a mysql table...
right now all the query is is a delete statement but i need to make a "log
file" in this format:
current time::username who executed delete:: deleted(name of record)::delete
completed
or delete failed depending on what happened... i can do all of the log
except dont exactly know how to extract the "Name" field of the deleted
record before it actually gets dumped.. that way i can use it on the log...

any ideas how to do it in the best way??

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



[PHP] using $_SESSION inside of user functions

2004-04-11 Thread Andy B
//log function
//writes log files

function WriteLog($LogType){
switch($LogType:
case "login":
//use session vars here...
}

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



Re: [PHP] using $_SESSION inside of user functions

2004-04-11 Thread daniel
> //log function
> //writes log files
>
> function WriteLog($LogType){
> switch($LogType:
> case "login":
> //use session vars here...
> }
>

What is the question ?

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



Re: [PHP] using $_SESSION inside of user functions

2004-04-11 Thread Andy B
didnt know if it was possible to use $_SESSION vars in that function or any
user defined functions for that matter...


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 11, 2004 8:11 PM
Subject: Re: [PHP] using $_SESSION inside of user functions


> > //log function
> > //writes log files
> >
> > function WriteLog($LogType){
> > switch($LogType:
> > case "login":
> > //use session vars here...
> > }
> >
>
> What is the question ?
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



Re: [PHP] creating log files out of a delete statement

2004-04-11 Thread John W. Holmes
Andy B wrote:

i have a section of a website that deletes records from a mysql table...
right now all the query is is a delete statement but i need to make a "log
file" in this format:
current time::username who executed delete:: deleted(name of record)::delete
completed
or delete failed depending on what happened... i can do all of the log
except dont exactly know how to extract the "Name" field of the deleted
record before it actually gets dumped.. that way i can use it on the log...
There's no way to extract it from the DELETE. You'll have to do a SELECT 
with the same parameters that you're going to do the DELETE with. Grab 
your data with the SELECT then execute the DELETE.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] using $_SESSION inside of user functions

2004-04-11 Thread John W. Holmes
Andy B wrote:

//log function
//writes log files
function WriteLog($LogType){
switch($LogType:
case "login":
//use session vars here...
}
Yes.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re: [PHP] using $_SESSION inside of user functions

2004-04-11 Thread daniel
> Andy B wrote:
>
>> //log function
>> //writes log files
>>
>> function WriteLog($LogType){
>> switch($LogType:
>> case "login":
>> //use session vars here...
>> }
>
> Yes.
>

yes in the latest, all request methods are in the super global scope,
$_POST, $_GET, $_SERVER, $_SESSION and constants can be used within the
function

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



Re: [PHP] creating log files out of a delete statement

2004-04-11 Thread Andy B
got it will try that instead..

- Original Message - 
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, April 11, 2004 8:23 PM
Subject: Re: [PHP] creating log files out of a delete statement


> Andy B wrote:
>
> > i have a section of a website that deletes records from a mysql table...
> > right now all the query is is a delete statement but i need to make a
"log
> > file" in this format:
> > current time::username who executed delete:: deleted(name of
record)::delete
> > completed
> > or delete failed depending on what happened... i can do all of the log
> > except dont exactly know how to extract the "Name" field of the deleted
> > record before it actually gets dumped.. that way i can use it on the
log...
>
> There's no way to extract it from the DELETE. You'll have to do a SELECT
> with the same parameters that you're going to do the DELETE with. Grab
> your data with the SELECT then execute the DELETE.
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com
>
>

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



[PHP] How do you handle device detection?

2004-04-11 Thread Richard Davey
Hi all,

This is just a general question to get some ideas from the "wider
world" as it were.

Say you've finished your site. It looks lovely and works perfectly.
You have a CSS file for modern browsers and one that degrades for
text-only devices also. You even have a special "small width" version
for PDAs and the like.

So how do you go about detecting just what is looking at your site?
How would you handle detecting and then serving the same site for a
standard browser, a screen-reader, a PDA device or a WAP/mobile
device?

Any tips/suggestions gratefully listened to.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] creating log files out of a delete statement

2004-04-11 Thread Robert Sossomon
How are you passing the name through??  If using a form to do it then just
use the $_POST[name] or $_GET[name] in the logfile.  You have to have the
name pull in the previous page, just pass it through:



or:
 got it will try that instead..
>
> - Original Message -
> From: "John W. Holmes" <[EMAIL PROTECTED]>
> To: "Andy B" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Sunday, April 11, 2004 8:23 PM
> Subject: Re: [PHP] creating log files out of a delete statement
>
>
>> Andy B wrote:
>>
>> > i have a section of a website that deletes records from a mysql
>> table...
>> > right now all the query is is a delete statement but i need to make a
> "log
>> > file" in this format:
>> > current time::username who executed delete:: deleted(name of
> record)::delete
>> > completed
>> > or delete failed depending on what happened... i can do all of the log
>> > except dont exactly know how to extract the "Name" field of the
>> deleted
>> > record before it actually gets dumped.. that way i can use it on the
> log...
>>
>> There's no way to extract it from the DELETE. You'll have to do a SELECT
>> with the same parameters that you're going to do the DELETE with. Grab
>> your data with the SELECT then execute the DELETE.
>>
>> --
>> ---John Holmes...
>>
>> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>>
>> php|architect: The Magazine for PHP Professionals – www.phparch.com
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



[PHP] Re: How do you handle device detection?

2004-04-11 Thread Lukasz Karapuda
Richard,

You would do that by looking at the user_agent parameter that is being send
by the browser to the server. PHP automatically places the user_agent
information in the superglobal: $_SERVER['HTTP_USER_AGENT']. The user_agent
string might seems cryptic, therefore PHP provides you a built-in function
for representing the user agent information in an object with properties
representing the features of the browser. The function is get_browser().
Link to documentation of this function:

http://www.php.net/manual/en/function.get-browser.php

Good luck,

Lukasz Karapuda




"Richard Davey" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> This is just a general question to get some ideas from the "wider
> world" as it were.
>
> Say you've finished your site. It looks lovely and works perfectly.
> You have a CSS file for modern browsers and one that degrades for
> text-only devices also. You even have a special "small width" version
> for PDAs and the like.
>
> So how do you go about detecting just what is looking at your site?
> How would you handle detecting and then serving the same site for a
> standard browser, a screen-reader, a PDA device or a WAP/mobile
> device?
>
> Any tips/suggestions gratefully listened to.
>
> --
> Best regards,
>  Richard Davey
>  http://www.phpcommunity.org/wiki/296.html

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



php-general Digest 12 Apr 2004 03:58:45 -0000 Issue 2700

2004-04-11 Thread php-general-digest-help

php-general Digest 12 Apr 2004 03:58:45 - Issue 2700

Topics (messages 183124 through 183139):

Re: trying to output a hyperlink
183124 by: Michal Migurski

Re: adding items to a list or menu
183125 by: Robert

PHP5 RC1 rpms for Mandrake 10
183126 by: Andrei Verovski (aka MacGuru)

function imagecreatefromjpeg pb
183127 by: Cosas minovela
183128 by: Cosas minovela

creating log files out of a delete statement
183129 by: Andy B
183133 by: John W. Holmes
183136 by: Andy B
183138 by: Robert Sossomon

using $_SESSION inside of user functions
183130 by: Andy B
183131 by: daniel.electroteque.org
183132 by: Andy B
183134 by: John W. Holmes
183135 by: daniel.electroteque.org

How do you handle device detection?
183137 by: Richard Davey
183139 by: Lukasz Karapuda

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 ---
>Although, it could be shortened even more, to:
>
>Click here";
>   echo $link;?>

Or still more, to:
Click Here

...which starts to approach the original legibility of HTML for me, and
the syntax hilighting in BBEdit is corrrect. I've been tending to use
constructions like that instead of templating classes like smarty or
printf constructiions, and I've been very pleased with em.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
"R.G. Vervoort" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Not sure if it is a php question but since i am working in php here it is.
> 
> Ho can i add items to (the item label=visual text and the value=index
> number) a list object on a website.
> 
> I am having a list with 4 items and i would like to add the text from a
> textfield (textfield1.value) to the list object so it will hold 5 items.
> 
> thanks for any suggestions
> 
> Roy
> The Netherlands

PHP is server side, it looks like you want to send items to a client
side app (javascript?) you could do something like this:

--->Snip!

\n"; //Not a javascript guy,
but you get the point

foreach($array as $key=>$item) {
   echo "\n textdata.item$key=$item";
}

?>
 etc.

<---

Not sure how javascript looks (started working with it in last 2 days)
but you can change that echo statement to what it should be in
javascript

Cheers!

Robert
--- End Message ---
--- Begin Message ---
Hi,

Anyone can suggest me where I can get PHP5 RC1 rpms (with possible max# of 
extensions) for Mandrake 10? I have tried to make them myself, but run into 
numerous problems.

Thanks in advance for any suggestion(s)

Andrei Verovski (aka MacGuru)
--- End Message ---
--- Begin Message ---
about GD, Warning: imagecreatefromjpeg(): '/var/www/html/datos/2004/02/crio25.jpg' is 
not a valid JPEG file. how can i solve it please?

image pass the EOF and BOF test, so this is not the problem :)--- End Message ---
--- Begin Message ---





about GD, Warning: imagecreatefromjpeg(): 
'/var/www/html/datos/2004/02/crio25.jpg' is not a valid JPEG file. how can i 
solve it please?
 
image pass the EOF and BOF test, so this is not the 
problem :)
 
here you got the image with problems , i'm sorry 
about the content of image...
 
http://www.paginadespud.com/datos/2004/02/crio25.jpg
 
--- End Message ---
--- Begin Message ---
hi...

i have a section of a website that deletes records from a mysql table...
right now all the query is is a delete statement but i need to make a "log
file" in this format:
current time::username who executed delete:: deleted(name of record)::delete
completed
or delete failed depending on what happened... i can do all of the log
except dont exactly know how to extract the "Name" field of the deleted
record before it actually gets dumped.. that way i can use it on the log...

any ideas how to do it in the best way??
--- End Message ---
--- Begin Message ---
Andy B wrote:

i have a section of a website that deletes records from a mysql table...
right now all the query is is a delete statement but i need to make a "log
file" in this format:
current time::username who executed delete:: deleted(name of record)::delete
completed
or delete failed depending on what happened... i can do all of the log
except dont exactly know how to extract the "Name" field of the deleted
record before it actually gets dumped.. that way i can use it on the log...
There's no way to extract it from the DELETE. You'll have to do a SELECT 
with the same parameters that you're going to do the DELETE with. Grab 
your data with the SELECT then execute the DELETE.

--
---John Holmes...
Amazon Wishlist: www.amazon.