Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Michael A. Peters
Raymond Irving wrote: Hello, After talking with Michael about how to generate XHTML code using the DOM I came up with this little function that I'm thinking of using to generate XHTML code that's HTML compatible: function saveXHTML($dom) { $html = $dom->saveXML(null,LIBXML_NOEMPTYTAG);

Re: [PHP] What was the unix timestamp of last week, Monday 12:00 am?

2009-04-12 Thread Robert Cummings
On Sun, 2009-04-12 at 20:12 -0600, René Fournier wrote: > I'm trying to write a [simple] function, such that: > > function earlier_unix_timestamp () { > $now = mktime(); > [...] > return $then; // e.g., 1238983107 > } > > Anyone have something already made? There seem t

Re: [PHP] Connecting to dBase using ODBC on Mac OS X

2009-04-12 Thread Matt Neimeyer
I know this isn't exactly what you were probably looking for but... If you have a Windows machine available I would recommend taking a look at the ODBTP project at http://odbtp.sourceforge.net. ODBTP stands for Open DataBase Transport Protocol. The short version is that you add a client module to

RE: [PHP] what to use instead of foreach

2009-04-12 Thread Leon du Plessis
You may try something basic like: $b = 1; foreach ($my_array as $a) { echo " $a "; //Send new line to browser if ($b++ == 3) { echo ""; $b = 1; } } Or there are some different ways to approach this also like: for ($a =& current($my_array); $a; $a = next($my_array)) { //Format

Re: [PHP] pear mdb2 and null

2009-04-12 Thread Michael A. Peters
Michael A. Peters wrote: Phpster wrote: On Apr 11, 2009, at 21:38, "Michael A. Peters" wrote: I've run into a small issue with mdb2. I have a mysql database with a field set to longtext not null. inserting "" into that field works just dandy when using the mysql_ functions. However, wh

[PHP] What was the unix timestamp of last week, Monday 12:00 am?

2009-04-12 Thread René Fournier
I'm trying to write a [simple] function, such that: function earlier_unix_timestamp () { $now = mktime(); [...] return $then; // e.g., 1238983107 } Anyone have something already made? There seem to be many ways to skin this cat, with date() arithmetic, etc.

Re: [PHP] Re: $_GET verses $_POST

2009-04-12 Thread Michael A. Peters
Micah Gersten wrote: Ron Piggott wrote: How do I know when to use $_GET verses $_POST? Is there a pre defined variable that does both? Ron One of the things usually left out of this discussion is the actual intended use for each of these. I submit the following 2 reference links: http://ww

Re: [PHP] extract varying data from array with different formatting

2009-04-12 Thread Ashley Sheridan
On Sat, 2009-04-11 at 16:11 -0500, PJ wrote: > foreach does a nice job if you want the results identical each time. > What can you use to change the formatting of the results dependent on > the number of results. > Here's an example: > foreach ( $authors[$bookID] AS $authorID => $authorData ) { >

Re: [PHP] what to use instead of foreach

2009-04-12 Thread Ashley Sheridan
On Sun, 2009-04-12 at 13:56 -0500, PJ wrote: > foreach does not allow for different formatting for output... > What could be used as a workaround? > example: > echo $some_result, ""; // will print all results in 1 column > echo $some_result, ","; // will print all results comma-separated in 1 row >

[PHP] Re: $_GET verses $_POST

2009-04-12 Thread Micah Gersten
Ron Piggott wrote: > How do I know when to use $_GET verses $_POST? > > Is there a pre defined variable that does both? > > Ron > One of the things usually left out of this discussion is the actual intended use for each of these. I submit the following 2 reference links: http://www.w3.org/TR/h

Re: [PHP] $_GET verses $_POST

2009-04-12 Thread Michael A. Peters
Jason Pruim wrote: On Apr 12, 2009, at 1:48 PM, Ron Piggott wrote: Thanks. I got my script updated. Ron There are a few other thing's that I didn't see mentioned... The best description of when to use what, is this.. Use POST when you are submitting a form for storing info, using GET wh

[PHP] Suggestion on .htaccess

2009-04-12 Thread 9el
This is a .htaccess for a MU blog the index file is kept at : public_html/ And main blog is kept at: public_html/blog It is causing severe cache issue. SuperCache plugin is not working. The blog is running out of memory most of times and consuming huge CPU. Any suggestions? # BEGIN WPSuperCach

Re: [PHP] $_GET verses $_POST

2009-04-12 Thread Jason Pruim
On Apr 12, 2009, at 1:48 PM, Ron Piggott wrote: Thanks. I got my script updated. Ron There are a few other thing's that I didn't see mentioned... The best description of when to use what, is this.. Use POST when you are submitting a form for storing info, using GET when you are retrie

Re: [PHP] $_GET verses $_POST

2009-04-12 Thread Phpster
There are no real security issues with the $_REQUEST object. What needs to be taken into consideration is that the order that the PHP engine gathers data from the system ( GPCS ) and the potential issues having cookies or session data named the same as the actual data you are trying to acce

Re: [PHP] extract varying data from array with different formatting

2009-04-12 Thread Jim Lucas
PJ wrote: foreach does a nice job if you want the results identical each time. What can you use to change the formatting of the results dependent on the number of results. Here's an example: foreach ( $authors[$bookID] AS $authorID => $authorData ) { # Display the

Re: [PHP] pear mdb2 and null

2009-04-12 Thread Michael A. Peters
Phpster wrote: On Apr 11, 2009, at 21:38, "Michael A. Peters" wrote: I've run into a small issue with mdb2. I have a mysql database with a field set to longtext not null. inserting "" into that field works just dandy when using the mysql_ functions. However, when using mdb2 - it convert

[PHP] what to use instead of foreach

2009-04-12 Thread PJ
foreach does not allow for different formatting for output... What could be used as a workaround? example: echo $some_result, ""; // will print all results in 1 column echo $some_result, ","; // will print all results comma-separated in 1 row But how do you get result1, result2 & result3 // with

Re: [PHP] New installation and can not more include files

2009-04-12 Thread Michelle Konzack
Am 2009-04-12 20:05:31, schrieb Michelle Konzack: > Oops... I mean Thanks, Greetings and nice Day/Evening Michelle Konzack -- Linux-User #280138 with the Linux Counter, http://counter.li.org/

[PHP] New installation and can not more include files

2009-04-12 Thread Michelle Konzack
Hello, to test a new setup I have setup DynDNS.org and it works, but... the copied config of my working website is failing here to include ANY files... I do not find the difference between the configs. Please can you tell me where I must looking

Re: [PHP] $_GET verses $_POST

2009-04-12 Thread Ron Piggott
Thanks. I got my script updated. Ron On Sun, 2009-04-12 at 22:33 +0600, 9el wrote: > > > > One thing you should know is that when you use $_GET, you'll > be sending a little information about the particular page to > the browser and therefore it would be dis

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Raymond Irving
It appears that the email system stripped out the "& #13;" from this line: $html = str_replace(' ','',$html); Best regards, __ Raymond Irving --- On Sun, 4/12/09, Raymond Irving wrote: > From: Raymond Irving > Subject: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument > To: "ph

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Raymond Irving
Hi Michael, --- On Sun, 4/12/09, Michael Shadle wrote: > If this will maintain utf-8 I might be able to use it :) > which > according to the last thread, saveHTML munges utf-8 stuff > due to > libxml... > > Hopefully this week I can give it a go. I think it should work just fine as saveXML pro

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Michael Shadle
On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving wrote: > > Hello, > > After talking with Michael about how to generate XHTML code using the DOM I > came up with this little function that I'm thinking of using to generate > XHTML code that's HTML compatible: > > function saveXHTML($dom) { >    $h

Re: [PHP] $_GET verses $_POST

2009-04-12 Thread 9el
> One thing you should know is that when you use $_GET, you'll be sending a > little information about the particular page to the browser and therefore it > would be displayed in the address bar so for example if you're using get on > a login page, you'll be showing user id and passwrod in the addr

RE: [PHP] $_GET verses $_POST

2009-04-12 Thread abdulazeez alugo
> From: ron@actsministries.org > To: php-general@lists.php.net > Date: Sun, 12 Apr 2009 10:23:01 -0400 > Subject: [PHP] $_GET verses $_POST > > How do I know when to use $_GET verses $_POST? > > Is there a pre defined variable that does both? > > Ron Hi Ron, One thing you should kn

[PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Raymond Irving
Hello, After talking with Michael about how to generate XHTML code using the DOM I came up with this little function that I'm thinking of using to generate XHTML code that's HTML compatible: function saveXHTML($dom) { $html = $dom->saveXML(null,LIBXML_NOEMPTYTAG); $html = str_replace('

[PHP] $_GET verses $_POST

2009-04-12 Thread Ron Piggott
How do I know when to use $_GET verses $_POST? Is there a pre defined variable that does both? Ron

Re: [PHP] pear mdb2 and null

2009-04-12 Thread Phpster
On Apr 11, 2009, at 21:38, "Michael A. Peters" wrote: I've run into a small issue with mdb2. I have a mysql database with a field set to longtext not null. inserting "" into that field works just dandy when using the mysql_ functions. However, when using mdb2 - it converts "" to NULL wh

Re: [PHP] $_GET verses $_POST

2009-04-12 Thread Phpster
$_GET when the form uses get or parameters are passed via the querystring $_POST when the form method is post $_REQUEST does both Bastien Sent from my iPod On Apr 12, 2009, at 10:23, Ron Piggott wrote: How do I know when to use $_GET verses $_POST? Is there a pre defined variable tha

Re: [PHP] Problems with exec() on windows

2009-04-12 Thread henrikolsen
I can confirm the presence of the same issue on my installation, 5.2.9-2 on Windows XP. Very annoying bug. -- This message was sent on behalf of henrikol...@gmail.com at openSubscriber.com http://www.opensubscriber.com/message/php-general@lists.php.net/11719414.html -- PHP General Mailing List