[PHP] cookie expiring with session

2002-12-13 Thread Andrea
I urgently need to store a cookie that expires with session. This cookie has to be read by a section written in jsp, therefore I don't think I can use $_SESSION variables. Can anyone help me? Andrea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Beginner question : Removing spaces in forms

2002-12-13 Thread Hugh Danaher
you could start with something like: $old_string=44 55 99 111; $new_string=ereg_replace( ,,$old_string); echo $new_string; should display 445599111 There are other regular expression aids listed on the page at:

[PHP] errorno error codes

2002-12-13 Thread phplist
In reality this is a linux question. If I use in PHP passthru or system, the linux OS will return an error number. Somebody can provide me with a link where they are listed and explained? -- René www.comunica2.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Uploading changes via Email

2002-12-13 Thread Roke, Ian
Hi there people, I am currently working on a database front-end for a company database and I would like to know if it would be possible to email access.db to [EMAIL PROTECTED] and a script would be run on it to save it over the top of the database that is already on the server (and a few little

Re: [PHP] Regex question

2002-12-13 Thread Sean Burlington
Troy May wrote: How would take a regular non-formatted text link (http://www.link.com) and turn it into ready to post HTML? (a href=http://www.link.comhttp://www.link.com/a) Darn, Outlook formats it, but you get the idea. It would just be typed out normally. Any ideas? function MakeUrl

Re: [PHP] cookie expiring with session

2002-12-13 Thread Sean Burlington
Andrea wrote: I urgently need to store a cookie that expires with session. This cookie has to be read by a section written in jsp, therefore I don't think I can use $_SESSION variables. Can anyone help me? Andrea to set a cookie that expires with the session do setcookie (name, value)

[PHP] how to send an MSWORD email?

2002-12-13 Thread See Kok Boon
Hi experts, I have an email database which I want to send out newsletter to. I want to send emails that have graphics, for example the pub logo. I know that there are 2 ways to do so (maybe there are more, pls enlighten me): 1. use html email with img

[PHP] Sesssion help

2002-12-13 Thread Hasan / Impex Holidays Maldives
Hi, I am just starting to use PHP sessions... very interesting. I have two test scripts which is working fine on my PC. However when i upload the script to my Unix server there is a problem. I am trying to pass on the variable from file1 to file2. I have a link to file2 with the session id on

[PHP] ping...

2002-12-13 Thread Brian McGarvie
I can exec ping OK... but I need a way to ping and basically give me a OK or Not OK... any ideas? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.427 / Virus Database: 240 - Release Date: 06/12/02 -- PHP General Mailing List

Re: [PHP] how to send an MSWORD email?

2002-12-13 Thread John Wards
3.some other better methods. Have a look on pear.php.net for the mime mail class. It has things for attaching images and including them in an html email Cheers John Wards SportNetwork.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] how to send an MSWORD email?

2002-12-13 Thread Jason Wong
On Friday 13 December 2002 17:59, See Kok Boon wrote: Hi experts, I have an email database which I want to send out newsletter to. I want to send emails that have graphics, for example the pub logo. I know that there are 2 ways to do so (maybe there are more, pls enlighten me): There's a

Re: [PHP] Uploading changes via Email

2002-12-13 Thread Jason Wong
On Friday 13 December 2002 17:17, Roke, Ian wrote: Hi there people, I am currently working on a database front-end for a company database and I would like to know if it would be possible to email access.db to [EMAIL PROTECTED] and a script would be run on it to save it over the top of the

[PHP] Re: Sorry if repost - more ftp problems

2002-12-13 Thread phplist
Fatal error: Maximum execution time of 90 seconds exceeded in :\apache\htdocs\fnusa\releases\ftp.php on line 28 This means that after entering in passive mode it has used 90 seconds of processor time and times out. Set this timeout higher in php.ini. And I would add this to the source just

[PHP] Re: ping...

2002-12-13 Thread Paul Chvostek
On Fri, Dec 13, 2002 at 10:02:54AM -, Brian McGarvie wrote: I can exec ping OK... but I need a way to ping and basically give me a OK or Not OK... any ideas? This isn't really a PHP question, since ping is a command in the OS and not in PHP itself. And of course, you didn't mention what

Re: [PHP] ping...

2002-12-13 Thread Jason Wong
On Friday 13 December 2002 18:02, Brian McGarvie wrote: I can exec ping OK... but I need a way to ping and basically give me a OK or Not OK... any ideas? So you have something like: $result = `ping -c 3 www.example.com`; echo $result; Then you have to parse $result to work out whether

RE: [PHP] Uploading changes via Email

2002-12-13 Thread Roke, Ian
The database is an access db but all I want to do is upload it, but check first wether it is newer or not. I plan to have the email automatically sent each day but only upload it if it is newer. All I am trying to do is bypass the ftp part which I cant do. Is there a reference on how to pull out

Re: [PHP] Uploading changes via Email

2002-12-13 Thread Jason Wong
On Friday 13 December 2002 18:30, Roke, Ian wrote: The database is an access db but all I want to do is upload it, but check first wether it is newer or not. I plan to have the email automatically sent each day but only upload it if it is newer. All I am trying to do is bypass the ftp part

[PHP] passthru returns with errno 11

2002-12-13 Thread phplist
What could that mean errno 11 when I try to run a small program with four parameters. From a shell prompt it works. What does it mean errno 11? -- René www.comunica2.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: errorno error codes

2002-12-13 Thread Bogdan Stancescu
I guess that depends on what exactly you're executing? If the return_var argument is present, the return status of the *Unix command* will be placed here. Bogdan [EMAIL PROTECTED] wrote: In reality this is a linux question. If I use in PHP passthru or system, the linux OS will return an error

[PHP] Re: Beginner question : Removing spaces in forms

2002-12-13 Thread liljim
Hi Andrew, Andrew Wilson [EMAIL PROTECTED] wrote in message: Hay guys i was wondering if there was a form parameter of something equivalent for input text boxes that when a user enters a number or series of numbers that it removes the spaces. If there is no alternative how would you go about

RE: [PHP] Escaping '#' Sign

2002-12-13 Thread Ford, Mike [LSS]
-Original Message- From: Mike Smith [mailto:[EMAIL PROTECTED]] Sent: 12 December 2002 14:47 Rendered results of a href... = http://company.com/custmaint.php?id=70class=cust=company T/T #29type=OEM id is the record id class is Null so that's OK. cust=company T/T #29

RE: [PHP] Odd Strpos Behavior

2002-12-13 Thread Ford, Mike [LSS]
-Original Message- From: Steve Keller [mailto:[EMAIL PROTECTED]] Sent: 12 December 2002 22:09 At 12/11/2002 08:09 PM, you wrote: Okay, so how do you know what to replace something like [author] with? What exactly are you doing again? I've forgotten the original question. :)

[PHP] What's the Difference?

2002-12-13 Thread Stephen
I can't quite figure this out... What exactly is the difference between str_replace() and ereg_replace()? Don't they both do the exact same thing? Thanks, Stephen Craton http://www.melchior.us What is a dreamer that cannot persevere? -- http://www.melchior.us -- PHP General Mailing List

[PHP] database to rtf

2002-12-13 Thread Roman Duriancik
How to convert data from database to rtf file. Example: database : column_1 column_2 column_3 1 aa 123456 2 bb234der ... And I need rtf file which have this informations: column_1 : 1 column_2 : aa column_3 : 123456 next rtf file have this informations

[PHP] (PHP) $_SERVER['PATH_TRANSLATED']

2002-12-13 Thread Fritzek
Hi friends, on my box (w2k, apache2.0.40) the phpinfo(); doesn't show the above. I need this for the package moregroupware, which makes use of $_SERVER['PATH_TRANSLATED']. How to set this or how to change anything to get this? Thanks in advance -- fritzek -- PHP General Mailing List

Re: [PHP] What's the Difference?

2002-12-13 Thread Leif K-Brooks
str_replace() doesn't have regex. Stephen wrote: I can't quite figure this out... What exactly is the difference between str_replace() and ereg_replace()? Don't they both do the exact same thing? Thanks, Stephen Craton http://www.melchior.us What is a dreamer that cannot persevere? --

[PHP] reconfigure not showing in phpinfo

2002-12-13 Thread Dave [Hawk-Systems]
Recently reconfigured php to add in support for some extensions we were previously not using (Pear among others). switched to src directory, backed up config.nice edited config.nice to remove/alter the appropriate --without lines rm config.cache ./config.nice make (no errors) make install (no

[PHP] multiple php errors in error log

2002-12-13 Thread Jody Cleveland
Hello, I was looking through my error_log, and noticed these errors: PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/imap.so' - /usr/lib/php4/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: Unknown(): Unable to load

[PHP] readdir() output question

2002-12-13 Thread RClark
Hello all! Ok, I have a readdir() reading pictures files from a directory. But now I want to output them into a html table, say 5 across the top row, then 5 the next row, etc. What I cant figure out is how to make this happen. Right now, I am not reading the files into an array. Should I do this

Re: [PHP] readdir() output question

2002-12-13 Thread Matt Vos
$img_count = 0; echo( table tr td colspan=5My Images/td): (loop through filenames) { if (($img_count % 5) == 0) echo( /trtr); echo( tdimg_src=\$filename\/td); $img_count = $img_count + 1; } while (($img_count % 5) != 0) { echo( tdnbsp;/td); } echo( /tr /table) Matt RClark

Re: [PHP] What's the Difference?

2002-12-13 Thread Bogdan Stancescu
...therefore it's faster. Only use it when you really need regexp functionality - same with all other functions which are dual straight string/regexp matching. Leif K-Brooks wrote: str_replace() doesn't have regex. Stephen wrote: I can't quite figure this out... What exactly is the

Re: [PHP] What's the Difference?

2002-12-13 Thread Bogdan Stancescu
Ok, you get the meaning even though my mail is confusing: only use *regexp functions* when you need regexp [etc] Bogdan Stancescu wrote: ...therefore it's faster. Only use it when you really need regexp functionality - same with all other functions which are dual straight string/regexp

[PHP] Problems with text files from a Mac

2002-12-13 Thread Sterling Anderson
I am working on an application for a school district and am having some problems with the files they are supplying for import. They are supplying data files and I am writing routines to populate the database using these files. Its a simple file upload then I just need to parse through the tab

[PHP] Alternate location for PEAR downloadable documentation

2002-12-13 Thread Chris Boget
Is there one? http://pear.php.net/distributions/manual/pear_manual_en.html.gz (and all the other downloadable documentation) seem to have gone awol. thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sesssion help

2002-12-13 Thread Hasan / Impex Holidays Maldives
Hi all, I finally found a solution. When i session_register(cookie_agtuser); instead of $cookie_agtuser = $_SESSION['cookie_agtuser']; the variable is seen. I don't know why but if anyone know why this could happen it would help a lot. thanks, Hasan - Original Message - From: Hasan /

RE: [PHP] Escaping '#' Sign

2002-12-13 Thread Mike Smith
Thanks. That did it. What I came up with is: echo a href=\custmaint.php?id=$row[0]class=$row[1]cust=.urlencode($row[2]).ty pe=$row[3]\img alt=\Edit\ src=\images/edit.gif\ height=\24\ width=\24\ border=\0\ //a; Is this fundamentally flawed? You mentioned ...is probably invalid in itself, but

Re: [PHP] Alternate location for PEAR downloadable documentation

2002-12-13 Thread Alister
On Fri, 13 Dec 2002 08:41:12 -0600 Chris Boget [EMAIL PROTECTED] wrote: Is there one? http://pear.php.net/distributions/manual/pear_manual_en.html.gz (and all the other downloadable documentation) seem to have gone awol. I saw that yesterday when I went to download it myself. I put an

[PHP] PDF Lib problem with Gif files

2002-12-13 Thread Bogomil Shopov
Fatal error: PDFlib error: Bad image number -1 in PDF_place_image Anyone to have any idea Best regards Bogomil Shopov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Don't get variable to be passed to the page on submit

2002-12-13 Thread Davíð Örn Jóhannsson
I have this code whitch I have been staring at for hours and I just can’t figure out what is going on... it is about as simple as it gets I just need to pass a variable from this page to it self, and that would be tha variable $nafn I have this included code included into another page that is

[PHP] Re: PDF Lib problem with Gif files (2)

2002-12-13 Thread Bogomil Shopov
Warning: Internal PDFlib warning: Color depth other than 8 bit not supported in GIF file -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: reconfigure not showing in phpinfo

2002-12-13 Thread Martijn Grendelman
Dave [EMAIL PROTECTED] schreef in bericht [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Recently reconfigured php to add in support for some extensions we were previously not using (Pear among others). switched to src directory, backed up config.nice edited config.nice to remove/alter the

Re: [PHP] cookie expiring with session

2002-12-13 Thread John Nichel
Set it without a expire time, then it will expire whenever the user closes their browser windows. If the jsp that needs to read the cookie on the same domain for wich it's set, it shouldn't have any problem reading it, but yes, you won't be able to use php's $_SESSION in jsp. Andrea wrote: I

[PHP] php and mysql4 connectivity

2002-12-13 Thread Ornella Fasolo
Hello, does anybody know how to make PHP work with MySQL4. ? I would like to use PHP version 4.0.6-7 and MySQL-4.0.5-0.i386.rpm on a Redhat 7.2 system. Well if somebody has allready done a rpm package of php-mysql.rpm please tell us where to find it. Otherwise any hint on how to compile php as

Re: [PHP] Don't get variable to be passed to the page on submit

2002-12-13 Thread Philip Olson
Read this: http://www.php.net/variables.external Pay special attention to the parts about the PHP directive register_globals. If on, both $_GET['nafn'] and $nafn will exist. If off, $nafn will not exist. As of PHP 4.2.0, the default for this in php.ini went from on to off. This applies

[PHP] PostgeSQL LIMIT pg_numrows

2002-12-13 Thread ceo
In PostgreSQL, I'd like to be able to use a UNION and a LIMIT clause and have some kind of function to determine how many rows could have come back without the LIMIT clause. Is there some kind of function like pg_numrows() that IGNORES the LIMIT clause? I sure couldn't find it, but maybe I'm

[PHP] Encrypt and decrypt cookie

2002-12-13 Thread Titu Kim
Hi, I am using libmcrypt-2.5.3 to do encryption in php. I use exactly the steps provided in mcrypt_module_open available on php website http://php.benscom.com/manual/en/function.mcrypt-module-open.php I can encrypt and decrypt a string correctly. However, if i encrypt a cookie to write to

[PHP] Date Formatting

2002-12-13 Thread Clint Tredway
How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, but I must be blind because I cannot figure it out. Thanks, Clint

[PHP] [solved] Re: [PHP] my cgi version of php prints Content-type:text/html on web page

2002-12-13 Thread Lucas Rockwell
hi all, i solved this one. i was using an old php.ini file. -lucas On Thu, 12 Dec 2002, Lucas Rockwell wrote: hi all, i have successfully run php as a cgi on Solaris and on another OS X machine, but now, with php 4.2.3, my pages are spitting out Content-type: text/html at the top. of

RE: [PHP] Escaping '#' Sign

2002-12-13 Thread Ford, Mike [LSS]
-Original Message- From: Mike Smith Is this fundamentally flawed? You mentioned ...is probably invalid in itself, but we'll come to that. Were you referring to the space or the whole pasing of array variables in an URL. Yup, I meant the spaces, not the whole concept -- when I wrote that

Re: [PHP] Date Formatting

2002-12-13 Thread Support @ Fourthrealm.com
Use this: function makedate($format, $indate) { $temp = explode(-, $indate); $fulldate = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]); $temp = date($format, $fulldate); return ($temp); } and call it with

[PHP] php4 / sessions

2002-12-13 Thread Kevin Porter
Hi, I'm trying to get a session variable to work. Here's the code at the start of my script: session_name('CLIENTFILTER'); session_start(); session_register( 'client_filter' ); As I understand it, the variable $client_filter should now be available to me? But I can't see it with either just

[PHP] A little regex help

2002-12-13 Thread Gareth Hastings
Hi, I'm trying to work out the regex needed to split either one of the following lines Windows 2000 Hotfix (Pre-SP4) See Q322842 for more information Windows XP Hotfix (SP2) See Q327696 for more information Into one of these Windows 2000 Hotfix (Pre-SP4) See a

Re: [PHP] php4 / sessions

2002-12-13 Thread Joseph Guhlin
I would set it with $HTTP_SESSION_VARS['client_filter'] = $client_filter; Maybe that will work? I think they are trying to get people to quit using the session_register? I could be wrong. Anyways, take out the session_register and do it like I showed you above. One way to see if it is set

[PHP] FTP Listings for HTML page

2002-12-13 Thread Randum Ian
Hi guys, I am maintaining a list of files on an FTP server and it would be great if I could get a very simple list of all the files and their directory names so I can generate a HTML page with the information. Is this doable? Randum Ian [EMAIL PROTECTED] DJ / Reviewer / Webmaster, DancePortal

[PHP] RE: Paging / Navigation Help

2002-12-13 Thread Nikolai Devereaux
I'd appreciate it if you didn't email me personally for PHP related issues. That's what the php list is for. I would guess that most other people on the list feel the same way. Take care, Nik -Original Message- From: William Martell [mailto:[EMAIL PROTECTED]] Sent: Thursday,

[PHP] Re: A little regex help

2002-12-13 Thread Philip Hallstrom
Why not... $url = ereg_replace(See ([^ ]*) for, See a href='urlgoeshere?key=\1'\1/a for, $original_string) or something close to that. On Fri, 13 Dec 2002, Gareth Hastings wrote: Hi, I'm trying to work out the regex needed to split either one of the following lines Windows 2000 Hotfix

Re: [PHP] php4 / sessions

2002-12-13 Thread Kevin Stone
The variable must exist before you can register it in the session.. $client_filter = 'filter'; session_register('client_filter'); ..or simply.. $_SESSION['client_filter'] = 'filter'; -Kevin - Original Message - From: Kevin Porter [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday,

Re: [PHP] FTP Listings for HTML page

2002-12-13 Thread Kevin Stone
Yes it is doable. see. open_dir(); @ www.php.net You can also find a number of premade scripts on HotScripts.com or one of the class stores. Do a search on Google. -Kevin - Original Message - From: Randum Ian [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 13, 2002

Re: [PHP] FTP Listings for HTML page

2002-12-13 Thread Jason Wong
On Saturday 14 December 2002 02:38, Randum Ian wrote: Hi guys, I am maintaining a list of files on an FTP server and it would be great if I could get a very simple list of all the files and their directory names so I can generate a HTML page with the information. Is this doable? Yep, even

Re: [PHP] A little regex help

2002-12-13 Thread 1LT John W. Holmes
I'm trying to work out the regex needed to split either one of the following lines Windows 2000 Hotfix (Pre-SP4) See Q322842 for more information Windows XP Hotfix (SP2) See Q327696 for more information Into one of these Windows 2000 Hotfix (Pre-SP4) See a

Re: [PHP] Date Formatting

2002-12-13 Thread Joseph W. Goff
Just a small question, but why not just do this through the SQL statement instead of using php? http://www.mysql.com/doc/en/Date_and_time_functions.html#IDX1295 [from the mysql manual] mysql SELECT DATE_FORMAT('1997-10-04 22:23:00', '%W %M %Y'); - 'Saturday October 1997' mysql SELECT

Re: [PHP] Date Formatting

2002-12-13 Thread 1LT John W. Holmes
Use DATE_FORMAT() in your query, or UNIX_TIMESTAMP() to pull it out as a unix timestamp and use date() in PHP to format it. Chapter 6, Date and Time Functions in the MySQL Manual has the syntax for each of the MySQL functions. ---John Holmes... - Original Message - From: Clint Tredway

Re: [PHP] Date Formatting

2002-12-13 Thread Rick Emery
MYSQL will do all the formatting that you need. Look up sect 6.3.4, Date and Time Functions in mysql manual. Look at the DATE_FORMAT(date,format) command - Original Message - From: Clint Tredway [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 13, 2002 11:55 AM Subject:

Re: [PHP] Odd Strpos Behavior

2002-12-13 Thread 1LT John W. Holmes
Do you really want to pursue the solution you're using? A solution with preg_replace_callback() would probably be a lot faster and easier to manage. If that doesn't matter, just let me know and I'll look over your code to try and figure out what's going on. I don't have time right now, though, to

[PHP] newbie - decimal places in arthimetic functions

2002-12-13 Thread Max Clark
Hi- How can I control the decimal places returned by an arthimetic function? I would like this divsion function to only return two decimal places (rounded up). $calcsize = $value / $oneGig; Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] FTP Listings for HTML page

2002-12-13 Thread Randum Ian
Would I be able to do this for an ftp server where I have to log in? -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: 13 December 2002 19:07 To: Randum Ian; [EMAIL PROTECTED] Subject: Re: [PHP] FTP Listings for HTML page Yes it is doable. see. open_dir(); @

[PHP] Question about if statement evaluating (0==string) as TRUE

2002-12-13 Thread Scott Hurring
Erm... this seems a bit odd to me. I'm using PHPv4.2.2 on Win32 Is that becuase PHP is not properly comparing the numerical value with the string value? ? $no = 0; if ($no == string) { print this eval's to TRUE... since when is '0' == 'no' ?; } if ($no == string) { print whereas this eval's

[PHP] Re: newbie - decimal places in arthimetic functions

2002-12-13 Thread Scott Hurring
round it http://www.php.net/manual/en/function.round.php -- Scott Hurring Systems Programmer EAC Corporation scott (*) eac.com -- Max Clark [EMAIL PROTECTED] wrote in message atdba1$2id$[EMAIL PROTECTED]">news:atdba1$2id$[EMAIL PROTECTED]... Hi- How can I control the decimal places returned

Re: [PHP] newbie - decimal places in arthimetic functions

2002-12-13 Thread Joseph W. Goff
You can use the format() function for this. http://www.php.net/format - Original Message - From: Max Clark [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 13, 2002 1:10 PM Subject: [PHP] newbie - decimal places in arthimetic functions Hi- How can I control the

Re: [PHP] Sesssion help

2002-12-13 Thread Sean Burlington
Hasan / Impex Holidays Maldives wrote: Hi all, I finally found a solution. When i session_register(cookie_agtuser); instead of $cookie_agtuser = $_SESSION['cookie_agtuser']; the variable is seen. I don't know why but if anyone know why this could happen it would help a lot. thanks, Hasan

Re: [PHP] FTP Listings for HTML page

2002-12-13 Thread Joseph W. Goff
As long as the script has reading capabilities for the directory then yes. - Original Message - From: Randum Ian [EMAIL PROTECTED] To: 'Kevin Stone' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, December 13, 2002 1:25 PM Subject: RE: [PHP] FTP Listings for HTML page Would I be

Re: [PHP] newbie - decimal places in arthimetic functions

2002-12-13 Thread Joseph W. Goff
I'm sorry, posted the wrong link. It is the number_format() function. http://www.php.net/number_format - Original Message - From: Joseph W. Goff [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED]; Max Clark [EMAIL PROTECTED] Sent: Friday, December 13, 2002 1:31 PM Subject: Re: [PHP]

Re: [PHP] Question about if statement evaluating (0==string)as TRUE

2002-12-13 Thread Marco Tabini
I think this is happening because you're comparing apples to oranges. Your first comparison causes an integer to be compared to a string. Because the string string evaluates to the integer value 0, the comparison succeeds. The manual recommends the use of the identical comparison operator (===)

[PHP] Difference between 2 Dates

2002-12-13 Thread vernon
I found this code on the php.net web site but am new to php and can't figure out how to dispaly the difference once calucuated. Belowis the code I'm using: # --- Date Difference --- #Date 1 from MySQL database recordset row $date1 = $row_rsMESSAGES['privmsgs_date']; #Date 2 - now $date2 =

Fw: [PHP] Question about if statement evaluating (0==string) as TRUE

2002-12-13 Thread Kevin Stone
When you define $no, you define it without quotes, so PHP assumes it is a numeral. What you're asking in your conditional statement is: Does the numeral 0 equal the integer evaluation of string. The answer is True. But when you put $no into quotes you cast it as a string. Now what you're

Fw: [PHP] Difference between 2 Dates

2002-12-13 Thread Kevin Stone
Oh dear. In what format are you storing the date in your database? If you can convert what you have into UNIX EPOCH then you can simply subtract your date against mktime(); then echo the result through getdate() and be done with it in three lines of code. -Kevin - Original Message -

[PHP] real password value

2002-12-13 Thread empty
Hi all; do you know how to decrypt password('xxx'); value? For example I have a function that mails password to user's mail address but result is here; User Name: xjunky Password :1ef781ad7c4b0dc2 Thanks. I've inserted the password as password('$passw'); and selected as belove function

Re: [PHP] real password value

2002-12-13 Thread Johannes Schlueter
On Friday 13 December 2002 20:58, empty wrote: do you know how to decrypt password('xxx'); value? You can't do this. The only thing you could do is to send the User who lost his password a new one with an activation link. The new Password is saved somewhere else. Then the user clicks on the

Re: [PHP] real password value

2002-12-13 Thread Joseph Guhlin
The better strategy would be to generate a new random password and assign that as the password. MySQL's password function is one-way, meaning you can encrypt it, but not decrypt it. The way you test it is by taking what the user has entered, along with the salt, and encrypting that and seeing

Re: [PHP] Date Formatting

2002-12-13 Thread Clint Tredway
thanks for all the replies. I was able to use the date_format() from MySQL. Clint - Original Message - From: Rick Emery [EMAIL PROTECTED] To: Clint Tredway [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, December 13, 2002 1:13 PM Subject: Re: [PHP] Date Formatting MYSQL will do all

[PHP] Testing smtp server

2002-12-13 Thread Max Clark
Hi- I would like to open a connection to tcp port 25 (smtp) as a conditional in a script (if succeeds to this, else to that). I found the socket_create function that is listed as experimental and requires a re-compile of php. Is there a built in way to perform this kind of test? Thanks in

Re: [PHP] Testing smtp server

2002-12-13 Thread Johannes Schlueter
On Friday 13 December 2002 21:30, Max Clark wrote: I found the socket_create function that is listed as experimental and requires a re-compile of php. Is there a built in way to perform this kind of test? Based upon the second example on http://www.php.net/manual/en/ref.sockets.php : echo

[PHP] Java in PHP

2002-12-13 Thread Liquid Chaos
Hi there. Question. How do you access a custom java class in php that has its own define packages? meaning when I access a java class in php the java class calls other classes to do the job. But when I call the class I get an error: java.lang.NoClassDefFoundError: CaseManager (wrong name:

[PHP] Reloading page in frame after SQL Insert

2002-12-13 Thread James Johnson
Hi, I'm building a frameset based app which displays a list of pages. The left hand frame contains a list of pages, the middle frame has a New Page page. After the new page information is inserted into the DB, how can I get the left hand frame to refresh itself, to show the new page. It must

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread Colin Bossen
I have a similar problem. I am trying to figure out which of two dates is greater. Both are in the -mm-dd format. Is there any easy function that allows this sort of comparison or am I missing something? On Friday, December 13, 2002, at 01:43 PM, vernon wrote: I found this code on the

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread Kevin Stone
Again the solution is to convert the dates into timestamps for easy comparison. In your case you can use the strtotime() function. I believe that -mm-dd is a standard date format that the function will recognize, is it not? $ts1 = strtotime($date1); $ts2 = strtotime($date2); if ($ts1 $ts2)

[PHP] Shared Memory in PHP

2002-12-13 Thread Krishnan
Hi all, I am new to PHP and would like the expert opinion of this forum on something that I am trying to do I have about 500K entries (name,value pairs) for which I want ti implement a very fast lookup. I have access to an Oracle database server but I am afraid that it does not have any

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread DL Neil
Colin, I have a similar problem. I am trying to figure out which of two dates is greater. Both are in the -mm-dd format. Is there any easy function that allows this sort of comparison or am I missing something? Treat the dates as strings not numbers: $DateOne = 2002-12-13; $DateTwo =

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread Jean-Marc Libs
On Fri, 13 Dec 2002, Colin Bossen wrote: I have a similar problem. I am trying to figure out which of two dates is greater. Both are in the -mm-dd format. Is there any easy function that allows this sort of comparison or am I missing something? You have a simpler problem. -mm-dd is

[PHP] XML Parse Syntax Error

2002-12-13 Thread Tom Culpepper
I am working on an XML parser and trying to learn about them. All the scripts I get from the net in various tutorials and such all return nothing but XML error: syntax error at line 1. I checked the variables with PHPINFO() and it says that XML support is on. I also know that keeping the

[PHP] Fw: printf %d

2002-12-13 Thread William Martell
- Original Message - From: William Martell [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Sent: Friday, December 13, 2002 2:13 PM Subject: printf %d Hello All. Can anyone tell me what this '%d' refers to? A pointer would be great. Thanks [snip] if (!$result) die (Query

[PHP] Fw: PHP script needs to timeout upon FOPEN to URL

2002-12-13 Thread Phil Powell
- Original Message - From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 13, 2002 5:13 PM Subject: PHP script needs to timeout upon FOPEN to URL I have the following line: while (!($file = @fopen(http://www.myurl.com;, r)) time() $startTime +

[PHP] Parse out text

2002-12-13 Thread Shane McBride
I have a form that is submitting a Javascript to validate fields before the form casn be submitted. The problem is that the field name has to be prefixed with required. So, if I have a field called email, it has to be called requiredemail in order for the javascript to work. How can I remove the

Re: [PHP] Difference between 2 Dates

2002-12-13 Thread vernon
I'm trying to do a mail function where if the date the email was posted was today then a new message would display, otherwise not. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Newer version of PHP causing code incompatibilities

2002-12-13 Thread Paul Keenan
All of our pages which were previously running on a PSA 2.5 server which were done in php used the syntax ? echo hello world; ?. In PSA 5 (or the different install of PHP) you must use the proper ?php hello world; ? syntax. We are now on PHP Version 4.1.2 Our server crashed and we have installed

Re: [PHP] Newer version of PHP causing code incompatibilities

2002-12-13 Thread Brad Bonkoski
Check out the php.ini configuration file, or read about it at the website. I do believe there is an option there where you can declare what your script delimeter is. Most notable an option called Short open tag HTH -Brad Paul Keenan wrote: All of our pages which were previously running on a

[PHP] File Handles?

2002-12-13 Thread poliva
The following is a script from the php.net site for supposedly uploading files via ftp. My question is, why do we have to build handles, what is the purpose of creating this array? //Build handles for uploaded image $imageUpFile = $_FILES['photo_file']['tmp_name']; $imageType =

Re: [PHP] File Handles?

2002-12-13 Thread Rasmus Lerdorf
They aren't really handles (whatever a handle might be) they are simply copies of the data from the $_FILES array so you can use $imageName instead of $_FILES['photo_file']['name'] everywhere throughout the rest of the script. -Rasmus On Fri, 13 Dec 2002 [EMAIL PROTECTED] wrote: The following

Re: [PHP] Parse out text

2002-12-13 Thread Tom Rogers
Hi, Saturday, December 14, 2002, 10:12:28 AM, you wrote: SM I have a form that is submitting a Javascript to validate fields before the SM form casn be submitted. The problem is that the field name has to be SM prefixed with required. So, if I have a field called email, it has to be SM called

[PHP] Fw: Paging / Navigation Question Solved!

2002-12-13 Thread William Martell
Thank you all for your input. Here is the answer that I was looking for. I am posting it here so that anyone else looking for this answer can benefit as well. Thank you all again for your responses. Merry Christmas!! William - Original Message - From: Jay Blanchard [EMAIL PROTECTED]

  1   2   >