Re: [PHP] Floored!

2006-02-24 Thread Rasmus Lerdorf

Ben Miller wrote:

If anyone has an answer for this, I would be greatly appreciative.

I was trying to compare two values, the first is the total cost of products
to be refunded, and the second is the original order total.  To the naked
eye, they both were coming out as 102.85, yet an if($Refund_Amount 
$Order_Total) was coming back true, so.

I ran some tests, and did the following:

$Order_Total = sprintf(%01.20f,$Order_Total);
$Refund_Amount = sprintf(%01.20f,$Refund_Amount);

which produced:

$Order_Total = 102.84431566
and $Refund_Amount = 102.85852651

so, I figured I would try the following to make sure that the figures in the
database weren't weird:

$Bar = 102.85;
$Foo = sprintf(%01.20f,$Bar);

echo \$Foo = $Foo;

which produced:

$Foo = 102.84431566;

I am completely lost.


Read the note on floating point precision here:

  http://us3.php.net/manual/en/language.types.float.php

You need to either work completely in pennies and only convert to 
dollars for display purposes so you are always working with integers, or 
you need to introduce a little fuzz factor whenever you are doing 
operations on floating point values.


There is simply no way for a computer to accurately represent a fraction 
with anything other than an estimation.  The typical fix if you don't 
want to switch to using integer math is to add an appropriate fuzz 
factor.  Like this:


  $fuzz = 0.001;
  if(floor($value+$fuzz) == 10) ...

That is, if the floating point $value happens to be 9.999 or 
10.001 then applying this fuzz factor and doing the floor 
operation, you will always get 10 as long as your fuzz factor is larger 
than the precision error of your machine.


-Rasmus

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



Re: [PHP] Floored!

2006-02-24 Thread Brandon Enright
On Thu, 2006-02-23 at 23:38 -0700, Ben Miller wrote:
 If anyone has an answer for this, I would be greatly appreciative.
 
 I was trying to compare two values, the first is the total cost of products
 to be refunded, and the second is the original order total.  To the naked
 eye, they both were coming out as 102.85, yet an if($Refund_Amount 
 $Order_Total) was coming back true, so.
 
 I ran some tests, and did the following:
 
   $Order_Total = sprintf(%01.20f,$Order_Total);
   $Refund_Amount = sprintf(%01.20f,$Refund_Amount);
 
 which produced:
 
   $Order_Total = 102.84431566
 and   $Refund_Amount = 102.85852651
 
 so, I figured I would try the following to make sure that the figures in the
 database weren't weird:
 
   $Bar = 102.85;
   $Foo = sprintf(%01.20f,$Bar);
 
   echo \$Foo = $Foo;
 
 which produced:
 
   $Foo = 102.84431566;
 
 I am completely lost.
 

This is an oversimplification but basically to represent any decimal in
binary you need to do so as the sum of the reciprocal powers of two.
That is, .5 + .25 + .125 + .0625... an so on.  If you have nice even
numbers like .75 then a few bits will do.  If you don't you need
increasingly smaller terms until you reach the sum.  You need 37 bits
just to represent .85 exactly.  The floating point numbers your are
using only have 32 bits total (and not even all of them are mantissa
bits).


A description of the standard:

http://www.psc.edu/general/software/packages/ieee/ieee.html


An excellent treatise of the subject:

http://docs.sun.com/source/806-3568/ncg_goldberg.html


Brandon

-- 
Brandon Enright
UCSD ACS/Network Operations
[EMAIL PROTECTED]

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



[PHP] list days between two dates

2006-02-24 Thread pol
Anyony know a funtction to do this?
I need to popup a select with the dates.

thank's
Pol 

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



Re: [PHP] Calling API on Windows?

2006-02-24 Thread Jochem Maas
HoWang Wang wrote:
 Hi,
 
 How can I use it?
 For example:
 [lib='user32.dll'] int MessageBoxA(int handle, char *text, char
 *caption, int type);
 How can I write this sentence?
 What is the format?
 And I want to use GetComputerNameA, what can I do?
 
 ?php
 $win32_idl = [lib='user32.dll'] int MessageBoxA(int handle, char *text,
 char *caption, int type);
 [lib='kernel32.dll'] int GetComputerNameA (char *lpBuffer, DWORD nSize);;
 
 $ffi = new ffi($win32_idl);
 $compname = '';
 $r = $ffi-GetComputerNameA($compname,255);
 echo $r; //Debug
 echo $ffi-MessageBoxA(0, The Computer Name is  . $compname, Test, 0);
 ?
 
 doesn't work, it give me an error.

could you please move the roof of your house so I
can see your computer monitor? (what's the error?)

did you search for the error on google or yahoo or
insert-favorite-search-engine?


 Please help, thx!
 
 
 Jochem Maas wrote:
 
Hi Ho, (7 dwarfs anyone? ;-)

click this link to download php4.4.2 (not the installer version)
it contains the DLL your looking for:

http://hk.php.net/get/php-4.4.2-Win32.zip/from/a/mirror

in the event that your using php5 then w32api is no longer
available - it has been replaced with fcc:

http://pecl.php.net/package/ffi

you can download a binary ddl (built automatically from cvs) here:
http://pecl4win.php.net/ext.php/php_ffi.dll


HoWang Wang wrote:


Dear all,

I have a question on w32api ( http://hk.php.net/manual/en/ref.w32api.php
). I'm developing a command line program with PHP on windows, and I want
to call some API. But I cannot found the dll required for the w32api
extension. I'm using PHP/5.0.5, does anyone have an idea? Or there is
another extension can call Windows API?

Thanks
Ho Wang

 
 

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



Re: [PHP] Calling API on Windows?

2006-02-24 Thread HoWang Wang
Okay, here is the error:
http://hwhome.hkto.net:808/apidie.jpg
I'm using CHT version of windows, but I think you should seen this
window before.

I've searched on google, but I find lots of ffi that != Foreign Function
Interface :(

I found this:
http://www.cweiske.de/download/phpgtk/pear/System_WinDrives.phps which
use PHP's w32api on PHP4 and use FFI on PHP5. But it provide a simple
example of using ffi only, and I'm still confused on it.

Please help, Thx!

Ho Wang


Jochem Maas wrote:
 HoWang Wang wrote:
 
Hi,

How can I use it?
For example:
[lib='user32.dll'] int MessageBoxA(int handle, char *text, char
*caption, int type);
How can I write this sentence?
What is the format?
And I want to use GetComputerNameA, what can I do?

?php
$win32_idl = [lib='user32.dll'] int MessageBoxA(int handle, char *text,
char *caption, int type);
[lib='kernel32.dll'] int GetComputerNameA (char *lpBuffer, DWORD nSize);;

$ffi = new ffi($win32_idl);
$compname = '';
$r = $ffi-GetComputerNameA($compname,255);
echo $r; //Debug
echo $ffi-MessageBoxA(0, The Computer Name is  . $compname, Test, 0);
?

doesn't work, it give me an error.
 
 
 could you please move the roof of your house so I
 can see your computer monitor? (what's the error?)
 
 did you search for the error on google or yahoo or
 insert-favorite-search-engine?
 
 
 
Please help, thx!


Jochem Maas wrote:


Hi Ho, (7 dwarfs anyone? ;-)

click this link to download php4.4.2 (not the installer version)
it contains the DLL your looking for:

http://hk.php.net/get/php-4.4.2-Win32.zip/from/a/mirror

in the event that your using php5 then w32api is no longer
available - it has been replaced with fcc:

http://pecl.php.net/package/ffi

you can download a binary ddl (built automatically from cvs) here:
http://pecl4win.php.net/ext.php/php_ffi.dll


HoWang Wang wrote:



Dear all,

I have a question on w32api ( http://hk.php.net/manual/en/ref.w32api.php
). I'm developing a command line program with PHP on windows, and I want
to call some API. But I cannot found the dll required for the w32api
extension. I'm using PHP/5.0.5, does anyone have an idea? Or there is
another extension can call Windows API?

Thanks
Ho Wang




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



[PHP] loop Q

2006-02-24 Thread William Stokes
What does this do in a for loop?

$counter+=1



Thanks

-Will

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



Re: [PHP] loop Q

2006-02-24 Thread Duncan Hill
On Friday 24 February 2006 10:34, William Stokes wrote:
 What does this do in a for loop?

 $counter+=1

Increments $counter.

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



Re: [PHP] loop Q

2006-02-24 Thread ÃmìtVërmå

It depicts
$counter = $counter+1;

William Stokes wrote:


What does this do in a for loop?

$counter+=1



Thanks

-Will

 



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



Re: [PHP] loop Q

2006-02-24 Thread Jochem Maas

William Stokes wrote:

What does this do in a for loop?

$counter+=1



it's shorthand for $counter = $counter + 1;
which in this case (because 1 is being added)
can also be written as:

$counter++;

or

++$counter;


those last 2 alternatives give the same result
but they are _not_ exactly equivalent - it has to do
with when the incrementation is done when such expression
appears inside a more complex expression e.g.

$counter = 1;
$x = ++$counter;
$counter = 1;
$y = $counter++;
echo $x,,,$y,\n; // outputs: 2,1





Thanks

-Will



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



RE: [PHP] base64_encode, forward slashes and mod_rewrite

2006-02-24 Thread Jared Williams
 
There are variants of base64,  which replace the + / characters with something 
less likely to cause problems.

http://en.wikipedia.org/wiki/Base64

Jared

 
 sorry Ive done it again, for anyones interest, you might have 
 to urlencode the string twice for mod_rewrite to accept 
 encrypted and base64_encoded strings which add slashes and 
 ampersands into their strings.
 
 It is confirmed there is a bug in mod_rewrite and doesnt like 
 the urlencoded %2F characters.
 
 On 24/02/2006, at 10:31 AM, Dan Rossi wrote:
 
  Continueing on my prior problem, Ive discovered that base64_encode 
  adds forward slashes in its encoded string, when its urlencoded it 
  becomes something like
 
  /feeds/UmFuZG9tSVZd%2FMChU7sMQqdUi%2FrgYHD7
 
 
  mod_rewrite doesnt seem to like the %2F in the string and 
 fails with a
  404 as it doesnt get a match using
 
  RewriteRule ^feeds/(.*)$ /refer.php?$1 [L,NE]
 
  What should i do ? Should i replace the / with a different 
 character 
  then convert it back later ?
 
 --
 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] loop Q

2006-02-24 Thread William Stokes
Cheers!

Jochem Maas [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED]
 William Stokes wrote:
 What does this do in a for loop?

 $counter+=1


 it's shorthand for $counter = $counter + 1;
 which in this case (because 1 is being added)
 can also be written as:

 $counter++;

 or

 ++$counter;


 those last 2 alternatives give the same result
 but they are _not_ exactly equivalent - it has to do
 with when the incrementation is done when such expression
 appears inside a more complex expression e.g.

 $counter = 1;
 $x = ++$counter;
 $counter = 1;
 $y = $counter++;
 echo $x,,,$y,\n; // outputs: 2,1




 Thanks

 -Will
 

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



[PHP][SOLVED] Problem with mail() on Debian

2006-02-24 Thread George Pitcher
Hi,

Thanks to David - his suggestion to comment out the php.ini sendmail_path
line and reverting to using Manuel's email class solved the problem.

Many thanks to all.

George

 -Original Message-
 From: Manuel Lemos [mailto:[EMAIL PROTECTED]
 Sent: 23 February 2006 7:58 pm
 To: php-general@lists.php.net
 Subject: Re: [PHP] Problem with mail() on Debian


 Hello,

 on 02/23/2006 11:32 AM George Pitcher said the following:
   My apache error.log says:
 
  sh: line 1: /usr/sbin/sendmail -t: no such file or directory

 /usr/sbin/sendmail is not the correct sendmail program path. The correct
 path is /usr/lib/sendmail . It may be odd that a program is located in
 /usr/lib but that has always been the standard path for sendmail and
 compatible MTA. Sometimes it is a symbolic link to /usr/sbin/sendmail
 but that is not necessarily true.

 --

 Regards,
 Manuel Lemos

 Metastorage - Data object relational mapping layer generator
 http://www.metastorage.net/

 PHP Classes - Free ready to use OOP components written in PHP
 http://www.phpclasses.org/

 --
 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] Date question

2006-02-24 Thread William Stokes
Hello,

I have a datetime column in MySQL DB. How can I match to that column from 
php code if I only have the date information available.

2006-02-24 12:00:00  against2006-02-24

This might be more SQL question sorry about that.

Thanks
-Will

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



[PHP] Re: Date question

2006-02-24 Thread William Stokes
Yep. Nevermind...

(and back to sleep)

William Stokes [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED]
 Hello,

 I have a datetime column in MySQL DB. How can I match to that column from 
 php code if I only have the date information available.

 2006-02-24 12:00:00  against2006-02-24

 This might be more SQL question sorry about that.

 Thanks
 -Will 

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



Re: [PHP] Date question

2006-02-24 Thread ÃmìtVërmå
If you are only avail with date-information then too you can use 
existing DATETIME field as following query..


INSERT INTO `test` (`testingdate` ) VALUES ( '2006-06-06');

it will take care of itself.

Second way is you can change DATETIME field to VARCHAR (if you're not 
going to use those dates in date related calculations and MySQL 
functions etc.)


Both ways it would work fine.




William Stokes wrote:


Hello,

I have a datetime column in MySQL DB. How can I match to that column from 
php code if I only have the date information available.


2006-02-24 12:00:00  against2006-02-24

This might be more SQL question sorry about that.

Thanks
-Will

 



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



Re: [PHP] loop Q

2006-02-24 Thread Jochem Maas

[EMAIL PROTECTED] wrote:

William Stokes wrote:


What does this do in a for loop?

$counter+=1



I read it as if he'd come across this:

for ($counter=0; $counter$stopper; $counter+=1)
{
  ... lots of code ...

  $counter+=1;
}

Which, I think, would increment the counter twice on each pass
through. The line in the loop needs deleting.

That's just how I read it.


be ware of making assumptions like that, for instance
the loop could very well be:

for ($counter=0; $counter$stopper;)
{
// ... lots of code ...
$counter+=1;
}

or


for ($counter=0; $counter$stopper;$counter+=1)
{
// ... lots of code ... 
}

which are both valid.



Actually, I'm testing this list .. every time I post it never appears
so I'm wondering whether this will / the problem's been fixed.


it got thru :-)



J


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



[PHP] Compiling PHP with freetype2 on MacOS X

2006-02-24 Thread Marcus Bointon
Recently I've not been able to compile PHP 5.1.2 on OS X 10.4 with gd  
and freetype2 support. I've found various threads on this, but none  
of the proposed fixes work. My configure line includes:


--with-gd=/sw --with-freetype-dir=/sw/lib/freetype2 --with-t1lib=/sw

It doesn't report any problems when configuring:

...
checking for GD support... yes
checking for the location of libjpeg... /sw
checking for the location of libpng... /sw
checking for the location of libXpm... no
checking for FreeType 1.x support... /sw
checking for FreeType 2... /sw/lib/freetype2
checking for T1lib support... /sw
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for jpeg_read_header in -ljpeg... (cached) yes
checking for png_write_image in -lpng... (cached) yes
If configure fails try --with-xpm-dir=DIR
checking for FreeType 1 support... no - FreeType 2.x is to be used  
instead

checking for T1_StrError in -lt1... (cached) yes
checking for gdImageString16 in -lgd... (cached) yes
checking for gdImagePaletteCopy in -lgd... (cached) yes
checking for gdImageCreateFromPng in -lgd... (cached) yes
checking for gdImageCreateFromGif in -lgd... (cached) yes
checking for gdImageGif in -lgd... (cached) yes
checking for gdImageWBMP in -lgd... (cached) yes
checking for gdImageCreateFromJpeg in -lgd... (cached) yes
checking for gdImageCreateFromXpm in -lgd... (cached) yes
checking for gdImageCreateFromGd2 in -lgd... (cached) yes
checking for gdImageCreateTrueColor in -lgd... (cached) yes
checking for gdImageSetTile in -lgd... (cached) yes
checking for gdImageEllipse in -lgd... no
checking for gdImageSetBrush in -lgd... (cached) yes
checking for gdImageStringTTF in -lgd... (cached) yes
checking for gdImageStringFT in -lgd... (cached) yes
checking for gdImageStringFTEx in -lgd... (cached) yes
checking for gdImageColorClosestHWB in -lgd... (cached) yes
checking for gdImageColorResolve in -lgd... (cached) yes
checking for gdImageGifCtx in -lgd... (cached) yes
checking for gdCacheCreate in -lgd... (cached) yes
checking for gdFontCacheShutdown in -lgd... (cached) yes
checking for gdFreeFontCache in -lgd... (cached) yes
checking for gdNewDynamicCtxEx in -lgd... (cached) yes
checking for gdImageCreate in -lgd... (cached) yes

but when I make:

/Users/marcus/src/php-5.1.2/ext/gd/gd.c: In function 'zm_info_gd':
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:505: error: 'FREETYPE_MAJOR'  
undeclared (first use in this function)
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:505: error: (Each undeclared  
identifier is reported only once
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:505: error: for each function  
it appears in.)
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:505: error: 'FREETYPE_MINOR'  
undeclared (first use in this function)

/Users/marcus/src/php-5.1.2/ext/gd/gd.c: In function 'php_imagechar':
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:2817: warning: pointer  
targets in passing argument 1 of 'strlen' differ in signedness
/Users/marcus/src/php-5.1.2/ext/gd/gd.c: In function  
'php_imagettftext_common':
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:3197: warning: pointer  
targets in passing argument 4 of 'gdImageStringFTEx' differ in  
signedness
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:3197: warning: pointer  
targets in passing argument 9 of 'gdImageStringFTEx' differ in  
signedness
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:3203: warning: pointer  
targets in passing argument 4 of 'gdImageStringFT' differ in signedness
/Users/marcus/src/php-5.1.2/ext/gd/gd.c:3203: warning: pointer  
targets in passing argument 9 of 'gdImageStringFT' differ in signedness

make: *** [ext/gd/gd.lo] Error 1

Those undefined constants sound like it's missing a header file  
somewhere.


I've also tried using the built-in freetype2 lib using --with- 
freetype-dir=/usr/X11R6 but that gives me the same error. I've also  
tried using the bundled gd lib, again I get the same error. I've cut  
my configure line down to just the options for the environment, gd  
and freetype. I've looked in /sw/lib/freetype2/include/freetype2/ 
freetype/freetype.h and the missing constants are correctly defined  
in there, and also in /usr/X11R6/include/freetype2/freetype/ 
freetype.h Those files should be found using the paths I gave in  
configure.


Anyone got any idea how I can fix this?

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

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



Re: [PHP] list days between two dates

2006-02-24 Thread tedd

Anyony know a funtction to do this?
I need to popup a select with the dates.

thank's
Pol


Pol:

Try this:

http://www.weberdev.com/get_example-4330.html

tedd
--

http://sperling.com

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



Re: [PHP] [How-to]flatfile New system with comments

2006-02-24 Thread tedd
How would I make a flatfile new systen with the ability for users to 
comment on the news selection (no login required)?

~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com


Hi:

Perhaps this might help:

http://www.weberdev.com/get_example-420.html

tedd
--

http://sperling.com

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



[PHP] $_POST to function?

2006-02-24 Thread Jason Gerfen
I am not sure why this is not working.  Aren't $_POST vars 
superglobals?  I am trying to pass the $_POST array as an argument to a 
function and nothing is being returned.  Any help is appreciated.


return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
 echo pre; print_r( $args ); echo /pre;
}

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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



Re: [PHP] PHP Manual in PDF format

2006-02-24 Thread tedd

Hi ALL

I am looking out for PHP Manual in PDF Format

Thanks in Advance

Regards

Kaushal



Try Google:

http://iwing.cpe.ku.ac.th/tutorial/PHP/PHPmanual.pdf

I'm sure there are others.

tedd

--

http://sperling.com

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



[PHP] Re: $_POST to function?

2006-02-24 Thread Jason Gerfen

Tanoor Dieng wrote:


Hi,
are there some variables in your post array(aka are you  sure that
$_POST is not empty)?
Normally this should works.

Tanoor.

2006/2/24, Jason Gerfen [EMAIL PROTECTED]:
 


I am not sure why this is not working.  Aren't $_POST vars
superglobals?  I am trying to pass the $_POST array as an argument to a
function and nothing is being returned.  Any help is appreciated.

return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
 echo pre; print_r( $args ); echo /pre;
}

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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


   

Yep, I just double checked the $_POST vars prior to calling the 
function, ex:


echo pre; print_r( $_POST ); echo /pre; // This prints 
everything contained in $_POST without problem

return global_template( 3, $_POST, count( $_POST ), $message, NULL );

function global_template( $cmd, $args, $num, $message, $errors ) {
 echo pre; print_r( $args ); echo /pre; // This will not 
display anything in the $args-$_POST array? WTH?

}

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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



Re: [PHP] Re: $_POST to function?

2006-02-24 Thread Vidyut Luther
Since $_POST is a superglobal, it should not lose scope inside a
function() call. I could be wrong though.

Also, curious if $args is empty.. what is $num and $message. ?
Also.. you're calling a function in your return statement ?


On 2/24/06, Jason Gerfen [EMAIL PROTECTED] wrote:
 Tanoor Dieng wrote:

 Hi,
 are there some variables in your post array(aka are you  sure that
 $_POST is not empty)?
 Normally this should works.
 
 Tanoor.
 
 2006/2/24, Jason Gerfen [EMAIL PROTECTED]:
 
 
 I am not sure why this is not working.  Aren't $_POST vars
 superglobals?  I am trying to pass the $_POST array as an argument to a
 function and nothing is being returned.  Any help is appreciated.
 
 return global_template( 3, $_POST, count( $_POST ), $message );
 
 function global_template( $cmd, $args, $num, $message ) {
   echo pre; print_r( $args ); echo /pre;
  }
 
 --
 Jason Gerfen
 
 When asked what love is:
  Love is the Jager talking.
 ~Craig Baldo
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 Yep, I just double checked the $_POST vars prior to calling the
 function, ex:

 echo pre; print_r( $_POST ); echo /pre; // This prints
 everything contained in $_POST without problem
 return global_template( 3, $_POST, count( $_POST ), $message, NULL );

 function global_template( $cmd, $args, $num, $message, $errors ) {
   echo pre; print_r( $args ); echo /pre; // This will not
 display anything in the $args-$_POST array? WTH?
 }

 --
 Jason Gerfen

 When asked what love is:
  Love is the Jager talking.
 ~Craig Baldo

 --
 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] Re: $_POST to function?

2006-02-24 Thread Jason Gerfen

Vidyut Luther wrote:


Since $_POST is a superglobal, it should not lose scope inside a
function() call. I could be wrong though.

Also, curious if $args is empty.. what is $num and $message. ?
Also.. you're calling a function in your return statement ?


On 2/24/06, Jason Gerfen [EMAIL PROTECTED] wrote:
 


Tanoor Dieng wrote:

   


Hi,
are there some variables in your post array(aka are you  sure that
$_POST is not empty)?
Normally this should works.

Tanoor.

2006/2/24, Jason Gerfen [EMAIL PROTECTED]:


 


I am not sure why this is not working.  Aren't $_POST vars
superglobals?  I am trying to pass the $_POST array as an argument to a
function and nothing is being returned.  Any help is appreciated.

return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
echo pre; print_r( $args ); echo /pre;
}

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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




   


Yep, I just double checked the $_POST vars prior to calling the
function, ex:

echo pre; print_r( $_POST ); echo /pre; // This prints
everything contained in $_POST without problem
return global_template( 3, $_POST, count( $_POST ), $message, NULL );

function global_template( $cmd, $args, $num, $message, $errors ) {
 echo pre; print_r( $args ); echo /pre; // This will not
display anything in the $args-$_POST array? WTH?
}

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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


   



 

Sure, by calling return function_name( args ) it just sends vars based 
on conditional statements to a template type setup.  The $num and 
$message vars are used by the template function to determine what and 
how to display the page contents is all.


That is what I thought, $_POST is a superglobal, but it is loosing 
scope.  Could it be that I am trying to pass $_POST from one function to 
another function be causing the problem you think?  I have never ran 
into this before.


--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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



Re: [PHP] Re: $_POST to function?

2006-02-24 Thread Christopher Taylor
I am not as familiar with php as I am c++ but I wonder if you need to 
pass by reference?  Does this make sense in the context of php?


One other thing I would try is setting $temp = $_Post and then passing 
$temp.


Chris

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



Re: [PHP] Re: $_POST to function?

2006-02-24 Thread Jason Gerfen

Christopher Taylor wrote:

I am not as familiar with php as I am c++ but I wonder if you need to 
pass by reference?  Does this make sense in the context of php?


One other thing I would try is setting $temp = $_Post and then passing 
$temp.


Chris


Yeah, I actually tried that as well.

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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



RE: [PHP] $_POST to function?

2006-02-24 Thread Dan Parry
Why are you passing the POST array?  As it's superglobal why not just work
directly on it within the function?

Dan

-
Dan Parry
Senior Developer
Virtua Webtech Ltd
http://www.virtuawebtech.co.uk

-Original Message-
From: Jason Gerfen [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2006 15:27
To: PHP General (E-mail)
Subject: [PHP] $_POST to function?

I am not sure why this is not working.  Aren't $_POST vars 
superglobals?  I am trying to pass the $_POST array as an argument to a 
function and nothing is being returned.  Any help is appreciated.

return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
  echo pre; print_r( $args ); echo /pre;
 }

-- 
Jason Gerfen

When asked what love is:
 Love is the Jager talking.
~Craig Baldo

-- 
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] Re: $_POST to function?

2006-02-24 Thread Vidyut Luther
just for fun, I tried to do what you're doing.

http://www.phpcult.com/jason.phps

http://www.phpcult.com/jason.php to run it..

it seems to be working.. the problem is in your code.. but not PHP properly..

On 2/24/06, Jason Gerfen [EMAIL PROTECTED] wrote:
 Christopher Taylor wrote:

  I am not as familiar with php as I am c++ but I wonder if you need to
  pass by reference?  Does this make sense in the context of php?
 
  One other thing I would try is setting $temp = $_Post and then passing
  $temp.
 
  Chris
 
 Yeah, I actually tried that as well.

 --
 Jason Gerfen

 When asked what love is:
  Love is the Jager talking.
 ~Craig Baldo

 --
 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] Calling API on Windows?

2006-02-24 Thread tg-php
Don't know if it helps much, but maybe there's something buried in WinBinder 
(http://www.winbinder.com) that could help.  It's a much better (IMO) Windows 
GUI for PHP than GTK is... and is windows specific so might have have w32/ffi 
helper functions.

Good luck!

-TG

= = = Original message = = =

Okay, here is the error:
http://hwhome.hkto.net:808/apidie.jpg
I'm using CHT version of windows, but I think you should seen this
window before.

I've searched on google, but I find lots of ffi that != Foreign Function
Interface :(

I found this:
http://www.cweiske.de/download/phpgtk/pear/System_WinDrives.phps which
use PHP's w32api on PHP4 and use FFI on PHP5. But it provide a simple
example of using ffi only, and I'm still confused on it.

Please help, Thx!

Ho Wang



___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

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



Re: [PHP] $_POST to function?

2006-02-24 Thread Jason Gerfen

Dan Parry wrote:


Why are you passing the POST array?  As it's superglobal why not just work
directly on it within the function?

Dan

-
Dan Parry
Senior Developer
Virtua Webtech Ltd
http://www.virtuawebtech.co.uk

-Original Message-
From: Jason Gerfen [mailto:[EMAIL PROTECTED] 
Sent: 24 February 2006 15:27

To: PHP General (E-mail)
Subject: [PHP] $_POST to function?

I am not sure why this is not working.  Aren't $_POST vars 
superglobals?  I am trying to pass the $_POST array as an argument to a 
function and nothing is being returned.  Any help is appreciated.


return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
 echo pre; print_r( $args ); echo /pre;
}

 

Perhaps I should post some more of the code I am working.  I am 
attempting to create a simple method of outputing data to a template 
function which only holds html data to be displayed on the browser.  
Here is a quick overview, perhaps I cannot do this.


index.php calls this:
$data = chooser( $_SESSION['a'], $_GET['b'], $_SESSION['c'], 
$_SESSION['d'] );


Contents of chooser function:
function chooser( $level, $page, $user, $pass ) {
if( $page == global ) {
 require 'global.inc.php';
 $data = global_dhcp( $_SESSION['lvl'], $_POST['dn'], $_POST['lt'], 
$_POST['mlt'], $_POST['msc01'], $_POST['msc02'], $_POST['msc03'], 
$_POST['msc04'], $_POST['msc05'], $_POST['pxe'], $_POST['pxe01'], 
$_POST['pxe02'], $_POST['pxe03'], $_POST['pxe04'], $_POST['pxe05'], 
$_POST['pxe05'] );

}

contents of global_dhcp function:
function global_dhcp( $level, $domain, $lease, $mxlease, $msc01, $msc02, 
$msc03, $msc04, $msc05, $pxe, $pxe01, $pxe02, $pxe03, $pxe04, $pxe05, 
$pxe06 ) {

 global $defined, $error_message;
 require 'template.php';
 if( ( empty( $domain ) ) || ( empty( $lease ) ) || ( empty( $mxlease ) 
) ) {
   $db = db( $defined['dbhost'], $defined['username'], 
$defined['password'], $defined['dbname'] );

   $sql = @mysql_query( SELECT * FROM global, $db )
   $args = @mysql_fetch_array( $sql_global );
   @mysql_close( $db );
$message = message;
return global_template( 1, $args, count( $args ), $message );
logs( $error_message['valid'] );
 } else {
   return global_template( 4, NULL, NULL, NULL, NULL );
   logs( $error_message['usr_chk'] );
 }
}

and the contents of the global_template function:
function global_template( $cmd, $args, $num, $message, $errors ) {
 if( $cmd == 4 ) {
  $data = img src=\images/error.jpg\nbsp;nbsp;blinkbError: 
/b/blinkYou do not have proper access to use this utility. Your 
computer information has been recorded and the Administrator has been 
notified.;

 }
return $data;
}

So in essence:

index.php-chooser-global_dhcp-global_template-output to browser

I hope that clarifies my problem a bit.

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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



RE: [PHP] $_POST to function?

2006-02-24 Thread Jared Williams

 
 Why are you passing the POST array?  As it's superglobal why 
 not just work directly on it within the function?
 

Passing it has distinct advantages, like being able to test the function.

Jared

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



RE: [PHP] $_POST to function?

2006-02-24 Thread Peter Lauri
Is the function actually returning anything? Aren't you just echoing the
content of the $_POST?

-Original Message-
From: Jason Gerfen [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:27 PM
To: PHP General (E-mail)
Subject: [PHP] $_POST to function?

I am not sure why this is not working.  Aren't $_POST vars 
superglobals?  I am trying to pass the $_POST array as an argument to a 
function and nothing is being returned.  Any help is appreciated.

return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
  echo pre; print_r( $args ); echo /pre;
 }

-- 
Jason Gerfen

When asked what love is:
 Love is the Jager talking.
~Craig Baldo

-- 
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] $_POST to function?

2006-02-24 Thread Peter Lauri
Do:

function global_template( $cmd, $args, $num, $message ) {
  ob_start();
  echo pre; print_r( $args ); echo /pre;
  ob_end_flush();
  return ob_get_contents();
}


-Original Message-
From: Jason Gerfen [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:27 PM
To: PHP General (E-mail)
Subject: [PHP] $_POST to function?

I am not sure why this is not working.  Aren't $_POST vars 
superglobals?  I am trying to pass the $_POST array as an argument to a 
function and nothing is being returned.  Any help is appreciated.

return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
  echo pre; print_r( $args ); echo /pre;
 }

-- 
Jason Gerfen

When asked what love is:
 Love is the Jager talking.
~Craig Baldo

-- 
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] $_POST to function?

2006-02-24 Thread Jason Gerfen

Peter Lauri wrote:


Is the function actually returning anything? Aren't you just echoing the
content of the $_POST?

-Original Message-
From: Jason Gerfen [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:27 PM

To: PHP General (E-mail)
Subject: [PHP] $_POST to function?

I am not sure why this is not working.  Aren't $_POST vars 
superglobals?  I am trying to pass the $_POST array as an argument to a 
function and nothing is being returned.  Any help is appreciated.


return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
 echo pre; print_r( $args ); echo /pre;
}

 

Well as I pass $_POST to the global_template function I am not seeing 
anything in the $args array in the global_template function.  And to 
this point I still have not figured out why.


--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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



Re: [PHP] Date question

2006-02-24 Thread Sumeet

William Stokes wrote:

Hello,

I have a datetime column in MySQL DB. How can I match to that column from 
php code if I only have the date information available.


2006-02-24 12:00:00  against2006-02-24

This might be more SQL question sorry about that.

Thanks
-Will



use date_format(%Y-%m-%d,'date_column') in the sql

http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

--
Sumeet Shroff
http://www.prateeksha.com
Web Design and Ecommerce Development, Mumbai India

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



Re: [PHP] Date question

2006-02-24 Thread Chris Boget
I have a datetime column in MySQL DB. How can I match to that column from 
php code if I only have the date information available.

2006-02-24 12:00:00  against2006-02-24
This might be more SQL question sorry about that.

use date_format(%Y-%m-%d,'date_column') in the sql
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html


The above is likely one of the more elegant solutions.  But if you wanted to 
do this

completely in PHP, you could do something like:

pseudocode

 $phpDate = '2006-02-24';

 $rowData = mysql_fetch_assoc( $yourQuery );

 if( date( 'Y-m-d', strtotime( $rowData['MySQLDate'] )) == $phpDate )) {
   echo 'Dates match!';

 }
/pseudocode

thnx,
Chris 


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



Re: [PHP] $_POST to function? [SOLVED]

2006-02-24 Thread Jason Gerfen

Peter Lauri wrote:


http://th.php.net/manual/en/function.return.php


-Original Message-
From: Jason Gerfen [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 25, 2006 12:29 AM

To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] $_POST to function?

Peter Lauri wrote:

 


Is the function actually returning anything? Aren't you just echoing the
content of the $_POST?

-Original Message-
From: Jason Gerfen [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 24, 2006 10:27 PM

To: PHP General (E-mail)
Subject: [PHP] $_POST to function?

I am not sure why this is not working.  Aren't $_POST vars 
superglobals?  I am trying to pass the $_POST array as an argument to a 
function and nothing is being returned.  Any help is appreciated.


return global_template( 3, $_POST, count( $_POST ), $message );

function global_template( $cmd, $args, $num, $message ) {
echo pre; print_r( $args ); echo /pre;
}



   

Well as I pass $_POST to the global_template function I am not seeing 
anything in the $args array in the global_template function.  And to 
this point I still have not figured out why.


 


Figured it out, typo.  I must have fat fingers today.  Thanks everyone.

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

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



[PHP] Testing

2006-02-24 Thread jblanchard
I am conducting a test of my new e-mail address. This is only a test. If
this were not a test you would be instructed to tune into your locale
emergency sarcasm system. Please RTFM and Have a PHP Day!

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



Re: [PHP] Testing

2006-02-24 Thread John Nichel

[EMAIL PROTECTED] wrote:

I am conducting a test of my new e-mail address. This is only a test. If
this were not a test you would be instructed to tune into your locale
emergency sarcasm system. Please RTFM and Have a PHP Day!



Dork.  ;)

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



[PHP] mysql help..

2006-02-24 Thread ganu ullu
Hi all,

I installed a opensource php project, and now is working fine for me.
Now that project has some 40-50 MySQL tables..

now I want to change something in that but the I am not able to get the DB
flow..
Is any body knows any tool by which we can create/make the relationship
diagram like we are doing in SQLserver or Access..

To understand the DB is very tough... any body knows how I can create the
relationship diagram from that .SQL file...

thnx to alll...


Re: [PHP] mysql help..

2006-02-24 Thread John Nichel

ganu ullu wrote:

Hi all,

I installed a opensource php project, and now is working fine for me.
Now that project has some 40-50 MySQL tables..

now I want to change something in that but the I am not able to get the DB
flow..
Is any body knows any tool by which we can create/make the relationship
diagram like we are doing in SQLserver or Access..

To understand the DB is very tough... any body knows how I can create the
relationship diagram from that .SQL file...

thnx to alll...



I built my web site in php, can anyone hold my hand and find me a tool 
to analyze my server logs?


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



[PHP] session vars on Windows Server?

2006-02-24 Thread Ing. Tom�s Liendo
Hi I have the following problem:

I developed a system that it runs perfec in my PC and in hosting server with 
Linux. But the session vars don't work in a hosting server with Windows...
The technical contact of the Server with Windows says me that the problem is 
a space before the function session_start() in my code...
I tried this, but don't work...

Have any idea why session vars don't work in a Windows Server???

I have the same version exactly of the system in a server with Linux: 
http://www.pentagonoonline.com.ar/soporte
and in a server with Windows: http://www.iracbiogen.com.ar/virtual

Try to login into the system with:

user (usuario): master
password (clave): gh306

In Linux you can login without problems, but in Windows you won't to leave 
the login page. This is because in the Windows server the session var that 
I'm using to determine if the user has loged correctly don't work...

How can I solve this problem?

I send you the files procesa_login.php (processes login) and controla.php 
(controls). The first one verifies the user name and password in the 
database (no problems), the second verify that the user has loged correctly 
(problems with the session var $_SESSION['autentificado'] (authenticated).)

Well I wait to have explained to myself, and... sorry for my english... 
Ahead of time, thank you very much,

Tom.


begin 666 procesa_login.php
M/#\@V5SVEO;E]S=%R=@I.PT*(!I;F-L=61E*)C;VYEYP:' B*3LO
M+U!R;W9E92!U;[EMAIL PROTECTED];B!P87)A(-O;F5C=%R[EMAIL PROTECTED]@V5R=FED
M;W(@9[EMAIL PROTECTED]R!-5-13X-B @+R\D;EN:SUC;VYE8W1A
MG-E*)L;V-A;AOW0B+)C;W1O;2(L(F=R965N,S V(BPB8V]T;VU?5N
M=%G;VYO(BD[( O+W!A[EMAIL PROTECTED]@V5R=F5R#0H@(\O)QI;FL]8V]N96-T
M87)[EMAIL PROTECTED];]C86QH;W-T(BPBF]O=(L(B(L(G-O]R=4B*3LO+U)E86QI
MF$@;[EMAIL PROTECTED];[EMAIL PROTECTED](QA()A[EMAIL PROTECTED][EMAIL 
PROTECTED]%T;W,-B @)YI8VL]
M)%]03U-46R=N:6-K)UT[#0H@(1C;%V93TD7U!/4U1;)V-L879E)UT[( -
MB @)-UG-O/21?4$]35%LG8W5RV\G73L-B @#0HO+T%U=5N=EC86-I
M;[EMAIL PROTECTED][EMAIL 
PROTECTED])I;RTM+2TM+2TM+2TM+2TM+2TM+2TM+2TM#0HD=7-U87)I
M;W,];7ES6Q?75EGDH(E-%3$5#5 J([EMAIL PROTECTED]:6YIW1R861OF5S
M(%=(15)%(YO;6)R95]USTG(BXD;FEC:RXB)[EMAIL PROTECTED])R(N)-L
M879E+B(G(BPD;EN:RD[#0HD=7-U87)I;SUM7-Q;%]N=6U?F]W[EMAIL PROTECTED]
M87)I;W,I.PT*:68H)'5S=6%R:6\]/3 I#0I[#0H))'5S=6%R:6]S/6UYW%L
M7W%U97)Y*)[EMAIL PROTECTED]4D]-(%L=6UN;W,@5TA%4D4@;F]M8G)E7W5S
M/2B+B1N:6-K+B(G($%.1!C;%V93TG(BXD8VQA=F4N(BB+1L:6YK*3L-
M@DD=7-U87)I;SUM7-Q;%]N=6U?F]W[EMAIL PROTECTED])I;W,I.PD-@[EMAIL PROTECTED]
M=7-U87)I;ST],D-@E[0T*0EE8VAO()%;!N;VUB[EMAIL PROTECTED][EMAIL 
PROTECTED])I
M;R!O(QA(-O;G1R87-E\6$@V]N(EN8V]RF5C=]S+B!0=6QS92!A='+A
MR!P87)A('9O;'9EB!A(EN=5N=%R+CQBCXB.PT*0DD7U-%4U-)3TY;
M)V%U=5N=EF:6-A9\G73TB3D\B.PT*7T-@EE;'-E#0H)PT*0DD=7-U
M87)I;SUM7-Q;%]F971C:%]AG)A[EMAIL PROTECTED])I;W,I.PT*0DD7U-%4U-)
M3TY;)V%U=5N=EF:6-A9\G73TB4TDB.PD)#0H)21?4T534TE/3ELG=7-U
M87)I;R==/21UW5AFEO6R=I9%]C;VYT86-T;R==.PT*0DD7U-%4U-)3TY;
M)VYO;6)R95]UW5AFEO)UT])'5S=6%R:6];)VYO;6)R92==+B(@(BXD=7-U
M87)I;ULG87!E;QI9\G73L-@D))%]315-324].6R=T:7!O7W5S=6%R:6\G
M73TB86QU;6YO(CL-@D))AOF%?86-T=6%L/6=E='1I;65O9F1A[EMAIL PROTECTED]
M3V)T:65N92!L82!H;W)A(%C='5A;X-@D))%]315-324].6R)H;W)A(ET]
M)AOF%?86-T=6%L6R)S96,B73LO+U)E9VES=')A(AO[EMAIL PROTECTED]4@:6YGF5S
M;PD)#0H)0D)#0H)2\O0V]N=')O;$@75E(5L(%L=6UN;R!EW1E(EN
MV-R:7!T;R!A;!C=7)S;RX-@D))ED=7,])'5S=6%R:6];)VED7V-O;G1A
M8W1O)UT[#0H)21UW5AFEOWAC=7)S;SUM7-Q;%]Q=65R[EMAIL PROTECTED],14-4
M([EMAIL PROTECTED])/32!A;'5M;F]S-UG-O(%=(15)%(ED7V-UG-O/2B+B1C=7)S
M;RXB)R!!3D0@:61?86QU;6YO/2(N)ED=7,L)QI;FLI.PT*0EI9BAM7-Q
M;%]N=6U?F]W[EMAIL PROTECTED])I;W-X8W5RV\I/3TP*0T*0E[#0H)0EH96%D
M97(H(DQO8V%T:6]N.B!I;G-CFEP8VEO;BYP:' B*3L-@D)?0T*0EE;'-E
M#0H)7L-@D)21?4T534TE/3ELG8W5RV]?86-T:79O)UT])-UG-O.PT*
M0D):5A95R*),;V-A=EO;CH@:]M95]A;'4NAP(BD[#0H)7T-@E]
M#0I]#0IE;'-E#0I[#0H))'5S=6%R:6\];7ES6Q?9F5T8VA?87)R87DH)'5S
M=6%R:6]S*3L-@DD7U-%4U-)3TY;)V%U=5N=EF:6-A9\G73TB4TDB.PD)
M#0H))%]315-324].6R=UW5AFEO)UT])'5S=6%R:6];)VED)UT[#0H))%]3
M15-324].6R=N;VUBF5?=7-U87)I;R==/21UW5AFEO6R=N;VUBF4G72XB
M((N)'5S=6%R:6];)V%P96QL:61O)UT[0D-@DD7U-%4U-)3TY;)W1I]?
M=7-U87)I;R==/2)A9UI;FES=')A9]R(CL)#0H))%]315-324].6R=C=7)S
M;U]A8W1I=F\G73TD7U!/4U1;)V-UG-O)UT[#0H))AOF%?86-T=6%L/6=E
M='1I;65O9F1A[EMAIL PROTECTED])T:65N92!L82!H;W)A(%C='5A;X-@DD7U-%
M4U-)3TY;(FAOF$B73TD:]R85]A8W1U86Q;(G-E8R)=.R\O4F5G:7-TF$@
M:]R82!D92!I;F=R97-O#0H):5A95R*),;V-A=EO;CH@:]M95]A9TN
-AP(BD[#0I]#0H_/@``
`
end

begin 666 controla.php
M/#\@V5SVEO;E]S=%R=@I.PT*+RH-BTM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+0T*0V]N=')O;$NAP#0I697)[EMAIL PROTECTED]@=7-U
M87)I;R!EW1E(%U=5N=EC861O+!Y(YO(AA9V$@;6%S(1E('9E:6YT
M92!M:6YU=]S('%U92!N;R!R96%L:7IA(YI;F=U;F$@5T:6-I;VXN#0HM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2T-BHO#0H-@T*( @)5X

Re: [PHP] mysql help..

2006-02-24 Thread chris smith
Ask the open-source project for help. They will be able to answer your
questions better than we can.

On 2/25/06, ganu ullu [EMAIL PROTECTED] wrote:

 Hi all,

 I installed a opensource php project, and now is working fine for me.
 Now that project has some 40-50 MySQL tables..

 now I want to change something in that but the I am not able to get the DB
 flow..
 Is any body knows any tool by which we can create/make the relationship
 diagram like we are doing in SQLserver or Access..

 To understand the DB is very tough... any body knows how I can create the
 relationship diagram from that .SQL file...

 thnx to alll...




Re: [PHP] mysql help..

2006-02-24 Thread Tom Rogers
Hi,

Saturday, February 25, 2006, 5:53:23 AM, you wrote:
gu Hi all,

gu I installed a opensource php project, and now is working fine for me.
gu Now that project has some 40-50 MySQL tables..

gu now I want to change something in that but the I am not able to get the DB
gu flow..
gu Is any body knows any tool by which we can create/make the relationship
gu diagram like we are doing in SQLserver or Access..

gu To understand the DB is very tough... any body knows how I can create the
gu relationship diagram from that .SQL file...

gu thnx to alll...

Try DbDesigner4, it will reverse engineer an existing database as much as it 
can.

http://fabforce.net/

-- 
regards,
Tom

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



[PHP] email to db

2006-02-24 Thread Mark
Does anyone know if its possible or how difficult it would be to have a user
send an email from outlook express to a websites mysql database and update
records.

Mark

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



Re: [PHP] PHP Manual in PDF format

2006-02-24 Thread ÃmìtVërmå

Good.. you went straight into their vault to those PDF :)


tedd wrote:


Hi ALL

I am looking out for PHP Manual in PDF Format

Thanks in Advance

Regards

Kaushal




Try Google:

http://iwing.cpe.ku.ac.th/tutorial/PHP/PHPmanual.pdf

I'm sure there are others.

tedd



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



Re: [PHP] email to db

2006-02-24 Thread chris smith
On 2/25/06, Mark [EMAIL PROTECTED] wrote:
 Does anyone know if its possible or how difficult it would be to have a user
 send an email from outlook express to a websites mysql database and update
 records.

You could write a script to parse the email and do the update. It
would come in on 'stdin'.

See http://www.php.net/readline or http://www.php.net/fopen (search
for 'php://stdin').

Alternatively, you could write a script to connect to a mailbox and do
something, see http://www.php.net/imap .

Depends on what you are trying to do really :)

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