RE: [PHP] Need help with formatting time

2001-07-17 Thread Christopher Ostmo
Jack Dempsey pressed the little lettered thingies in this order... $hours = $time / 60; $minutes = $time % 60; if($hours = 12){ $meridian = 'pm'; $hours -= 12; } else{$meridian = 'am';} if($hours == 0){$hour = '12';} echo $hours:$minutes$meridian; try something like

[PHP] Thank you all: Need help with formatting time

2001-07-17 Thread John Holcomb
Thank you all for your help and immedate responses. The following worked: $current_time = date(h:ia, mktime(0,780)); Thank ye all again :) --- John Holcomb [EMAIL PROTECTED] wrote: Hello and thank you. I'm trying to find a function(method) or existing code taht takes the number of

RE: [PHP] Need help with formatting time

2001-07-17 Thread scott [gts]
This will convert minutes to hours, then convert to 12-hour am|pm based time. all hours have 60 minutes. it's simple mathematics to convert. $m = 780; $h = 0; // convert to hours:minutes while ($m = 60) { $h++; $m -= 60; } print $h:$m \n; // convert to 12-hour am|pm if (!$h) { $suff

[PHP] displaying icons

2001-07-17 Thread Petr Jza
Hi everybody! Please, have somebody any experience with displaying icons (type files *.ico) in web pages? When I have a pure html file that contain img src="abduction.ico", all is OK - the icon is shown. But when I create a html page with assistance PHP, the icon isn't shown. Please, could you

[PHP] PHP- Smoething i don't understand

2001-07-17 Thread Yassel Omar Izquierdo Souchay
Hi friends thanks averybodoy for help me i used the solition of Jason Bell [EMAIL PROTECTED] thanks Jason with this try this: mysql_connect(YOUR_DB_HOST,DB_USERNAME,DB_PASSWORD); mysql_select_db(DB); $query = select * from info where FirstName='$FirstName' and LastName='$LastName' and

RE: [PHP] Need help with formatting time

2001-07-17 Thread Jack Dempsey
Once again, a reminder of the smartest way to code php: 1) think for 2 seconds 2) check out php.net for documentation on functions 3) use a function (or 2) already written instead of spending time yourself... jack -Original Message- From: Christopher Ostmo [mailto:[EMAIL PROTECTED]]

Re: [PHP] displaying icons

2001-07-17 Thread Jason Bell
how are you trying to use PHP to output the html? AFAIK, there shouldn't be any difference between: HTML document: IMG SRC="abduction.ico" PHP document: print "IMG SRC='abduction.ico'"; You should note however that within the PHP print statement, you should to refrain from the use of

Re: [PHP] 50 SEX Sites in ONE Affiliate Portal.................

2001-07-17 Thread [EMAIL PROTECTED]
on 7/17/01 4:32 PM, Christopher Ostmo at [EMAIL PROTECTED] wrote: But I do! I do! I LOVE Adult Entertainment. The Godfather and Shawshank Redemption are two of my favorite movies! Oh my god! So do I. Let's go for it Chris! Susan -- [EMAIL PROTECTED] http://futurebird.diaryland.com --

[PHP] How is the management of memory by PHP?

2001-07-17 Thread Luiz Fernando \(Tuca\)
Somebody know how it is the management of memory by PHP? Thanks Luiz Fernando -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] GET Command

2001-07-17 Thread Andrew Brampton
that is basically going to the URL www.whatever.com/scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:\ so do what the other guy said $site = fopen(http://www.whatever.com/, r); $contents = fread($site, 102400); fclose($site); but like this: $site =

[PHP] Time that db´s connection is keep alive

2001-07-17 Thread Marcos Mathias
People! Someone can tell me if PHP 4 closes their connections to the DB automatically at the end of the script? Or I need to use the mssql_close function each time my work is done? Best Regards! Marcos Mathias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

[PHP] Cannot copy a file to a dynamic folder

2001-07-17 Thread Vincent Chew
I get a parse error every time and I've modified the scripts a bunch of times already. // Make new directory function $default_dir = (D:\www\Proj\$textfield2\); if(file_exists($default_dir)) rmdir($default_dir); mkdir($default_dir, 0777); // Copy template.html to new directory $filename =

Re: [PHP] Time that db´s connection is keep alive

2001-07-17 Thread Christopher Ostmo
Marcos Mathias pressed the little lettered thingies in this order... People! Someone can tell me if PHP 4 closes their connections to the DB automatically at the end of the script? Or I need to use the mssql_close function each time my work is done? Best Regards! From:

[PHP] Setting title with header ?

2001-07-17 Thread Beric Slobodan
I have this code: $size = filesize($file); $fh = fopen($file, r); $name = basename($file); header(Content-Type: application/octet-stream); header(Content-Length: $size); header(Content-Disposition:$attachment filename=$name);

[PHP] Force new page in browser and wait commands

2001-07-17 Thread Hugh Danaher
Help, I'm new to php, and to writing software in general. Enough said on that. What I want to do, is to have my program wait for user input on a form and once data is submitted, to have the browser (IE5) generate a new page. Right now, my program runs straight through input forms and

[PHP] libxslt ?

2001-07-17 Thread Regenfeld
hi, just a few questions ;-) will there be a libxslt-extension available in the near future? I heard it will be featured in v.4.1? Or are there any alternatives to sablotron? thanx, regenfeld -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] How make the time

2001-07-17 Thread David Tandberg-Johansen
Hello! I am trying to make an online booking script for a client (restaurant), and I am using MySQL to store the booking information The restaurant have openings hour from 11:00 - 01:00, but do only take reservation between 11:00-22:30. The client wants to get a report written out over each hour

Re: [PHP] learning PHP from scratch

2001-07-17 Thread Matthew Garman
On Tue, Jul 17, 2001 at 04:55:11PM +1000, Jason Rennie wrote: This approach worked pretty well with previous people i teached PHP, but they already had some sort of programming background. This guy hasn't. I find that he has some difficulties picking it up. And I have some

Re: [PHP] md5 crypt question

2001-07-17 Thread tc lewis
not sure if you've gotten any help on this yet. perhaps test the CRYPT_SALT_LENGTH and CRYPT_MD5 constants to make sure that your system and compiled php support md5 via crypt(). also, what salts did you try? note the comments at the bottom of http://php.net/manual/en/function.crypt.php about

Re: [PHP] md5 crypt question

2001-07-17 Thread Jeremy Hansen
Well, I'm assuming, perhaps incorrectly that the perl modules I used derived its md5 capabilities from the system. I did see all the comments on the crypt() page and basically copied each one. When passing a md5 looking salt, crypt() doesn't seem to do anything special with it and my salt

Re: [PHP] md5 crypt question

2001-07-17 Thread Jeremy Hansen
On Tue, 17 Jul 2001, tc lewis wrote: try: php echo(CRYPT_SALT_LENGTH); ? php echo(CRYPT_MD5); ? or: php echo constant(CRYPT_SALT_LENGTH); ? php echo constant(CRYPT_MD5); ? you should get output of 12 and 1 (not 2 and 0) if md5 is supported in crypt(), i think. you compiled php on

[PHP] a simple question

2001-07-17 Thread Hamed
Hi, Can anyone tell me please what is the equivelant of this statement from perl, in PHP? $variable = qq~a value with any quotes which doesnt need \'\'s~; i use it to get away with all the s\lashes behind quotes. can anyone tell me how to do that in php? Regards Hamed -- PHP General

Re: [PHP] md5 crypt question

2001-07-17 Thread Jeremy Hansen
On Tue, 17 Jul 2001, tc lewis wrote: try: php echo(CRYPT_SALT_LENGTH); ? php echo(CRYPT_MD5); ? or: php echo constant(CRYPT_SALT_LENGTH); ? php echo constant(CRYPT_MD5); ? you should get output of 12 and 1 (not 2 and 0) if md5 is supported in crypt(), i think. Yeah, I'm getting 2 and

[PHP] Re: a simple question

2001-07-17 Thread Philip Hallstrom
you can't. at least the last time I wanted to you couldn't. I think Rasmus said it would require a lot of work in the parser... If I'm wrong, I'll be very happy. On Wed, 18 Jul 2001, Hamed wrote: Hi, Can anyone tell me please what is the equivelant of this statement from perl, in PHP?

Re: [PHP] note to PHP developers

2001-07-17 Thread Michael Hall
Me too. I've never had a problem with Postfix. It just dropped in in Sendmail's place and has worked wonderfully ever since. Great piece of software. Mick On Wed, 18 Jul 2001, Christopher Allen wrote: Also, postfix works fine for me... On a side note, qmail has a wrapper that pretends

Re: [PHP] passing variables from forms to the same page repetatively

2001-07-17 Thread Michael Hall
What about registering some session variables? Sessions use cookies and/or URLs to propagate info across multiple pages. Not really secure, though, but they are easy to use. Mick On Wed, 18 Jul 2001, Tim Olsen wrote: Yeah, I had thought about using hidden inputs, but hidden inputs are not

RE: [PHP] note to PHP developers

2001-07-17 Thread Jason Murray
Me too. I've never had a problem with Postfix. It just dropped in in Sendmail's place and has worked wonderfully ever since. Great piece of software. I was led to believe Postfix is what Qmail evolved into? Jason (running Postfix from day 1, no problems at all with it...) -- Jason Murray

Re: [PHP] a simple question

2001-07-17 Thread Rasmus Lerdorf
$variable = BLAH '' BLAH; On Wed, 18 Jul 2001, Hamed wrote: Hi, Can anyone tell me please what is the equivelant of this statement from perl, in PHP? $variable = qq~a value with any quotes which doesnt need \'\'s~; i use it to get away with all the s\lashes behind quotes. can

[PHP] method=post destroys PHPSESSID??

2001-07-17 Thread Dan Harrington
Hello all, I'm having a heck of a time with a file uploader page. When I set method=post on the file uploader form, the PHP session is somehow corrupted during the upload, and any links made in the in the resulting page (photoupload.php) don't pass along the session even though they have the

Re: [PHP] passing variables from forms to the same page repetatively

2001-07-17 Thread Dave Freeman
On 17 Jul 01, at 0:11, Tim Olsen wrote: So far, I can only use variables on the next page (form) that is written out. After that those variables have no value. Is there some way to submit Investigate using input type=hidden form tages - very useful for passing around additional args

[PHP] question

2001-07-17 Thread Rhony V.
In Asp i have this response.redirect name_page.asp, it's used to go to another page what is the similar function in PhP? Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

[PHP] Problem

2001-07-17 Thread Rhony V.
In Asp i have this response.redirect name_page.asp, it's used to go to another page what is the similar function in PhP? Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

Re: [PHP] md5 crypt question

2001-07-17 Thread tc lewis
On Tue, 17 Jul 2001, Jeremy Hansen wrote: On Tue, 17 Jul 2001, tc lewis wrote: try: php echo(CRYPT_SALT_LENGTH); ? php echo(CRYPT_MD5); ? or: php echo constant(CRYPT_SALT_LENGTH); ? php echo constant(CRYPT_MD5); ? you should get output of 12 and 1 (not 2 and 0) if md5 is

Re: [PHP] question

2001-07-17 Thread Alex Piaz
At 20:19 17/7/2001 -0500, Rhony V. wrote: In Asp i have this response.redirect name_page.asp, it's used to go to another page what is the similar function in PhP? A good look at the manual would satisfy your needs http://www.php.net/manual/en header(location:wheredoyouwanttogo.php);

Re: [PHP] md5 crypt question

2001-07-17 Thread Jeremy Hansen
On Tue, 17 Jul 2001, tc lewis wrote: On Tue, 17 Jul 2001, Jeremy Hansen wrote: On Tue, 17 Jul 2001, tc lewis wrote: try: php echo(CRYPT_SALT_LENGTH); ? php echo(CRYPT_MD5); ? or: php echo constant(CRYPT_SALT_LENGTH); ? php echo constant(CRYPT_MD5); ? you should get

RE: [PHP] question

2001-07-17 Thread Jochen Kaechelin
In Asp i have this response.redirect name_page.asp, it's used to go to another page what is the similar function in PhP? header(Location: http://www.your.domain/foo.php;); -- phpArbeitsgruppe in Gruendung - Jochen Kaechelin Stuttgarter Str.3, D-73033 Goeppingen Tel. 07161-92 95

Re: [PHP] mysql_query problem (FINALLY FIXED !!!!!!!)

2001-07-17 Thread Brad Wright
Hi all (he says with a sheepish grin:), To all of those who tried to help with this thread, I thank you from the bottom of my heart Unfortunatly , the problem was not one of syntax, but rather one of gross stupidity on my behalf. The Field where I had been keeping the (encrypted) passwords

Re: [PHP] Re: Known bugs with HTTP upload on Windows NT?

2001-07-17 Thread Adam_Whitehead
Hi Elias- Yes I have write access on all directories. It doesn't seem to matter which directory it copies to either.. because it crashes before the is_uploaded_file() and moveuploadedfile() calls. -Adam

Re: [PHP] email counter

2001-07-17 Thread Jack
Try to use javascript: script language=JavaScript x = window.open(mailto:?php echo $mailaddress ?, Site); /script It's easy to combine it with PHP to count the send mails. In order to do the mail counter using javascript above, how would that work? What is Site for? and Does this script

[PHP] Re: Problem

2001-07-17 Thread tttk
header(location:name_page.asp); Rhony V. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In Asp i have this response.redirect name_page.asp, it's used to go to another page what is the similar function in PhP? Regards -- PHP General Mailing List

[PHP] gd lib question.

2001-07-17 Thread Dave Mariner
Hi, Just a quick question for anyone that uses GD-Lib prior to the latest true-colo(u)r version (specifically v. 1.6.1) - if I try to load a jpeg that has more than 256 colours in it, will it succeed? I know the obvious answer is to try it and see...but I don't have it here on my machine,

RE: [PHP] note to PHP developers

2001-07-17 Thread Michael Hall
No, they're two seperate things. In addition to being incredibly easy to install and configure, Postfix can be made fairly secure and it has a better (=more 'open') license of some kind. Mick On Wed, 18 Jul 2001, Jason Murray wrote: Me too. I've never had a problem with Postfix. It just

Re: [PHP] gd lib question.

2001-07-17 Thread Rasmus Lerdorf
Just a quick question for anyone that uses GD-Lib prior to the latest true-colo(u)r version (specifically v. 1.6.1) - if I try to load a jpeg that has more than 256 colours in it, will it succeed? I know the obvious answer is to try it and see...but I don't have it here on my machine,

[PHP] how to include a remote file and change relative links to non-relative

2001-07-17 Thread Brett
I am trying to create a page that will get a remote file and email it to me. All works fine using several different methods (include,file,fread) only relative links for images and links get my server address instead of the actual address the images should be retrieved from. Is there a way I

[PHP] MySQL Query.....

2001-07-17 Thread Deependra B. Tandukar
Greetings ! I have following tables in MySQL: TableItem idlist 1 Banana 2 Orange 3 Mango Other tables are: Banana, Orange, Mango Instead of selecting Table Banana directly I need to select it as select $TableItem.list where id=1 or something like that for editing or deleting

Re: [PHP] MySQL Query.....

2001-07-17 Thread py_sympatico
Try, select '$TableItem'.list where id = 1; py - Original Message - From: Deependra B. Tandukar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 12:14 AM Subject: [PHP] MySQL Query. Greetings ! I have following tables in MySQL: TableItem idlist 1

[PHP] To overwrite or unregister session variables

2001-07-17 Thread Joseph Blythe
Hey, Was just wondering if it was better practice to unregister session variables before writing new values to them or if it was fine to just overwrite their values? Regards, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

[PHP] PHP and XHTML

2001-07-17 Thread Rose, Daniel
Hi, I have looked through the history of the list, and I see that several people have said that PHP fully supports XHTML. I have some problems using XHTML with PHP, namely parse errors, such as a parse error on the first line of every XHTML doc. ?xml version=1.0 encoding=UTF-8? Version of PHP is

[PHP] Regular expressions

2001-07-17 Thread Philip Murray
In Perl you can do this: $foo =~ tr/012/mpf/; Which is the same as: $foo = str_replace(0, m, $foo); $foo = str_replace(1, p, $foo); $foo = str_replace(2, f, $foo); in PHP. Is there a more elegant way of doing this in PHP? I tried preg_replace but it didn't seem to like my

RE: [PHP] Regular expressions

2001-07-17 Thread Jack Dempsey
Checkout www.php.net/strtr -Original Message- From: Philip Murray [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 1:31 AM To: PHP General List Subject: [PHP] Regular expressions In Perl you can do this: $foo =~ tr/012/mpf/; Which is the same as: $foo =

Re: [PHP] how to include a remote file and change relative links to non-relative

2001-07-17 Thread Aral Balkan
I've been working on Hans Anderson's Browser class and I've adapted it to do what you're looking for. It's not complete but there should be a lot here for you to go on. Again, I haven't had time to fine tune things at all so it's a very rough hack right now. Hope it helps. The dirty on how to

[PHP] PHP based statistics/Graphs

2001-07-17 Thread Chris Aitken
Hi everyone.. Just wondering if anyone can suggest any methods, or even pre-made packages which can be manipulated to show various statistics, charts, graphs etc on a whole range of things. What im looking to do is run a whole bunch of statistics pages for where I work. Client stats, plan

Re: [PHP] PHP based statistics/Graphs

2001-07-17 Thread Rasmus Lerdorf
I like Vagrant. See http://vagrant.sourceforge.net -Rasmus On Wed, 18 Jul 2001, Chris Aitken wrote: Hi everyone.. Just wondering if anyone can suggest any methods, or even pre-made packages which can be manipulated to show various statistics, charts, graphs etc on a whole range of

[PHP] PHP code produces ocasional segfaults.

2001-07-17 Thread Santiago Romero
Hi all... I'm new to PHP and I needed to implement some PHP functions on a php webmail. I readed the PHP MANUAL and I found a code that suits my needs in an example, but it produces segfaults. I added the following code: $ds=ldap_connect(ldap.server.com); if ($ds) {

<    1   2