[PHP] Zend Studio ESC key issue?

2004-01-28 Thread Gryffyn, Trevor
First, let me apologize for this not being a specific PHP question, but I can't find the answer and I'm hoping someone else here has run into this. Maybe I'm just blind, blond or stupid today. :) In Zend Studio (Zend Development Environment) for Windows (on Windows 2000 fyi), when I hit the ESC

RE: [PHP] PHP EDITORS

2004-01-28 Thread Gryffyn, Trevor
Up until recently, I've used Crimson Editor (http://www.crimsoneditor.com) which does a great job with syntax highlighting and is a great all around editor I think. I'm surprised I don't see it mentioned more often when I see lists of PHP-happy editors. Right not I'm evaluating Zend Studio

RE: [PHP] working with files

2004-01-28 Thread Gryffyn, Trevor
Depending on what system you're using, the EOL (end of line) character is going to be different. On a DOS/Windows system, you want to use \r\n. I can't remember off the top of my head now, but some systems use just \r and some use just \n.. DOS/Windows systems use both, and I believe they need

RE: [PHP] Using unset with $_SESSION

2004-01-28 Thread Gryffyn, Trevor
Then there's session_destroy() too. If I ever suggest something that seems correct on the surface, but there's a good reason to use something else, even in particular cases, feel free to let me know. I think I know PHP fairly well, but it's so flexible and there are usually a dozen ways to do

RE: [PHP] cgi error --- please help

2004-01-28 Thread Gryffyn, Trevor
Odd that it would work after you hit REFRESH, though. If it was the CLI version, wouldn't youg et the bad headers error every time you refreshed the browser? Could always try manually initiating the headers using the header() command. That may be your own course of action if, for some reason,

RE: [PHP] Cacheing data form PHP script

2004-01-28 Thread Gryffyn, Trevor
$_SESSION sounds like a good way to go.. It just means that each user will pull the data for the menu at least once. I've done something similar except it was a rather slow database query, followed by a bunch of conditional data parsing. The end result wasn't very much data (maybe a page's

RE: [PHP] Cacheing data form PHP script

2004-01-28 Thread Gryffyn, Trevor
It's not really that bad, maybe I just made it sound complicated and annoying. (pseudo-php) If (dataexistsindb) { $cachedata = SELECT cachedata from DB $dataarr = unserialize(cachedata) } else { $dataarr = SELECT freshdata $cachedata = serialize($dataarr) INSERT or UPDATE

RE: [PHP] Sessions not working.

2004-01-29 Thread Gryffyn, Trevor
Random thought.. Did you check your PHP.INI on the 'bad' server to make sure that it's configured the same as the 'good' server? Some things to check: Session.use_cookies = 1 Session.auto_start = 0 // This is the first one I'd check. If you have it set to =1 on the good server and aren't doing

RE: [PHP] Spell checker in PHP

2004-01-29 Thread Gryffyn, Trevor
There are a lot of words in the spelling checking in Microsoft products that isn't part of what you'd consider a standard 'dictionary', like city names and such. I think for spell checking, using the internal spell check in Word would be best, but if you ever decided to work on Word-PHP

RE: [PHP] Integration between ASP PHP.

2004-01-29 Thread Gryffyn, Trevor
Define integrate? Using both ASP and PHP within the same physical file/script like: ?php Phpcodehere; ? html body % Aspcodehere %? /body /html ?? ...or going from ASP pages to PHP pages? That is, Default.asp calls menu.php or something like that? In the first case, I'm not sure if it's

RE: [PHP] index page not running and other woes (0t?)

2004-01-29 Thread Gryffyn, Trevor
I'd check the permissions of your files as well as any .htaccess settings you may need to set allowances on the files and folders involved. Also check your 'default document' name in your configuration and make sure that it's looking for index.html at all. Although that wouldn't affect it if you

RE: [PHP] Integration between ASP PHP.

2004-01-29 Thread Gryffyn, Trevor
a language. -TG -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 5:35 PM To: Gryffyn, Trevor Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Integration between ASP PHP. Importance: High OK, my problem is to use the crypt

RE: [PHP] sending a hex string as it is?

2004-01-29 Thread Gryffyn, Trevor
Ahh.. Since you're not declaring what data type $var is, it must be treating it as a string, even though I'd think it'd take it as an int if you didn't put quotes around it. That's one thing I like about PHP.. You can be as strict or lax as you want with the types. But I can see in this case

RE: [PHP] sending a hex string as it is?

2004-01-29 Thread Gryffyn, Trevor
But I think he'll still have an issue when he goes to transmit it. Whatever data you have is going to be interpreted by the function doing the sending unless it's a binary safe function that's going to send raw binary. Thanks for the tip on pack though. Havn't needed it yet, but always good to

RE: Re[2]: [PHP] Browser Detection another page

2004-02-18 Thread Gryffyn, Trevor
mycb Sure, but why would a user want to fake their browser signature? They might do it without even knowing. Opera will identify itself as IE6 for example if you select that in the Preferences. Other browsers/packages can do it as standard. Although I can't give a specific example, I bet

RE: [PHP] Weird question - environment data from windows

2004-02-18 Thread Gryffyn, Trevor
-Original Message- From: Martin [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 10:26 AM To: [EMAIL PROTECTED] Subject: [PHP] Weird question - environment data from windows When you've stopped laughing - is it at all possible to pass Windows environment data from a

RE: [PHP] Control structure - easier way than repeating conditions in IF?

2004-04-30 Thread Gryffyn, Trevor
You could do something like this: $valuesarr = array($a,$b,$c,$d); If (in_array($x,$valuesarr)) { # do something } Or I guess even: If (in_array($x,array($a,$b,$c,$d))) { # do something } I don't know if your method or this method have better performance but it's a little

[PHP] RE: [PHP-WIN] i need help

2004-05-18 Thread Gryffyn, Trevor
If the format is consistantly the same, try this: $somedata = [i:aslkdfj]; $insidedata = substr($somedata,3,strlen($somedata)-4); -TG -Original Message- From: Student [mailto:[EMAIL PROTECTED] Sent: Monday, May 17, 2004 11:42 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject:

RE: [PHP] textarea vs. type=text data difference?

2004-10-11 Thread Gryffyn, Trevor
Just wanted to point out something little. text types are all single-line data items. textarea can contain line breaks. Looks like you may have solved your problem already, but wanted to fill in some info that didn't seem to be mentioned. -TG -Original Message- From: Sam Smith

RE: [PHP] PHP gurus...how are they doing this?

2004-10-11 Thread Gryffyn, Trevor
I can't check this out from work (for obvious reasons) but web server logs should record all the incoming requests and what hosts requested what files. Also, search engines like Google provide an API for programmers that could potentially be used to get data like how many people are linked to

RE: [PHP] Is there any way of knowing User Currently Logged On?

2004-10-11 Thread Gryffyn, Trevor
It does and Windows Integrated Authentication has to be turned on (and Anonymous access turned off). I just got my company to configure that so my PHP scripts could grab the authenticated user for logging purposes. -TG -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]

RE: [PHP] Is there any way of knowing User Currently Logged On?

2004-10-12 Thread Gryffyn, Trevor
probably still access the LOGON_USER variable. -TG -Original Message- From: Mulley, Nikhil [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 12, 2004 1:02 AM To: Gryffyn, Trevor; [EMAIL PROTECTED] Cc: John Holmes; Mulley, Nikhil Subject: RE: [PHP] Is there any way of knowing User

[PHP] RE: [PHP-DB] folder creation in php

2004-10-12 Thread Gryffyn, Trevor
, October 12, 2004 2:52 PM To: Gryffyn, Trevor Subject: RE: [PHP-DB] folder creation in php you need to send headers to tell the os what the page is like mime type etc. look on the PHP documentation -Original Message- From: Gryffyn, Trevor [EMAIL PROTECTED] Sent: Oct 12, 2004 1

RE: [PHP] Re: [PHP-DB] folder creation in php

2004-10-12 Thread Gryffyn, Trevor
Yeah, I mentioned some of those problems in my email. What I didn't consider was that the content disposition headers could get around the browser's configured behavior. I found this page: http://forums.devshed.com/t7307/s.html Which recommends using: header(Content-Type:

RE: [PHP] Re: Exporting HTML to Excel

2004-10-13 Thread Gryffyn, Trevor
Philip Thompson wrote: - ?php header('Content-Type: application/ms-excel'); header('Content-Disposition: attachment; filename=project.xls'); ? table tr tdSomething/td /tdSomething else/td /tr /table - I just want it

RE: [PHP] Advanced maths help (for GD image functionality)

2004-10-15 Thread Gryffyn, Trevor
Good questions.. Here's some stuff to play with: Heres my maths problems in 2 parts: Problem 1) I need to scale down an image (eg: example.jpg) to height of 120 pixels while maintaining the images proportions. eg: if i have an image of (height and width) 800x600 what would the

RE: [PHP] Advanced maths help (for GD image functionality)

2004-10-15 Thread Gryffyn, Trevor
Algebra! I aced that in 7th grade! (don't ask me about all the other years of math. Haha.. I think I just got bored and slept a lot or something) -TG -Original Message- From: Jonel Rienton [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 11:02 AM To: Gryffyn, Trevor Cc

RE: [PHP] Advanced maths help (part 2)

2004-10-15 Thread Gryffyn, Trevor
My interpretation of Problem 2 before was that you wanted to get a 120w x 90h (?) section of the original image, not of the thumbnail you generated by resizing the original. You seem to be working off of the adjusted height. Sorry, I didn't noodle all the way through this one, what I am missing?

RE: [PHP] Advanced maths help (part 2)

2004-10-15 Thread Gryffyn, Trevor
: Mag [mailto:[EMAIL PROTECTED] Sent: Friday, October 15, 2004 2:00 PM To: Gryffyn, Trevor Cc: php php Subject: RE: [PHP] Advanced maths help (part 2) Hi Trevor, Sorry, am just a bit confused myself mostly because I am using a third party script to clip the 120x90 part out of the image

RE: [PHP] Re: grabbing information from websites

2004-09-28 Thread Gryffyn, Trevor
The URL that you're grabbing there is a frameset, it's probably not the page you want to look at. When you right-click on the page you want to parse and select View Source and get the information you posted below, do the same thing but right-click and select Properties (in IE at least) and it'll

RE: [PHP] I have a really stupid question, just trying to debug a script though.

2004-09-29 Thread Gryffyn, Trevor
Can you connect to the same address from the same machine with a web browser? That should help troubleshoot this. If you can and you're still getting the error, maybe post a section of your code and maybe we can get a better idea if why it's failing. -TG -Original Message- From:

RE: [PHP] I have a really stupid question, just trying to debug a script though.

2004-09-29 Thread Gryffyn, Trevor
Permission denied could also probably indicate (in addition to what's already been mentioned) that there's authentication needed. If you connect with a web browser, do you get a login prompt window pop up? Not an HTML one, but one of the the basic HTML Auth type stuff? Try pointing your script

RE: [PHP] Two people working on the same app / script?

2004-09-30 Thread Gryffyn, Trevor
CVS is definitely something to check into. In addition to the Mac product mentioned before, Zend Studio and many other IDEs and editors have CVS compatibility built into them. CVS is similar to (but of course has differences to) Microsoft's Source Safe, if you're familiar with that product.

RE: [PHP] constant tasks

2004-10-18 Thread Gryffyn, Trevor
It's possible to have a script running constantly, but Jay's right. CRON or some other task scheduler would probably be better. If you had something running constantly and there was some problem with your compile of PHP or something else that's getting used, there can be memory leaks or other

RE: [PHP] setting index of array as 1

2004-10-18 Thread Gryffyn, Trevor
In that case, you could do this: $x = 1; $query = mysql_query(select name from names order by date desc); while($result = mysql_fetch_array($query)) { $all_names[$x] = $result['name']; $x++; } -TG -Original Message- From: Afan Pasalic [mailto:[EMAIL PROTECTED] Sent:

RE: [PHP] Re: ' (Single Quotes) in user inputs

2004-10-19 Thread Gryffyn, Trevor
Also, you probably want to do a string replace of some kind and make the single quote a double single-quote ' to '' I don't know if that's how MySQL does it, but that's how SQL Server escapes single quotes and I believe other DBs do as well. Just something to look into because I think the

RE: [PHP] Php files with .html extension?

2004-10-25 Thread Gryffyn, Trevor
That's definitely a good point. I'm curious though, would it really be a significant performance issue? Even if a lot of HTML files are being processed by PHP? I mean, if the PHP parser goes through and never sees a ? Or ?php, does it do any more than just output the file? True, that's

RE: Re[2]: [PHP] Php files with .html extension?

2004-10-25 Thread Gryffyn, Trevor
True, it doesn't do anything other than output the HTML. But it's that load - scan - determine - output that takes up CPU time and memory. Sure, on most sites it doesn't matter one bit. But on popular sites.. well, you can do the math I'm sure. I guess at the end of the day it comes down

RE: [PHP] 'Code Snippets' you couldn't live without

2004-11-03 Thread Gryffyn, Trevor
I agree that shorthand is probably bad for, BUT... Greg is absolutely correct. The gist of the post was What do YOU use frequently. His examples were good enough to illustrate the idea. For me, I have a handful of includes that are in most/a lot of my scripts. I'm not going to paste them here

[PHP] Copyright law, how to protect your investment, how to protect your work... Was - RE: [PHP-DB] Please point me in the right direction.......

2004-11-10 Thread Gryffyn, Trevor
I'm surprised I havn't seen this question come up before (might have just missed it) but it's an excellent question so forgive the crossposting as it's extremely relevant to coders and those purchasing services of coders. Anyone who's gotten married and hired a wedding photographer is probably

RE: [PHP] Help: Database Search

2004-11-15 Thread Gryffyn, Trevor
You can't do WHERE Industry = 1, 2, 3 unless that's something you can do in MySQL but not the other DB's I've used. What you CAN do is us IN: WHERE Industry IN (1, 2, 3) Or.. WHERE Industry IN ('1','2','3') IN basically does a Industry = 1 OR Industry = 2 OR Industry = 3 type thing. If

RE: [PHP] Hacking attempt

2004-11-15 Thread Gryffyn, Trevor
Sounds like someone replaced their INDEX.PHP with something else. Short answer: You can get the INDEX.PHP back if you restore it from a backup copy you should have. If you don't have a backup copy, then you can't get it back most likely (unless it's on a system that you can manage to undelete

RE: [PHP] XML Parser doesn't work when moved....

2004-11-15 Thread Gryffyn, Trevor
Using PHP 4.2.1 as a development platform to run on a 4.3.7 production box? How strange. Haha Assuming you have zero control over this (otherwise, UPGRADE or something :) then I'm not sure what to tell you. Here are some articles you may have seen already, but passing them on anyway: Parsing

RE: [PHP] Column Totals

2004-11-15 Thread Gryffyn, Trevor
Because you don't technically 'need' it, unless you're trying to reference the results by column name and you're using an aggregate like that. :) And in most systems, you don't need the AS just a space and a new name: SELECT SUM(Revenue) Revenue FROM Sales Where. But all depends on your

RE: [PHP] Database search logic question

2004-11-15 Thread Gryffyn, Trevor
Did you take the time to think about what you were going to do before starting your application? Honestly , no I did not. What I did start out with is a belief that there wouldn't be a need to know php. I was using a RAD, that was sold as all encompassing. Fool me once. Yeah, that's

RE: [PHP] mp3 parsing

2004-11-18 Thread Gryffyn, Trevor
Nice script.. Short and concise. Havn't tested it yet, but I like short and concise. :) One thing to note.. This appears to handle ID3v1 tags (which are stored at the beginning of the file). ID3v2 tags are stored at the end of the MP3 and are a little trickier to deal with but they can hold a

RE: [PHP] PHP-editor connected to FTP?

2004-11-18 Thread Gryffyn, Trevor
I use Crimson Editor which will save directly to an FTP location fairly easily. I'm not sure if they fixed this, but in earlier versions it wouldn't save a local backup copy and I ran into problems where it would fail to send via FTP, I'd have a zero byte file on the remote web server and would

RE: [PHP] PHP Supremacy...

2004-11-18 Thread Gryffyn, Trevor
Thanks for the link. Here's one relating to Yahoo's use of PHP: http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm Also, out of curiosity I recently did a search trying to find some numbers comparing ASP usage to PHP usage. Market dominance and penetration and such. I didn't look too

RE: Re[2]: [PHP] PHP Supremacy...

2004-11-18 Thread Gryffyn, Trevor
GT Roughly 1/3 of the web servers on the internet these days run IIS GT Roughly 2/3 run Apache in some fashion I know you said roughly, but it's less than 1/3 running IIS, quite a bit less infact. The latest Nov. 2004 Netstat survey puts it at well under a quarter (21.25% to be exact) with

RE: [PHP] getting the highest number in 3 db fields?

2004-11-19 Thread Gryffyn, Trevor
If we're trying to get the max value between 3 columns in a row like this: Prolog transmodal asian 1 2 3 We'd want to get the value 3 If you wanted to get the max out of three values in a row, you might do something like this: SELECT MAX(prolog, transmodal,

RE: [PHP] Timezones

2004-11-19 Thread Gryffyn, Trevor
Don't know if this helps, but this was a message regarding Windows based long timezone formats that was posted a little while ago by another user: --- Kim [EMAIL PROTECTED] Managed to find it It helps using just those right keywords after a million

RE: [PHP] HTML form online

2004-11-19 Thread Gryffyn, Trevor
Sure, get whatever data you need into variables and just do something like this: ? $firstname = Trevor; $lastname = Gryffyn; $company = Air Cargo Inc; ? html headtitle/title/head body form action=process.php method=POST First Name: input type=text name=firstname value=?$firstname?br Last

RE: [PHP] Timezones

2004-11-22 Thread Gryffyn, Trevor
, I should have noticed. Good luck! -TG -Original Message- From: Venelin Arnaudov [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:24 AM To: Gryffyn, Trevor Subject: Re: [PHP] Timezones Hi Trevor, I am using Eclipse with a PHP plugin to modify my PHP system

RE: [PHP] Is there a shorthand way to...?

2004-11-23 Thread Gryffyn, Trevor
I didn't see this in any of the responses, and truthfully it's not the best way or most secure.. .basically it has a lot of flaws that you should watch out for (probably creates security issues more than any other thing) but another option for mass setting variables that are possible set or not is

RE: [PHP] IE title bug

2004-11-23 Thread Gryffyn, Trevor
This is probably more of a straight HTML/JS/something question. Do you happen to be using any kind of javascript or vbscript in your source that does any kind of application.caption or window.title or anything like that? I've used Application.Caption in VBA within Excel to update the title of a

[PHP] [SPAM] RE: [PHP] [Off] - A way for PHP sites to get extreme Google rankings

2004-11-29 Thread Gryffyn, Trevor
Well, there is a 'briandunning.com' as #4 on Google searching for 'ebay motors'. Now the trick would be to get listed under awesome php scripts or something relevant to your site. If anyone sees it necessary to try this, try going to: http://www.digitalpoint.com/tools/ad-network/ Sorry Brian..

RE: [PHP] Date Manipulation

2004-12-01 Thread Gryffyn, Trevor
As was already mentioned, mktime() and strtotime() both return a serial date. I use mktime() a lot to add/subtract days and such. It automatically compensates for leap days and all that. Example: ?php $month = 1; $day = 31; $year = 2004; $serialdate = mktime(0,0,0,$month,$day + 1,$year);

RE: [PHP] Custom Open Tags

2004-12-01 Thread Gryffyn, Trevor
I think there's a way to redefine what tag PHP uses, but I think it globally resets it. I don't think you can say use !blah ! and also use ?php ?. I think that setting is in PHP.INI somewhere. It might be easier to change your to be executed later php tags to something else and before it's sent

RE: [PHP] Text Parser

2004-12-02 Thread Gryffyn, Trevor
?php $items = house , ball , door , roof , floor; $itemsexploded = Explode( , , $items); $itemsimploded = ' . implode(',',$itemsexploded) . '; ? That should do it. The only weird bit is adding the single quotes to the beginning and end of the final string. You could also do a

RE: [PHP] Re: Browsing while downloading?

2004-12-02 Thread Gryffyn, Trevor
Yeah, this isn't a PHP specific problem, BUT, in the off chance that PHP could solve the problem (using a different method of sending to the browser, etc) then it becomes PHP relevant... So everyone give the guy a break on the relevance issue. If there were two ways of doing something and you

RE: [PHP] Free for commercial use?

2004-12-02 Thread Gryffyn, Trevor
Taken from http://www.php.net/license/: Note: the following questions and answers only apply to version 2.01 and 2.02 of the PHP license. Ignore for version 3.0. Q. What does the PHP license mean then, in simple words? A. (Note: This answer should in no way be taken to replace the PHP

RE: [PHP] Days remaining? (years, months, days, hours, minutes, seconds..etc)

2004-12-02 Thread Gryffyn, Trevor
I don't know of a built-in function, but you're welcome to use my daydiff script below. It actually gives you year, month, day, hour, minute, second.. Not just days. But modify it as you desire. -TG ?php # Standard format dates and times $startdate = 04/12/04; $starttime = 13:05:01; $enddate

RE: [PHP] Page that checks if a user exists on a remote system

2004-12-02 Thread Gryffyn, Trevor
If it's a un*x system and you have permissions to connect to the SMTP server, you could use the VRFY command to check to see if their email address exists or not maybe: Example of Verifying a User Name Either S: VRFY Smith R: 250 Fred Smith

RE: [PHP] Page that checks if a user exists on a remote system

2004-12-02 Thread Gryffyn, Trevor
2004 23:32, Gryffyn, Trevor wrote: If it's a un*x system and you have permissions to connect to the SMTP server, you could use the VRFY command to check to see if their email address exists or not maybe: Just want to point out that this behaviour is dependent on the flavour

RE: [PHP] Date Manipulation

2004-12-02 Thread Gryffyn, Trevor
In addition to Matthew's response... Strtotime() and mktime() both return a serial date. That's the 1101945775 number you got. To get this back to a mmdd format that you seem to be trying to do with mktime(), you want to use date() as Matthew suggested. Again, I think examples help more

RE: [PHP] Re: Unable to open word document.

2004-09-07 Thread Gryffyn, Trevor
Another thing to keep in mind is that Office products can run invisible. Sometimes you'll get COM failures and can't understand why and it turns out that Word or Excel or whatever is still running, just not visible. Pull up your Task Manager and look for the process and kill it. The property in

RE: [PHP] [PHP-GEN] Check Boxes

2004-09-10 Thread Gryffyn, Trevor
You got it right, except you're going to have it blow up on you if someone doesn't select something Try these changes: $a1 = $_POST['ch1']; $a2 = $_POST['ch2']; $a3 = $_POST['ch3']; # Add this bit If (isset($_POST['ch1')) { $collist .= ,$a1; } If (isset($_POST['ch2')) { if ($collist == ) {

RE: [PHP] A follow up on my question about good coding practice [isset]

2004-09-10 Thread Gryffyn, Trevor
For reference: http://www.blueshoes.org/en/developer/php_cheat_sheet/ -Original Message- From: Al [mailto:[EMAIL PROTECTED] Sent: Sunday, June 06, 2004 7:47 PM To: [EMAIL PROTECTED] Subject: [PHP] A follow up on my question about good coding practice [isset] I could use one

RE: [PHP] Active windows

2004-09-10 Thread Gryffyn, Trevor
Check into the Javascript events onfocus and onblur (forgive my syntax). Focus is when a window becomes 'active' and Blur is when it becomes 'non active'. -TG -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 10:07 PM To: PHP

RE: [PHP] adding *** on email address upon view

2004-09-10 Thread Gryffyn, Trevor
One simple way to do it would be: List($username,$domain) = explode(@,$emailaddress); $newemailaddress = [EMAIL PROTECTED]; Maybe I just use list/explode too much. :) -TG -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 6:09 AM To:

RE: [PHP] Adding +7 more days on date() value problem

2004-09-10 Thread Gryffyn, Trevor
I disagree on the strtotime recommendations that everyone else gave. The mktime() function itself will compensate for leap years, day = 36 type stuff and all of that. ?php $curdate = date(Y-m-d); $plus7 = date(Y-m-d,mktime(0,0,0,date(m),date(d)+7,date(Y))); Echo Current Date: $curdatebr; Echo +7

RE: [PHP] Adding +7 more days on date() value problem

2004-09-10 Thread Gryffyn, Trevor
Because $now+(7*24*60*60) isn't very intuitive to a human. Why would you do it that way instead of: $days = 24*60*60; $now = time(); $plus7 = $now+(7*$days); echo 'Current Date: '.date('Y-m-d', $now); echo 'Date in 7 days: '.date('Y-m-d', $plus7); Maybe you think like a machine, but the way I

RE: [PHP] Adding +7 more days on date() value problem

2004-09-10 Thread Gryffyn, Trevor
, Trevor; [EMAIL PROTECTED] Cc: Louie Miranda Subject: RE: [PHP] Adding +7 more days on date() value problem So if this is run on the 30th of the month, you are saying this handles a month with day 37 correctly? Warren Vail -Original Message- From: Gryffyn, Trevor [mailto

RE: [PHP] Can I name a session variable using another variable?

2004-09-13 Thread Gryffyn, Trevor
Ok, assuming everything's working correctly except for the use of $prevtime in the SESSION, then here's one answer: Yes, you can name a session the way you described. If you're having trouble with doing the concatenation of values inside $_SESSION, then try combining them outside:

RE: [PHP] Clear HTTP POST value

2004-09-13 Thread Gryffyn, Trevor
I don't see why that wouldn't work. It's not in a conditional or something where the unset command isn't being executed? If that fails still, maybe try: $_POST[var] = ; -TG -Original Message- From: Nicklas Bondesson [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 5:36 AM

RE: [PHP] Communicate with Outlook

2004-09-13 Thread Gryffyn, Trevor
If you have an Outlook client running on the same machine as PHP, you should be able to use COM calls to access the data. Here's MS's Outlook Object Model site for Outlook Item Objects including MeetingItem: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000

RE: [PHP] convert degrees to heading

2004-09-13 Thread Gryffyn, Trevor
The cleanest looking multiple if scenario is to use a Switch statement. Unfortunately I don't believe PHP's switch will do varied conditions, only equality statements: $j = 5; switch ($j) { case 6: echo first; break; case 6: echo second; break; case 5: echo third;

RE: [PHP] Convert textarea post data from plain text to html using php..how?

2004-09-13 Thread Gryffyn, Trevor
Two options: 1. nl2br($posteddata) - This converts all the \r\n's to br's so that it comes out with the same carriage returns as the person who inputed it gave it 2. Use HTML pre tabs to do the same thing. I think that's the trickiest thing about using textarea to input then regurgitate the

RE: [PHP] convert degrees to heading

2004-09-13 Thread Gryffyn, Trevor
, September 13, 2004 3:26 PM To: Gryffyn, Trevor; php Cc: René Fournier Subject: Re: [PHP] convert degrees to heading I have to write a little function to convert a direction from degrees to a compass -type heading. 0 = West. 90 = North. E.g.: Something like this... it'll account for 360

RE: [PHP] convert degrees to heading

2004-09-14 Thread Gryffyn, Trevor
Message- From: Dave Restall - System Administrator,,, [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 4:14 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Gryffyn, Trevor Subject: Re: [PHP] convert degrees to heading Hi, Alternatively, try :- $Compass = array('West

RE: [PHP] Communicate with Outlook

2004-09-14 Thread Gryffyn, Trevor
Ok, so I was bored.. Attached below is a PHP script that will connect to Outlook via COM and go through all the items in the Calendar, displaying the appointment name, location, FROM and TO date/times (adjusting for the weird assed MS timestamp.. Apparently # of seconds since some time in 1970),

RE: [PHP] Convert textarea post data from plain text to html using php..how?

2004-09-14 Thread Gryffyn, Trevor
I stand corrected. Nl2br() is still useful when dealing with outputting data from textarea form elements... If you're outputting to a browser at least. But yes, it only inserts a br \ where there's a \n, it doesn't replace \n and doesn't do anything with \r's. -TG -Original Message-

RE: [PHP] Benchmarking a script

2004-09-14 Thread Gryffyn, Trevor
is extremely minimal. Does that clarify it a bit for you? -TG -Original Message- From: Cristian Lavaque [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 1:18 PM To: Gryffyn, Trevor Subject: Re: [PHP] Benchmarking a script Hello Trevor, I really appreciate your reply

RE: [PHP] OK ... WHY does this work ?????

2004-09-15 Thread Gryffyn, Trevor
Read over some of the examples at: http://us4.php.net/types.array If you don't set a key, PHP starts with '0' and increments as you add more elements to the array. If you have NOTICEs turned on, I believe you'll get a notice saying that $arrlevels[99] doesn't exist. It's not a fatal error, so

RE: [PHP] Image question

2004-09-15 Thread Gryffyn, Trevor
Jason Paschal posted this link a while ago, regarding storing and retriving images from MySQL: http://www.dailymedication.com/modules.php?name=Forumsfile=viewtopict= 15 -TG -Original Message- From: Ed Lazor [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 8:44 PM To:

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
Yeah, I get tons of them too. Ideally, someone should identify which user subscribed to the list is the culprit and remove their address. -TG -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 11:53 AM To: php-general Subject: [PHP]

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
It appears to be a user not found type error..'desintione non existente' looks a lot like destination doesn't exist. The guys that manage the PHP-General list need to be made aware so they can remove the offending email address. There's not a lot these iguana guys can do if a user no longer

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
Fair enough. -Original Message- From: Ron Guerin [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 3:04 PM To: Gryffyn, Trevor Cc: php-general; Dan Joseph Subject: Re: [PHP] iguanahost - anyone else being plagued? Gryffyn, Trevor wrote: It appears to be a user

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
I could have sworn that there was a function that dropped ALL GET values into an associative array. Kind of the inverse of http_build_query. At any rate, you can keep doing (isset($_REQUEST['mov']) AND isset($_REQUEST['year'])) and such. Is that your question? How do you do AND and OR

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 1:55 PM To: PHP Subject: Re: [PHP] checking multiple URL parameters On Thu, 16 Sep 2004 11:15:13 -0400, Gryffyn, Trevor [EMAIL PROTECTED] wrote: I could have sworn that there was a function that dropped ALL GET values

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
You're right though, $_GET and $_POST and such are already an associative array. I actually think I was thinking of a function that parsed a URL itself, regardless of whether it was submitted or not. I'm all kinds of mixed up today, so I apologize for being kind of scrambled in the brain. Is

RE: [PHP] MySQL query for average records per day

2004-09-16 Thread Gryffyn, Trevor
Select date1,count(date1) group by date1 where date1 '$today' That'll get you the count of how many records were done on each day (excluding today). I don't know what you're trying to average, but you can probably figure it out from there. -TG -Original Message- From: Jeff Oien

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
This makes absolutely no sense to me. What do you mean by submitted? How would a PHP script be executed at all if the browser never sends a request? Hah.. I should just let this all go, go home, get some sleep, and start confusing people again tomorrow, but I want to clarify a little bit.

RE: [PHP] checking multiple URL parameters

2004-09-16 Thread Gryffyn, Trevor
Ahh.. Andrew has read my confused mind. Yeah, that's what I was getting at. Solution Accepted or something. :) Ok, I'm going to go home now before I cause any more problems. -TG -Original Message- From: Andrew Kreps [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 4:31

RE: [PHP] Novice PHP Variable/Link Question

2004-09-17 Thread Gryffyn, Trevor
Alternately, you can do it the lazy way like me: a href=?=$url??=$url?/a ? Echo $url; ? Is the same as... ?=$url? I also think that's a little easier to read. But that's my preference in style. -TG -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] Sent: Thursday,

RE: [PHP] Re: A native Windows binding for PHP - released

2004-09-17 Thread Gryffyn, Trevor
On 09/16/2004 09:01 PM, Rubem Pechansky wrote: I have designed and successfully prototyped a native Windows binding for PHP. This binding is very lightweight and it is already capable of doing dialogs, controls, and a lot more with a few dozen lines of code. PHP can thus be used as a

RE: [PHP] Host for Mod PHP5

2004-09-17 Thread Gryffyn, Trevor
I use DixieSys.com. They seem to have fairly reasonable rates and good speed. They have a very personable support staff that you can reach via their IRC server, ICQ or through conventional email, trouble tickets, etc. They'd big and well equipped but still have a down home manner that I really

RE: [PHP] Re: A native Windows binding for PHP - released

2004-09-17 Thread Gryffyn, Trevor
. -TG -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 11:10 AM To: Gryffyn, Trevor Cc: PHP List Subject: Re: [PHP] Re: A native Windows binding for PHP - released Gryffyn, Trevor wrote: On 09/16/2004 09:01 PM, Rubem Pechansky

RE: [PHP] Highest Key in an Array

2004-09-17 Thread Gryffyn, Trevor
Or... $highestkey = max(array_keys($arr)); -Original Message- From: Martin Holm [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 11:11 AM To: Daniel Schierbeck Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Highest Key in an Array Daniel Schierbeck wrote: I've been

[PHP] Microsoft Support - RE: [PHP] Instal or config this package UnxUtils.zip under windows

2004-09-17 Thread Gryffyn, Trevor
First let me say that I'm a Microsoft product fan. Yeah, I do like their products. I like many *nix products and Mac products as well. Basically I'll use whatever's in front of me, but I prefer Microsoft products in a lot of cases, with all of it's flaws and whatnot. (as an avid Firefox

  1   2   >