[PHP] Regex for Advanced search feature

2007-10-19 Thread Kevin Murphy
expressions and can't figure it out. Anyone have a way for me to accomplish this with a regular expression or with another method? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website address have

[PHP] count vs mysql_num_rows

2007-10-08 Thread Kevin Murphy
]; return $count; OR $query = SELECT id FROM wncci_intranet.iAdmin_users WHERE name = '$name' LIMIT 1; $results = mysql_query($query); $count = mysql_num_rows($results); return $count; Thanks. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775

Re: [PHP] count vs mysql_num_rows

2007-10-08 Thread Kevin Murphy
need to know how many times something exists, just if it does. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326

Re: [PHP] Re: strpos error (I'm missing something obvious)

2007-10-02 Thread Kevin Murphy
internal employees some of whom are more computer savvy than others. Thanks all for your help. It seems to be working now. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website address have changed

[PHP] Secure Image Storage

2007-10-01 Thread Kevin Murphy
. This will return the binary source of the file: print file_get_contents($file_path); but doesn't display the image. Is there any way to have this (or something else) generate the image? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S

[PHP] strpos error (I'm missing something obvious)

2007-10-01 Thread Kevin Murphy
stupid here, but it doesn't seem to work :-) -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website address have changed from wncc.edu to wnc.edu.

Re: [PHP] strpos error (I'm missing something obvious)

2007-10-01 Thread Kevin Murphy
I fixed this by changing === TRUE to !== FALSE, so I think I am good to go now. But would still like to know why TRUE doesn't work. Thanks. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website

[PHP] Strategy for Secure File Storage

2007-09-24 Thread Kevin Murphy
of link obfuscation, where the CMS goes through all the secure files once an hour or so and rewrites the file name with a random string. 5) Or I'm open to suggestions. Thanks. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S

Re: [PHP] Re: Strategy for Secure File Storage

2007-09-24 Thread Kevin Murphy
($file_path); echo ($file); The problem is IE7. All browsers work with this code as is but IE says Internet Explorer cannot download test.pdf from XXX Any suggestions? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please

[PHP] PHPSESSID in links

2007-09-17 Thread Kevin Murphy
/a which is what I want. Obviously I could do something where if it detects the PHPSESSID in the URL, it forces the page to reload, but I was thinking that there would be another way to do this without adding another page load into the mix. Is there? -- Kevin Murphy Webmaster: Information

Re: [PHP] IE Not Following Header(Location: /path/to/file.php);

2007-09-06 Thread Kevin Murphy
Also, turn on error reporting and see if an error is being generated before the header is sent. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website address have changed from wncc.edu

[PHP] Date Problem with \n

2007-08-13 Thread Kevin Murphy
is supposed to be. Is there any way to get an n in there? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website address have changed from wncc.edu to wnc.edu.

Re: [PHP] manual vs. meta refresh

2007-08-13 Thread Kevin Murphy
if the background or foreground window now refreshes and gets sent to that page. Thanks everyone for their help on this. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-mail and website address have changed

[PHP] manual vs. meta refresh

2007-08-10 Thread Kevin Murphy
I doubt this, but is there any way to determine via PHP if a browser was refreshed automatically via a META tag vs the person clicking the refresh button? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e

[PHP] Problem with filemtime

2007-07-31 Thread Kevin Murphy
); $new_last_modified = filemtime($csv_file); -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326

[PHP] Checking Phone Numbers

2007-06-14 Thread Kevin Murphy
. Is there a simple way to test for this? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College www.wnc.edu 775-445-3326

Re: [PHP] Checking Phone Numbers

2007-06-14 Thread Kevin Murphy
Well, in my context where this is an application to apply to a community college, I think I can safely exclude non-us phone numbers. :-) The code that Robert supplied seems to work just great. Thanks. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada College

Re: [PHP] format date field

2007-05-23 Thread Kevin Murphy
Leave the date as is, its a MySQL thing. To format it on your page, use the date function: $formattedDate = date(m-d-Y,strtotime($row[open])); http://us2.php.net/manual/en/function.date.php -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College

Re: [PHP] Banner rotation with links

2007-02-15 Thread Kevin Murphy
fine. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Feb 14, 2007, at 8:29 AM, Chris Carter wrote: How can I rotate a banner as well as the link in it within a page using PHP. This can be done as a include file php

[PHP] To many connections error message

2007-01-23 Thread Kevin Murphy
reporting turned on, why am I getting an error message that includes the complete path to my connect script something I would like to not be telling the general public? Is there a way to suppress that? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community

Re: [PHP] dynamic lists

2007-01-17 Thread Kevin Murphy
or submitting the form. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326

Re: [PHP] dynamic lists

2007-01-17 Thread Kevin Murphy
On Jan 17, 2007, at 2:20 PM, Jochem Maas wrote: Kevin Murphy wrote: On Jan 17, 2007, at 1:39 PM, Brad Fuller wrote: -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 4:05 PM To: Don; php-general@lists.php.net Subject: RE: [PHP

[PHP] Sort Array not working

2007-01-09 Thread Kevin Murphy
. Obviously I'm doing something wrong here. I'm using PHP 4.3.4. Any suggestions? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326

[PHP] Re: SOLVED: [PHP] Sort Array not working

2007-01-09 Thread Kevin Murphy
Once you see it in email, sometimes the obvious jumps out at you. Fixed this on my own. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Jan 9, 2007, at 10:41 AM, Kevin Murphy wrote: I'm having trouble sorting

[PHP] Count empty array

2006-12-21 Thread Kevin Murphy
one give me an answer of 0 instead of 1. I know I could do a IF $data == [empty] and then not count if its empty and just set it to 0, but am wondering if there was a better way. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775

Re: [PHP] Re: Preg_match - Find URL and convert to lower case

2006-12-01 Thread Kevin Murphy
On Nov 30, 2006, at 7:50 PM, Jonesy wrote: On Thu, 30 Nov 2006 14:16:16 -0800, Kevin Murphy wrote: I have some text that comes out of a database all in uppercase (old IBM Mainframe that only supports uppercase characters). I see via other followups that you have your kludge working

Re: [PHP] Preg_match - Find URL and convert to lower case

2006-12-01 Thread Kevin Murphy
On Dec 1, 2006, at 1:56 PM, Richard Lynch wrote: On Thu, November 30, 2006 5:04 pm, Kevin Murphy wrote: Well the problem would be then that the entire string would be lower case, and I only can have the link as lower case. Is there a way to apply strtolower into the preg_match? Why not use

[PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
to all lowercase by doing something like this? Or is there a better way? $pattern = /WWW.(.*?) /i; $replace = a href=\http://www.\\1\;http://www.\\1/a; $section_notes = preg_replace($pattern,$replace,$section_notes); -- Kevin Murphy Webmaster: Information and Marketing

Re: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
Well the problem would be then that the entire string would be lower case, and I only can have the link as lower case. Is there a way to apply strtolower into the preg_match? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445

[PHP] Re: SOLVED: [PHP] Preg_match - Find URL and convert to lower case

2006-11-30 Thread Kevin Murphy
. But, it works now. Thanks for the help. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Nov 30, 2006, at 3:04 PM, Kevin Murphy wrote: Well the problem would be then that the entire string would be lower case, and I

[PHP] Remove Spaces from Middle of String

2006-10-03 Thread Kevin Murphy
(preg_match('/ /',$data)) { $data = str_replace( , ,$data);} Is there a better way to accomplish this same task? (PHP 4.x). Thanks. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326

Re: [PHP] Remove Spaces from Middle of String

2006-10-03 Thread Kevin Murphy
Works perfect! Thanks. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Oct 3, 2006, at 3:30 PM, Robert Cummings wrote: On Tue, 2006-10-03 at 15:17 -0500, Richard Lynch wrote: On Tue, October 3, 2006 1:47 pm, Richard

Re: [PHP] Mail Problem

2006-09-26 Thread Kevin Murphy
-9-]+\.[a-zA-Z0-9.-]+$/si, $data)) { $email_error = yes; } -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Sep 26, 2006, at 9:09 AM, [EMAIL PROTECTED] wrote: I have an issue with sending email via PHP which may

Re: [PHP] Reverse of date(w)

2006-09-19 Thread Kevin Murphy
Kevin Murphy wrote: Not really. If it were always today that would work, but in this case, I was thinking of storing a day of the week in a database (3), and then display the info based on that digit. So assuming that the number was in fact 3, then: echo date(D,3); Would return Wed

[PHP] Reverse of date(w)

2006-09-18 Thread Kevin Murphy
I'm looking for something that will convert a the opposite of the date (w) function. In other words, if I have the number 3, I would like it to return Wednesday. Is there such a beast out there besides writing a switch or array or something? -- Kevin Murphy Webmaster: Information

Re: [PHP] Reverse of date(w)

2006-09-18 Thread Kevin Murphy
like that? Oh, and it has to run on PHP 4. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Sep 18, 2006, at 3:18 PM, Jay Blanchard wrote: [snip] I'm looking for something that will convert a the opposite of the date (w

[PHP] Filter MS Word Garbage

2006-09-12 Thread Kevin Murphy
it into BBEdit and use the convert to ASCII command that solves the problem. Is there some way I can filter/convert this information before it gets to the mysql database? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326

Re: [PHP] if statement with or comparison (newbie)

2006-09-08 Thread Kevin Murphy
Shouldn't that be this instead: if (($_REQUEST['id'] != black) OR ($_REQUEST['id'] != white)) { echo wrong color; } else { echo right color; } -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu

Re: [PHP] Format of Encrypted Password

2006-09-07 Thread Kevin Murphy
? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Sep 7, 2006, at 12:50 PM, Eric Butera wrote: On 9/5/06, Kevin Murphy [EMAIL PROTECTED] wrote: $query = select name from table where name = '$authuser' and password

[PHP] Format of Encrypted Password

2006-09-05 Thread Kevin Murphy
letters) and don't appear to have any punctuation (although it could be just the few I am looking at that don't). Is there any way to tell how these passwords were encrypted? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445

Re: [PHP] Format of Encrypted Password

2006-09-05 Thread Kevin Murphy
On Sep 5, 2006, at 4:14 PM, Robert Cummings wrote: On Tue, 2006-09-05 at 15:27 -0700, Kevin Murphy wrote: I've inherited this website and there is an application that is running on it that has a bunch of passwords stored in a mysql table. The problem is, the previous webmaster didn't leave me

Re: [PHP] Format of Encrypted Password

2006-09-05 Thread Kevin Murphy
. Is that a mysql part that I am not familiar with and that I should know? I've been known to miss obvious stuff before. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Sep 5, 2006, at 4:25 PM, Chris W. Parker wrote

[PHP] Re: [css-d] Where CSS, XHTML and Javascript meet

2006-08-21 Thread Kevin Murphy
Don't forget that you can also do the CSS inline: body style=background: url(/images/$random_image) And then also in the CSS file have all the other declarations for the body tag. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775

Re: [PHP] Dividing, and keeping, text from the first space

2006-08-09 Thread Kevin Murphy
= explode( ,$string); $first_word = $array[0]; $rest_words = substr_replace($string,,0,strlen($first_word)); -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326

[PHP] Multiple Includes vs. One Long Include (Functions)

2006-08-08 Thread Kevin Murphy
); // one long page, but only called once. vs. require (function1.php);// multiple short pages with multiple calls. require (function2.php); require (function4.php); require (function6.php); require (function8.php); -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada

[PHP] Formatting of a.m. and p.m.

2006-05-23 Thread Kevin Murphy
= date(a); if ($date == am) { echo a.m. } elseif ($date == pm) { echo p.m. } -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Kevin Murphy
seats = '$seats' WHERE season = '2006'; -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On May 17, 2006, at 11:21 AM, Rahul S. Johari wrote: Ave, I’m a little confused

[PHP] Query for two fields with the same name

2006-04-19 Thread Kevin Murphy
information in them. $row['id'] gets me the one from the table called pr but I need to call the ID from the table connection. -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 -- PHP General Mailing List (http://www.php.net

[PHP] Join - Two Columns with the same name

2006-04-13 Thread Kevin Murphy
This is probably basic, but I can't seem to find the answer. Is there a way to specify in a join a specific column when the two tables have columns with the same name? Something like: $row['table1.id'] vs $row['table2.id'] -- Kevin Murphy Webmaster: Information and Marketing Services

[PHP] File Types for Upload

2006-03-31 Thread Kevin Murphy
For an expression such as this. $HTTP_POST_FILES['userfile']['type']==image/gif I'm looking for an up to date list of all the other media formats (non-images), such as Video and Audio. Does anyone have a list handy they could direct me to. -- Kevin Murphy Webmaster: Information

[PHP] $i vs. $r

2006-03-27 Thread Kevin Murphy
)) { echo (Blah blah blah); $r++; } I don't use $i anywhere else on the page. -- Kevin Murphy Webmaster - Information and Marketing Services Western Nevada Community College www.wncc.edu (775) 445-3326 -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] $i vs. $r

2006-03-27 Thread Kevin Murphy
) AND (is_int(($r+1)/3))) { echo (tdnbsp;/td/tr); } elseif (is_int(($r)/3)) echo (\n/tr); $r++; } echo (/table); -- Kevin Murphy Webmaster - Information and Marketing Services Western Nevada Community

[PHP] MySQL NOT IN Query not working

2006-03-16 Thread Kevin Murphy
of everyone) and dir_title2 (supplemental). If someone is in dir_title2 then the sup_id is the same as their dp_id. What I am trying to do is get a list of every person in dir_all that is NOT in dir_title2. Any thoughts as to what am doing wrong? -- Kevin Murphy Webmaster - Information

Re: [PHP] MySQL NOT IN Query not working

2006-03-16 Thread Kevin Murphy
Yup. Thats the problem. I'm running 4.0.21. Thanks. -- Kevin Murphy Webmaster - Information and Marketing Services Western Nevada Community College www.wncc.edu (775) 445-3326 On Mar 16, 2006, at 4:48 PM, Miles Thompson wrote: At 08:41 PM 3/16/2006, Kevin Murphy wrote: Anyone want

Re: [PHP] Re: Incremental Date Based ID

2006-03-08 Thread Kevin Murphy
for future reference. On Mar 8, 2006, at 12:00 AM, Paul Novitski wrote: At 05:05 PM 3/7/2006, Kevin Murphy wrote: Well, part of the issue is that I want to be able to use this as part of the link: /news.php?article=2006-03-05a /news.php?article=2006-03-05b With respect, I too think you should

Re: [PHP] Re: Incremental Date Based ID

2006-03-08 Thread Kevin Murphy
the database, gets the last rows with this date as part of the id (2006-05-08d), strips out the date part, adds one to the letter and outputs back the next ID (2006-05-08e). On Mar 8, 2006, at 8:39 AM, Kevin Murphy wrote: Thanks for the info, but I think you are misunderstanding what I am

[PHP] Incremental Date Based ID

2006-03-07 Thread Kevin Murphy
deleted. So, is there any way of generating this style ID number automatically? -- Kevin Murphy Webmaster - Information and Marketing Services Western Nevada Community College www.wncc.edu (775) 445-3326 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Re: Incremental Date Based ID

2006-03-07 Thread Kevin Murphy
the Unix timestamp. On Mar 7, 2006, at 4:56 PM, Al wrote: Kevin Murphy wrote: I'm trying to set up an ID field that works like this for news articles that are posted to a website. 2006-03-05a 2006-03-05b I know how to generate the date, and I am pretty sure I can generate the letter code

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Kevin Murphy
If Not, Create one, if yes, go on Etc. -- Kevin Murphy Web Designer - Stubborn Donkey Productions www.stubborndonkey.com On Jun 6, 2004, at 11:08 AM, Gerben wrote: Unfortunately my server has no ftp (but SSH). It makes much sence what you said, but how can PHP (with uid

Re: [PHP] Newbie error with cookies and headers already declared

2004-05-21 Thread Kevin Murphy
I'm a newbie to PHP too, but I think its the HTML tag. Move it down below the PHP and see what happens. -- Kevin Murphy Web Designer - Stubborn Donkey Productions www.stubborndonkey.com On May 21, 2004, at 1:28 PM, GodFoca wrote: I'm getting this error: Warning: Cannot add header