[PHP] Regex for Advanced search feature

2007-10-19 Thread Kevin Murphy
e it back with a space. However, I suck at regular 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 77

Re: [PHP] count vs mysql_num_rows

2007-10-08 Thread Kevin Murphy
I don't 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

[PHP] count vs mysql_num_rows

2007-10-08 Thread Kevin Murphy
results); $count = $row["count"]; 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: Informati

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

2007-10-02 Thread Kevin Murphy
here, just 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 ha

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 we

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

2007-10-01 Thread Kevin Murphy
t echo out "yes"? I know I am doing something 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.

[PHP] Secure Image Storage

2007-10-01 Thread Kevin Murphy
make sure. 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.e

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

2007-09-24 Thread Kevin Murphy
ent; filename=\"$file\""); header("Pragma: no-cache"); $file = file_get_contents($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

[PHP] Strategy for Secure File Storage

2007-09-24 Thread Kevin Murphy
but the CMS does). 4) Some various forms 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 We

[PHP] PHPSESSID in links

2007-09-17 Thread Kevin Murphy
, 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 and Marketing Services Western Nevada College www.wnc.edu 775-445-3326 P.S. Please note that my e-m

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 to

Re: [PHP] manual vs. meta refresh

2007-08-13 Thread Kevin Murphy
t page, it logs you out. So 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 an

[PHP] Date Problem with \n

2007-08-13 Thread Kevin Murphy
Y"); I get the number 8 (current month) where the n 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.

[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
;); fwrite($fh, "Data Goes Here"); fclose($fh); $new_last_modified = filemtime($csv_file); -- 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

[PHP] Checking Phone Numbers

2007-06-14 Thread Kevin Murphy
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] Include file questions

2007-05-23 Thread Kevin Murphy
files, etc). -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On May 23, 2007, at 1:48 PM, Stephen wrote: 1) Does the filename extension matter? I prefer *.inc? It seems to work fine, but I only see others using *.php

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 Neva

Re: [PHP] Banner rotation with links

2007-02-15 Thread Kevin Murphy
work just 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 includ

[PHP] To many connections error message

2007-01-23 Thread Kevin Murphy
on't have error 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 West

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

Re: [PHP] dynamic lists

2007-01-17 Thread Kevin Murphy
s using onclick or submitting the form. -- 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 sorti

[PHP] Sort Array not working

2007-01-09 Thread Kevin Murphy
tried putting the sort in between the first 4 steps and that doesn't work either. 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] Count empty array

2006-12-21 Thread Kevin Murphy
quot;,",$data); $count = count($array); $count will = 2 Why doesn't the first 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 Murph

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

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. *But

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

2006-11-30 Thread Kevin Murphy
I decare those items as variables. They have to be inside the preg_replace as written. 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:

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] Preg_match - Find URL and convert to lower case

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

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

[PHP] Remove Spaces from Middle of String

2006-10-03 Thread Kevin Murphy
while(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] Mail Problem

2006-09-26 Thread Kevin Murphy
)@[a-zA-Z0-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 sendin

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&

Re: [PHP] Reverse of date("w")

2006-09-18 Thread Kevin Murphy
ot;); Would return "Wed". Is there any function 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 lookin

[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? -- Kevi

[PHP] Filter MS Word Garbage

2006-09-12 Thread Kevin Murphy
ow 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

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: In

Re: [PHP] Format of Encrypted Password

2006-09-07 Thread Kevin Murphy
g it all in PHP? -- 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

Re: [PHP] Format of Encrypted Password

2006-09-05 Thread Kevin Murphy
ve never seen that password('$auth_pw') part before. 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.wnc

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'

[PHP] Format of Encrypted Password

2006-09-05 Thread Kevin Murphy
bers in them (rather than 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 Com

[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: 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-445-3326 On Aug 21, 2006, at 12:50 PM,

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

2006-08-09 Thread Kevin Murphy
like this: $array = 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
0.php"); // 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"); -

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

2006-05-23 Thread Kevin Murphy
in the date() fuction to make it work: $date = 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

Re: [PHP] Handling Large Check Box Data

2006-05-17 Thread Kevin Murphy
$poster_A .= ":"; } $i++; } $seats = ("{$poster_A}{$poster_B} etc"); $query = "UPDATE seating_chart SET seats = '$seats' WHERE season = '

[PHP] Query for two fields with the same name

2006-04-19 Thread Kevin Murphy
led ID but they have different 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] 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: Informati

[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. -- Kevi

Re: [PHP] $i vs. $r

2006-03-27 Thread Kevin Murphy
t;= "$website_total") AND (is_int(($r+1)/3))) { echo (" "); } elseif (is_int(($r)/3)) echo ("\n"); $r++; } echo (""); -- Kevin Murphy Webmaster - Information and Marketing Se

[PHP] $i vs. $r

2006-03-27 Thread Kevin Murphy
h_array($result)) { 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

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 wa

[PHP] MySQL NOT IN Query not working

2006-03-16 Thread Kevin Murphy
(the main list 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 Webmaste

Re: [PHP] Re: Incremental Date Based ID

2006-03-08 Thread Kevin Murphy
d = $post_date; $new_id .= "a"; } So, it calls 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

Re: [PHP] Re: Incremental Date Based ID

2006-03-08 Thread Kevin Murphy
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-07 Thread Kevin Murphy
just 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 l

[PHP] Incremental Date Based ID

2006-03-07 Thread Kevin Murphy
"c" because "b" got 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.ph

Re: [PHP] mkdir after mkdir

2004-06-06 Thread Kevin Murphy
DIR Exists 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

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