[PHP] A little confused

2013-04-23 Thread Chris Knipe
Hi All, $_SESSION['ExpiryDate'] = 2013-04-23; echo date_format($_SESSION['ExpiryDate'], D, \t\h\e jS \o\f M Y); Required Result: Mon, the 23rd of Apr 2013 I get however: PHP Warning: date_format() expects parameter 1 to be DateTime, integer given in I've had a look at the date/time function

Re: [PHP] A little confused

2013-04-23 Thread Chris Knipe
Yes, strtotime() does convert the $_SESSION value to a unix epoc, as expected. However, date_format still complains that the argument is a Integer value, instead of a DateTime. On Tue, Apr 23, 2013 at 12:09 PM, Stuart Dallas stu...@3ft9.com wrote: On 23 Apr 2013, at 11:07, Chris Knipe sav

Re: [PHP] A little confused

2013-04-23 Thread Chris Knipe
PM, Chris Knipe sav...@savage.za.org wrote: echo date_format($_SESSION['ExpiryDate'], D, \t\h\e jS \o\f M Y); Why not construct DateTime object echo date_format(new DateTime($_SESSION['ExpiryDate']), D, \t\h\e jS \o\f M Y); Or $dt = new DateTime($_SESSION['ExpiryDate']); echo $dt-format

Re: [PHP] 0.0.0.0 iplong()

2012-06-05 Thread Chris Knipe
Na-uh. You want 0.0.0.0/0, which is valid. 0.0.0.0/24 isn't valid. -- Regards, Chris Knipe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] LDAP, Active Directory, and permissions

2010-11-30 Thread Chris Knipe
to code some ..NET application to act as a gateway between the PHP interface and Active Directory, but naturally I would like to do as much as possible from within PHP itself. Many thanks, -- Regards, Chris Knipe

RE: [PHP] LDAP, Active Directory, and permissions

2010-11-30 Thread Chris Knipe
Hi, Chris, 1) Shouldn't the OU security permissions be set within the AD itself? 2) If the above is done, then the user account that's being authenticated shouldn't be able to access privileged information. 1) Not sure. The permissions I'm after is similar to that of NTFS permissions on

[PHP] Declaring vars as INT ?

2005-10-21 Thread Chris Knipe
Hi, Uhm... Let's take the below quickly: Function DoSomething($Blah) { $Blah = (int) $Blah; return $Blah } $Blah, cannot be larger than 2147483647, and sometimes, I get negative integers back from the above function. This is with PHP 4.4.0 on FreeBSD 5.4-STABLE. Can anyone else perhaps

RE: [PHP] Declaring vars as INT ?

2005-10-21 Thread Chris Knipe
Aha :) Thanks. -Original Message- From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] Sent: 21 October 2005 22:04 To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Declaring vars as INT ? On Fri, 2005-10-21 at 21:39 +0200, Chris Knipe wrote: Function

[PHP] round?

2005-04-16 Thread Chris Knipe
Hi, I'm not sure if round() is what I am after. I want to round whole numbers to the closest 10 - thus, not decimals, etc. For example. 11.23 = 10 14.76 = 10 15.23 = 20 18.53 = 20 Thanks, -- Chris. I love deadlines. I especially love the whooshing sound they make as they fly by... - Douglas

[PHP] something stupid... split().

2005-03-17 Thread Chris Knipe
Lo all, echo ConvertTime($AcctSessionTime/90); # Returns: 03:17:46.77 I am trying to drop the .whatever.. Thus, list($Duration, $none) = split('.', ConvertTime($AcctSessionTime/90), 2); However, $Duration is empty, and $none has the whole string from ConvertTime As I said, something

Re: [PHP] something stupid... split().

2005-03-17 Thread Chris Knipe
[] was the answer... Something stupid sorted :) -- Chris - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, March 17, 2005 1:16 PM Subject: [PHP] something stupid... split(). Lo all, echo ConvertTime($AcctSessionTime/90); # Returns: 03

[PHP] Troublesome Code.

2005-01-31 Thread Chris Knipe
Lo everyone, Can someone please perhaps just indicate to me what is wrong with the below code? I am getting SQL Result errors, but all the queries executes successfully. Errors in browser: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in

Re: [PHP] Re: Troublesome Code.

2005-01-31 Thread Chris Knipe
Had a fault in some globally included mysql structures... I don't know how this happened, but my mysql_select_db seemed to have dissapeared. Thus there was no database initialised, and hence all the queries actually did not complete. I sorted it out - it's all working now :) Thanks for the

Re: [PHP] VOTE TODAY

2004-11-02 Thread Chris Knipe
I can't wait for the replies... Here's a reply: Don't vote for Bush. - Grant I'm Canadian, please stop wasting my bandwidth. I'm South African (and bandwidth is very expensive), please don't waiste mine either *G* -- Chris. *

[PHP] Compiling issues...

2004-07-13 Thread Chris Knipe
Lo all, The software... FreeBSD4.9-STABLE, Apache 1.3.27, and PHP4 4.3.7 (From Ports). Everything compiles fine, running mySQL Client version 5.0 LDD shows: [EMAIL PROTECTED]:/usr/local/libexec/apache# ldd /usr/local/libexec/apache/libphp4.so /usr/local/libexec/apache/libphp4.so:

Re: [PHP] How to compare between two values?

2004-01-16 Thread Chris Knipe
err if ($_GET['value2'] == $DataRecord['Value1']) { // do something } ? - Original Message - From: SASSINC Internet Solutions - Arabic Department [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 16, 2004 2:42 PM Subject: [PHP] How to compare between two values?

Re: [PHP] what is the problem?

2003-07-19 Thread Chris Knipe
form.php is this: form method=post action=takeform.php input type=text value=sentence /form input type=text name=sentence value=sentence Learn to code html ;) takeform.php is this: ? echo $sentence; ? echo $_POST['sentence']; these codes are running at my hosting but it couldn't

Re: [PHP] mysql_query

2003-07-06 Thread Chris Knipe
- Original Message - From: Kevin Fradkin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 06, 2003 6:40 PM Subject: Re: [PHP] mysql_query the problem is if i put 821000 i will have as result all number 821000 including 83 and i only need numbers begining with the

Re: [PHP] mysql_query

2003-07-06 Thread Chris Knipe
one last question for the day... if in one cell i have two names. ex 'mary eleanor' and i want to search by typing 'ele' with name LIKE '$name%' will not give me mary eleanor as a result... any ideas? *sighs* LIKE '%$name%' As I said... Read the MySQL Manual. -- PHP General

Re: [PHP] Authorization script

2003-07-05 Thread Chris Knipe
I am making an authorizatoin script for the control panel of a loggin system I have been writing. Here is what I have right now: Well, if you copied and paste'd this, then I'm surprised that you don't get a syntax error if (!$authorized) { header('Cache-Control: no-store, no-cache,

[PHP] Re: usenet post on frebsd php port problem

2003-06-10 Thread Chris Knipe
Hi, I know what the problem is, I also have no cure for it though - I'm still investigating. libcrypto (part of OpenSSL / SSH I believe) come standard with FreeBSD as part of the source tree, installed in /usr/lib. There you should have a libcrypto.so.1 2. SOMEWHERE a certain port also

[PHP] Interesting.... :/

2003-06-04 Thread Chris Knipe
Lo all, Some input much appreciated. I upgraded mod_php4 from 4.2.3 to 4.3.2, and needless to say, something went horribly wrong. PHP compiled without any serious problems, and the installation seemed to have gone fine as well. When issuing a apachectl restart, apache immediately core dumped...

[PHP] no phun intended!!!

2003-03-08 Thread Chris Knipe
http://www.fingers.co.za/arb/mod_perl.jpg If this starts a flame war, I'm going to be rather disappointed at people that's not able to take a joke :P I think it's hilarious though... -- me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] WE NEED SOME ADVICES: What is the best way for sending a huge amount of emails?

2003-02-25 Thread Chris Knipe
Get mailing list software such as majordomo / mailman. PHP isn't the best way to do these kind of things... -- me - Original Message - From: Jean Fábio Barros [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 10:59 PM Subject: [PHP] WE NEED SOME ADVICES: What is

Re: [PHP] Computer Authorization

2003-02-20 Thread Chris Knipe
You can also maybe look at client side SSL Certificates... - Original Message - From: Chris Cook [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 21, 2003 2:59 AM Subject: [PHP] Computer Authorization Hello all, I am looking into an application that only specific

[PHP] php ecommers site

2003-02-19 Thread Chris Knipe
Lo all, Is there any good already developed PHP based commerce solutions out there? I'm preferably looking for something with catalogues (product pics, descriptions, ratings, buyer comments, etc), online payment options, xml support (to sell via partners for example), etc etc etc. Thanks, -- me

Re: [PHP] inserting BR

2003-02-18 Thread Chris Knipe
I believe you are looking for pre/pre. I may be mistaken though. -- me - Original Message - From: Michael P. Carel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 10:36 AM Subject: [PHP] inserting BR hi to all, I'm having problem posting messages that have

[PHP] Barcodes...

2003-02-02 Thread Chris Knipe
Lo all, Does anyone have some fonts or neat PHP code / classes to generate Code 128-type Barcodes? I'm preferably looking to get the barcode generated in a PNG / GIF type format... -- me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with Error, I am Trying!!

2003-01-20 Thread Chris Knipe
if (!$_POST['Team_Name'] || !$_POST['First_Name'] || !$_POST['Last_Name'] || !$_POST['Email'] || !$_POST['Username'] || !$_POST['Password']) header (location: http://www.ultimatefootballleague.com/Create_Account.htm;); } Change to: if (!$_POST['Team_Name'] || !$_POST['First_Name'] ||

Re: [PHP] Mass Mailing

2002-12-21 Thread Chris Knipe
Why not just use simple alias files? 1) You have a file with all your addresses file.asc: [EMAIL PROTECTED] [EMAIL PROTECTED] etc 2) You have the alias entry my-mass-list::include:/path/to/file.asc 3) PHP sends one email to [EMAIL PROTECTED] 4) The mail server (if it's any good),

Re: [PHP] Can I check MYSQL version

2002-12-08 Thread Chris Knipe
oh gawd... get the spoons... $query = mysql_query(select version as version) while ($result = mysql_fetch_row($query)) { // do a strcmp() or ereg() on $row['0'] } - Original Message - From: John Taylor-Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, December 08, 2002

[PHP] Upgrade issues

2002-11-25 Thread Chris Knipe
Lo all, I upgraded from PHP 4.2.1 to 4.2.2, and now all of a sudden the following code is generating a WARNING??? if (file_exists(themes/$ThemeSel/modules/$name/$mod_file.php)) { $modpath = themes/$ThemeSel/; } I don't get it? Warning: Unable to access

Re: [PHP] Upgrade issues

2002-11-25 Thread Chris Knipe
if (file_exists(themes/$ThemeSel/modules/$name/$mod_file.php)) { $modpath = themes/$ThemeSel/; } I don't get it? Warning: Unable to access themes/DeepBlue/modules/News/index.php in /usr/local/www/v-webs/games.savage.za.org/html/index.php on line 46 Line 46 is

Re: [PHP] Upgrade issues

2002-11-25 Thread Chris Knipe
if (file_exists(themes/$ThemeSel/modules/$name/$mod_file.php)) { $modpath = themes/$ThemeSel/; } I don't get it? Warning: Unable to access themes/DeepBlue/modules/News/index.php in /usr/local/www/v-webs/games.savage.za.org/html/index.php on line 46

Re: [PHP] Upgrade issues

2002-11-25 Thread Chris Knipe
, November 25, 2002 8:19 PM Subject: Re: [PHP] Upgrade issues Check the owners of directories and files, they must be the same as for /usr/local/www/v-webs/games.savage.za.org/html/index.php, then it should work under safe mode too. Chris Knipe wrote: if (file_exists(themes/$ThemeSel/modules

Re: [PHP] Write file can't work ?!? :-(

2002-11-17 Thread Chris Knipe
The IIS user running the web server on NT needs read/write permissions on the file in the web server. By default, it only have read access to the file... - Original Message - From: Stephen [EMAIL PROTECTED] To: Ivan Mareniæ [EMAIL PROTECTED] Cc: PHP List [EMAIL PROTECTED] Sent: Sunday,

Re: [PHP] Using info from a MySQL Query

2002-11-05 Thread Chris Knipe
$sql = query $result = mysql_query($sql) while ($data = mysqlfetch_array($result)) { echo $data['colum']; } - Original Message - From: Ben C. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 06, 2002 3:09 AM Subject: [PHP] Using info from a MySQL Query I am using

[PHP] infinate loops

2002-10-30 Thread Chris Knipe
Lo, Quite desperate now... Or at least, I'm starting to get there... Can anyone perhaps see why this loop is not exiting??? $quit=$now; $glet=getdate($row['RenewDate']); // debug echo howlong: . $howlong; while($quit$howlong) { // debug echo quit: . $quit . br; $quit=mktime(0, 0, 0,

[PHP] Re: infinate loops

2002-10-30 Thread Chris Knipe
Nevermind, It was due to a inconsistency in the DB It's sorted :P - Original Message - From: Chris Knipe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 2:32 AM Subject: infinate loops Lo, Quite desperate now... Or at least, I'm starting to get

[PHP] mysql_query() mail() - something weird is going on !

2002-09-12 Thread Chris Knipe
Lo all, I get a timeout on line 523 of my code (posted and marked below). However, I fail to see where the timeout is occurring, and even debugging (mysql_error()) doesn't report anything wrong! I'm baffled as to what exactly is causing this timeout The code is currently on Apache (Win32)

Re: [PHP] why do i get this error please tell me?

2002-08-31 Thread Chris Knipe
You have an error in your SQL syntax near 'order=1 WHERE ID='2'' at line 2 ORDER is a reserved word in MySQL. Change the query and escape order aswell 'order'='1' WHERE ID='2' Or, rename the order column to something else. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] RE : include interpreted php file

2002-08-31 Thread Chris Knipe
fopen() Regards, Chris Knipe Cell: (072) 434-7582 MegaLAN Corporate Networking Services /--- | This email is confidential and may contain legally privileged information. | If you are not the intended recipient, you must not disclose or use | the information contained in it. If you have

Re: [PHP] Re: Help needed about queries with MySQL, thanks.

2002-08-18 Thread Chris Knipe
Same here... Even though allot of people say it's not necessary... - Original Message - From: Carsten Mohr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, August 18, 2002 5:22 PM Subject: [PHP] Re: Help needed about queries with MySQL, thanks. Hallo, I don't know if it helps

Re: [PHP] How Can I Generate an Email List from a MySQL Table

2002-08-17 Thread Chris Knipe
$to = ''; while ($blah = mysql_fetch_row($ref)) { $to =+ $blah['address']; }; Be careful however. Most SMTP servers has a limit on the number of recipients you can send one email to. It's a very easy way to trigger spam alerts and stuff. -- me - Original Message - From: Roger

Re: [PHP] weird urls

2002-08-10 Thread Chris Knipe
Erm, because that's the way it works? Regards, Chris Knipe Cell: (072) 434-7582 MegaLAN Corporate Networking Services /--- | This email is confidential and may contain legally privileged information. | If you are not the intended recipient, you must not disclose or use | the information

Re: [PHP] include()

2002-08-02 Thread Chris Knipe
If you run your own server, you can set it up so that each webmaster is locked into a private environment, but it's messy. According to me, you would need a separate copy of apache for each site, each running under a different user, and they would need to run on separate ports, which is a

Re: [PHP] Using index.php instead of index.html

2002-07-16 Thread Chris Knipe
Why not just add it to the httpd.conf, this would allow it to work within the whole server And not just one director / vhost ect Maybe he doesn't have access to alter server configurations? -eg- -- me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] transparent clusters + sessions

2002-07-16 Thread Chris Knipe
If I have say 20 web servers in a cluster behind something like a Cisco LocalDirector, will session data remain constant over the 20 web servers if they use a shared NFS or similar mount to save session data on? Have a look at msession at http://www.mohawksoft.com/phoenix/ It works very

[PHP] Sorting getmxrr()

2002-07-15 Thread Chris Knipe
Lo all, if (getmxrr($DomainPart, $DomainMX, $Weight)) { for ($Counter = 0; $Counter count($DomainMX); $Counter++) { echo $DomainMX[$Counter] ($Weight[$Counter]) ; } } How can I manage to sort $DomainMX from the lowest $Weight to the highest, while still preserving the proper

Re: [PHP] retrieving random data from mysql database

2002-07-14 Thread Chris Knipe
SELECT RANDOM name FROM table or SELECT name FROM table ORDER BY RANDOM LIMIT 1 not tested, used at your own free will. -- me - Original Message - From: mm fernandez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 14, 2002 11:37 PM Subject: [PHP] retrieving random data

Re: [PHP] mail() problem

2002-07-13 Thread Chris Knipe
Does anyone have an idea, what might cause this problem? Could it be the ISP, or do i need to add additional info, when i call the mail() function in order to send emails outside my network? Could be your ISP... This is what i used to test if the emails get sent or not: ? mail([EMAIL

Re: [PHP] MAIL FROM NO ONE

2002-07-11 Thread Chris Knipe
On Thu, Jul 11, 2002 at 02:29:11PM +0200, vins wrote: Hi... I've just checked out a script from hotscripts.com that send email from and smtp server... The mail() does exactly the same Nothing fancy about it. I've managed to say the email has come from a server that doesn't exist but

Re: [PHP] Help a Header Headache!!

2002-07-11 Thread Chris Knipe
Have you perhaps tried rather sending the mail using MIMETools ? There's a PHP class writen that's actually pretty good for sending MIME based email... I'm not sure what it's called now, but I'm sure someone else on the list will be able to elaborate on this. On Thu, Jul 11, 2002 at 12:26:45PM

Re: [PHP] Help a Header Headache!!

2002-07-11 Thread Chris Knipe
On Thu, Jul 11, 2002 at 08:59:28PM +0100, Chris Hewitt wrote: I have not responded to this before as I have not used EMBED or OBJECT tagss but I have used Manuel Lemos's smtpclass-2002-05-13.tar.gz and mimemessage-2002-06-08.tar.gz which are intended for html email. They are on

Re: [PHP] Re: MAIL() Trouble. Need your eyes.

2002-07-11 Thread Chris Knipe
On Thu, Jul 11, 2002 at 07:00:57PM -0400, Chris Earle wrote: - ?PHP $myname = Me Myself; $myemail = [EMAIL PROTECTED]; $myreplyemail = [EMAIL PROTECTED]; $contactname = Mister Contact; $contactemail = [EMAIL PROTECTED]; That's ok...

Re: [PHP] REminder APllication

2002-07-11 Thread Chris Knipe
On Thu, Jul 11, 2002 at 10:05:05PM -0400, John Holmes wrote: DOes anyone know how to build a reminder application on: a) identified users b) Sorting users' reminders?? Yes. You just couldn't resist, could you? ;) I like it -g- To be a bit more precise, the awnser's actually No.

[PHP] safe_mode

2002-07-11 Thread Chris Knipe
Lo all, Does anyone have some examples, ideas, or references on how to setup php's safe_mode operation so that I can provide a reasonably secure environment for hosting php3 and php4 (public web sites, with public users). This is for a public type hosting environment, so I'll definately need to

Re: [PHP] Mail() function

2002-07-09 Thread Chris Knipe
No you cant. All Received:, Date:, Message-ID headers are added to the message at the SMTP server... Hence, any halfly decent configured SMTP server will *always* add those headers to *any* message. If you have administration over the SMTP server, you can with allot of tweaking configure the

[PHP] mysql_real_escape_string() ?

2002-06-18 Thread Chris Knipe
Lo all, Does mysql_real_escape_string exist? I've seen it in the manual pages, and to my understanding, it is the proper function to call on strings to escape them before inserting them into a database... I've used it as follows: $text[1] = mysql_real_escape_string($text[1]);

Re: [PHP] substr?

2002-06-18 Thread Chris Knipe
When working with Boolean expressions in this way, deMorgan's laws often come in handy; these state that: !a AND !bis the same as !(a OR b) !a OR !b is the same as !(a AND b) Hope this helps!! I don't know who this deMorgan dude is, but that rule is being written

Re: [PHP] URGENT

2002-06-18 Thread Chris Knipe
local = '$local', city = '$city', postcode = '$postcode', id = '$id'; $sql .= WHERE username='$username'; This would be: local = 'x', city = 'x', postcode = 'x', id = 'x'WHERE username='x' Which is your fault. $sql .= WHERE username='$username'; needs to change to $sql .= WHERE

[PHP] persistent connections

2002-06-16 Thread Chris Knipe
Lo all, Is there anyway to manage persistent connections to MySQL? I've started using them on various of my sites (mysql_pconnect instead of mysql_connect - as in the documentation), but after a few hours, I notice that the connections just keeps on getting more and more and more. Eventually,

Re: [PHP] SMS with PHP

2002-06-10 Thread Chris Knipe
Not as far as I know. But the PHP script may very likely be able to send a message to a SMS Gateway... SMS messages doesn't run on TCP/IP (Your cell phone doesn't have a IP Address). Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064 Cell: +27 72 434 7582

Re: [PHP] e-commerce example

2002-06-08 Thread Chris Knipe
www.google.com / www.freshmeat.net Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064 Cell: +27 72 434 7582 - Original Message - From: savaidis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 08, 2002 5:59 AM Subject: [PHP] e-commerce

Re: [PHP] Removing ^M

2002-06-08 Thread Chris Knipe
Perl apparently also works very nice for this open (FILE, filename): open (NEWFILE, filename); WHILE (FILE) { chomp; print NEWFILE $_ } close (FILE); close(NEWFILE); this should take care of ^M Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064 Cell: +27

Re: [PHP] Removing ^M

2002-06-08 Thread Chris Knipe
print NEWFILE $_ . \n; Then :P This isn't a perl list, it's off topic. Just thought it might help if I added this to the pool Let's rather not go into a in depth discussion about it... I'm no perl guru either. Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21

Re: [PHP] Parse Error in my Mail Function -UPDATED

2002-06-07 Thread Chris Knipe
The problem being now I am getting a parse error on lines 30. Line 29, 30, and 31 is where exactly in all this?? Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064 Cell: +27 72 434 7582 - Original Message - From: Anti-Blank [EMAIL PROTECTED

Re: [PHP] convertion from string to time substracting

2002-06-07 Thread Chris Knipe
Talking under correction, but you'll be better of using a TIME column in MySQL. You can also do all the calculations with MySQL's build in time functions already, which will save you allot of time, seeing that all the calculations can be done via a single SQL query. -- me - Original

Re: [PHP] convertion from string to time substracting

2002-06-07 Thread Chris Knipe
Talking under correction, but you'll be better of using a TIME column in MySQL. You can also do all the calculations with MySQL's build in time functions already, which will save you allot of time, seeing that all the calculations can be done via a single SQL query. Yes, this is the

Re: [PHP] convertion from string to time substracting

2002-06-07 Thread Chris Knipe
- Original Message - From: John Holmes [EMAIL PROTECTED] To: 'juaid' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, June 07, 2002 8:29 PM Subject: RE: [PHP] convertion from string to time substracting That error means your query failed and the result set is not valid. You can't

Re: [PHP] convertion from string to time substracting

2002-06-07 Thread Chris Knipe
where $month, $day and $year are got from a form in the previous page via POST method. So the LIKE condition matches against the date field in the table, where the format is like Jun 7 2002 if I switch connTime, startTime and stopTime to TIME types, I get the error I said I'll try the

Re: [PHP] Chat

2002-06-07 Thread Chris Knipe
or something similar, which uses a IRCD server as a backend to the PHP interface for chatting - it's on freshmeat.net the last time I looked... Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064 Cell: +27 72 434 7582 - Original Message - From: André Riedel

Re: [PHP] string convertion to time substracting

2002-06-07 Thread Chris Knipe
Awesome :-) Glad to have been able to help... -- me - Original Message - From: juaid [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 07, 2002 9:22 PM Subject: [PHP] string convertion to time substracting Well, I got all working now and calculating the duration with mysql

[PHP] multiple selects and $_POST['vars']

2002-06-06 Thread Chris Knipe
Lo all, How do you manage multiple selects and the data returned by the form? All my attempts at doing this, only returned one variable from the selected options, not all of them?? My test... form method=post action=blah.php select multiple name=bleh option value=11/option option

Re: [PHP] multiple selects and $_POST['vars']

2002-06-06 Thread Chris Knipe
Thanks everyone!! Appreciate it - Original Message - From: 1LT John W. Holmes [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, June 06, 2002 7:18 PM Subject: Re: [PHP] multiple selects and $_POST['vars'] form method=post action=blah.php

Re: [PHP] multiple selects and $_POST['vars'] MORE

2002-06-06 Thread Chris Knipe
Yeah, agreed there!!! You're not supposed to specify a name on a option, just on the select itself. I've changed it now to use the array bit, and the form results return it as a array as expected. Thanks for all the help... I think it's time to download a new copy of the manual again... :)

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Chris Knipe
Have you tried using $_SESSION['bgcolor'] = bleh It might work... who knows... - Original Message - From: dan radom [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 06, 2002 8:36 PM Subject: Re: [PHP] am i just a session tracking idiot? what's weird is that if i set

Re: [PHP] [PLEASE HELP] Passing variable to new page.

2002-06-06 Thread Chris Knipe
echo script language=\JavaScript\; echo function pop1() {; echo window.open(\info.php?prod_id=$result[0]\); }; \\ $result[0] is variable that stores id of the image in database echo /script; I am calling this function in the following manner: echoimg onclick=\pop1();\;

Re: [PHP] Combo box selected value...

2002-06-06 Thread Chris Knipe
select name='.$nome.' size=1'); echo(\n); while ($cont $quant) { echo(\n); if ($blah == $bleh) { echo(' option value='.mysql_result($resultado, $cont,$letra).' selected'.mysql_result($resultado, $cont,$letra).'/option');

Re: [PHP] FW: NEED HELP (passing variable to new page)

2002-06-06 Thread Chris Knipe
OOOH, but everyone does such a fine job!!! *eg* Can anyone help me and tell me how to switch a computer on? -hides before he starts some arb war or something- And yes, for the curious or missing minded, that was a joke... -- me - Original Message - From: Scott Hurring [EMAIL

Re: [PHP] Need info abou ASP/Java HTML Form handling

2002-06-06 Thread Chris Knipe
*urgh* So off topic it's not funny http://www.microsoft.com/vbscript / http://www.microsoft.com/jscript/ I might not be 100% correct on the urls. Just search for VB / JS Script Refence at microsoft.com Kind Regards, Chris Knipe MegaLAN Corporate Networking Services Tel: +27 21 854 7064

[PHP] Comparing array elements

2002-06-05 Thread Chris Knipe
hey everyone, Does anyone have and ideas of wisdom on how to compare arrays (mysql result sets) and group items based on if they exist in two or more arrays? For example: I have a table, with a list of servers: server1 server2 server3 server4 server5 ... serverX I have a table that specifies

[PHP] Re: Comparing array elements

2002-06-05 Thread Chris Knipe
... *shrugs* Any ideas? - Original Message - From: Dan Nelson [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 7:45 PM Subject: Re: Comparing array elements In the last episode (Jun 05), Chris Knipe said: Does anyone

[PHP] Working with ip addresses and address space

2002-05-31 Thread Chris Knipe
Hi all, anyone know of any good pre-written classes or functions to work with IP address space? I'm looking for things which can verify correct notation of IP addresses (fine, that's easy enough), but also verify things like network addresses, broadcast addresses, and work out subnet masks when

[PHP] Expiring certain session data while keeping the session itself

2002-05-20 Thread Chris Knipe
Hiya, me again :-) Is it possible to expire certain session data, while still keeping the session itself in tact? Example... $_SESSION['AlwaysTrue'] = True; $_SESSION['ExpireThis'] = 10:20:00; At 10:19:50 the session is registered. AlwaysTrue must remain True for as long as the session

[PHP] accessing mysql_fetch_array more than once?

2002-05-17 Thread Chris Knipe
Hi all, Howcome, when I do a SQL lookup, I can only access the array once? Say, I have... ? $SQL = mysql_query(SOME SELECT STATEMENT); while ($var = mysql_fetch_array($SQL)) { echo $var['columbname']; } // that works, and prints out the rows in the table // my codes continues. ? some

Re: [PHP] accessing mysql_fetch_array more than once?

2002-05-17 Thread Chris Knipe
Didn't do the trick But it did point my towards mysql_data_seek, which did the job beautifully :) Thanks -- me - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, May 17, 2002 7:04 PM Subject: Re: [PHP

[PHP] How *not* to assume MySQL will return data?

2002-05-13 Thread Chris Knipe
Hiya all, Stock standard, and from most of the examples I've seen, standard MySQL lookups via PHP utlises a while look to retrieve the data. All very nice and well yes... But what if there is no data? Here's a little example of what I want to do... // Check for inportaint notices for the

Re: [PHP] How *not* to assume MySQL will return data?

2002-05-13 Thread Chris Knipe
, if there is no otherway to do it, then I guess this would have to do Kind Regards, Chris Knipe MegaLAN Corporate InterNetworking Services Tel: +27 21 854 7064 Cell: +27 72 434 7582 - Original Message - From: Nathan [EMAIL PROTECTED] To: Chris Knipe [EMAIL PROTECTED] Sent: Monday, May 13, 2002 7:12

Re: [PHP] Combine 2 Db Columns with an Array?

2002-05-13 Thread Chris Knipe
through the mysql manuals... It is mentioned there, with examples. Kind Regards, Chris Knipe MegaLAN Corporate InterNetworking Services Tel: +27 21 854 7064 Cell: +27 72 434 7582 - Original Message - From: PHP User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 13, 2002 8:42

Re: [PHP] sessions

2002-05-12 Thread Chris Knipe
Ok, Let's see if I learned anything - Original Message - From: Jas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 13, 2002 2:30 AM Subject: [PHP] sessions SNIP $msg = p class=\content\You have been authorized to make changes to the web site./p;

Re: [PHP] Destroying Sessions

2002-05-09 Thread Chris Knipe
I am not an expert at PHP / MySQL. To me it would sound like the one = is assigning the $VerifyPasword[ContactID] whatever is in $_SESSION['ContactID'] which would mean that the else part would never be executed. Honestly though, there is a lot that I don't know. I know very I

Re: [PHP] Destroying Sessions

2002-05-09 Thread Chris Knipe
if ($VerifyPasword[ContactID] = $_SESSION['ContactID']) This statement is /always/ true if $_SESSION['ContactID'] is non-zero, or non-empty. If your code is copy-and-paste then the error is most likely because you used a single 's' in $VerifyPasword[ContactID]. And also is better to