Re: [PHP] Phone number validation

2002-04-08 Thread Jim Lucas [php]
try this preg_match(/[a-zA-Z]+/i, $str); and if you want to go the other route. do this preg_match(/[^0-9\(\)\-\.\ ]+/i, $str); this will return true if it is anything other then what is listed. numbers 0-9 ( ) - . Jim Lucas - Original Message - From: Gary [EMAIL PROTECTED] To:

Re: [PHP] counter for HIGH traffic site

2002-04-08 Thread Jim Lucas [php]
as long as you are only inserting information into the mysql db on each page load, then you shouldn't have a problem. make sure you keep you indecies down to a minimum. Jim Lucas - Original Message - From: Craig Westerman [EMAIL PROTECTED] To: php-general-list [EMAIL PROTECTED] Sent:

Re: [PHP] Array Question

2002-03-26 Thread Jim Lucas [php]
I can make this just a little easier.. try this $query = SELECT * FROM mytable WHERE t_state_id_state in (' .join(', ', $state). '); if $state happens to be the name of the array that is passed from the multi-select Jim Lucas www.bend.com - Original Message - From: Rick Emery [EMAIL

Re: [PHP] Array in a Loop Question

2002-03-26 Thread Jim Lucas [php]
I think to get the results you are wanting, you might try this. input type='text' name='address[]' value='' the address[] tells the form that this element is an array and when submitted, will be converted into an indexed array on the process page. so you take this new array on the process page

Re: [PHP] Still REG EX

2002-03-23 Thread Jim Lucas [php]
what are you trying to do? Jim Lucas www.bend.com - Original Message - From: John Fishworld [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 23, 2002 4:33 PM Subject: [PHP] Still REG EX I'm still playing about trying to validate an url www(dot)something(dot)something !

Re: [PHP] included files not reread by php when i edit the files

2002-03-22 Thread Jim Lucas [php]
how about giving an example of the error message(s)... - Original Message - From: Chris [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 22, 2002 12:59 PM Subject: [PHP] included files not reread by php when i edit the files While editing pages, for some reason (default

Re: [PHP] require() vs include()

2002-03-14 Thread Jim Lucas [php]
Plus, depending on how you are calling the file. Meaning if the file name that you are calling is a static file name or dynamic file name require() and require_once() will include a file before the php parser starts its job, but this will only happen if the name isn't dynamic. meaning that if

Re: [PHP] $HTTP_SESSION_VARS with unset()

2002-03-14 Thread Jim Lucas [php]
I must ask first, why don't you just use the session_destroy() function? it will kill all related sessions variables and reset the PHPSESSID (if that's you have it named) Jim Lucas www.bend.com - Original Message - From: SpamSucks86 [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

Re: [PHP] php array

2002-03-12 Thread Jim Lucas [php]
you could referance the element id of the form something like if(window.document.form.element[1].value = ) { do_something(); } not sure of the exact js construct, but you get my idea. Jim Lucas www.bend.com - Original Message - From: Rodrigo Peres [EMAIL PROTECTED] To: PHP

Re: [PHP] safe mode and file handling

2002-03-01 Thread Jim Lucas [php]
if you are on a unix system running with apache, you could modify the virtual host block and have apache run as your user name and then change the permissions of the docroot so you are the owner and group. Jim Lucas www.bend.com - Original Message - From: Mika Lindqvist [EMAIL PROTECTED]

Re: [PHP] header problem

2002-02-26 Thread Jim Lucas [php]
question, is this on a process page or on a page that renders text? Jim Lucas - Original Message - From: Michael P. Carel [EMAIL PROTECTED] To: george Pitcher [EMAIL PROTECTED] Cc: php [EMAIL PROTECTED] Sent: Monday, February 25, 2002 5:44 PM Subject: Re: [PHP] header problem Thank

Re: [PHP] format text

2002-02-26 Thread Jim Lucas [php]
try nl2br() it converts \n into br Jim - Original Message - From: eoghan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 2:23 AM Subject: [PHP] format text hello i am looking for a way of formatting my text when i select it from mysql, looking for a

Re: [PHP] Damned HTTP_HOST

2002-02-26 Thread Jim Lucas [php]
there is always a way. $IP = $GLOBALS['SERVER_ADDR']; $IP = $GLOBLAS['HTTP_HOST']; $IP = $GLOBALS[HTTP_SERVER_VARS][HTTP_HOST]; do a print_r() on $HTTP_SERVER_VARS and see what you get or use this function ? function list_array ($array) { foreach($array AS $key = $value) { echo

Re: [PHP] Damned HTTP_HOST

2002-02-26 Thread Jim Lucas [php]
I should mention that if you HTTP_HOST resolves to a DNS entry, that is what gets displayed in the HTTP_HOST Jim - Original Message - From: Dominique van der Wal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 6:38 AM Subject: [PHP] Damned HTTP_HOST Hi, I'm

Re: [PHP] pg_result pg_fetch_row pg_fetch_array

2002-02-18 Thread Jim Lucas [php]
http://php.blue-box.net/manual/en/function.pg-result.php http://php.blue-box.net/manual/en/function.pg-fetch-row.php http://php.blue-box.net/manual/en/function.pg-fetch-array.php This should tell you all you need to know. Jim Lucas - Original Message - From: * nea * [EMAIL PROTECTED]

Re: [PHP] browser reload button

2002-02-14 Thread Jim Lucas [php]
about the only way I could think of doing something like this, is to create a unique value for each link on a page and take on to the end of each link for each page. then do a select to find out if that unique value has been entered already. if you use an MD5 hashing method and combine that with

Re: [PHP] array variable name

2002-02-14 Thread Jim Lucas [php]
I think you are looking for the function called array_key() http://www.php.net/manual/en/function.array-keys.php Jim Lucas - Original Message - From: Tomek Golembiewski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 6:20 AM Subject: [PHP] array variable name

Re: [PHP] a user_auth script. 1 down any more ?

2002-02-12 Thread Jim Lucas [php]
Try closing all your { }. count them up, you are missing the closing bracket on your while statment.. Jim Lucas - Original Message - From: Matthew Darcy [EMAIL PROTECTED] To: hugh danaher [EMAIL PROTECTED]; php [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 10:25 AM Subject: RE:

Re: [PHP] a user_auth script. 1 down any more ?

2002-02-12 Thread Jim Lucas [php]
forgive me, I did count wrong, the problem happens to be that you are using an ELSE on the end of a while loop. :P Jim Lucas - Original Message - From: Matthew Darcy [EMAIL PROTECTED] To: Jim Lucas [php] [EMAIL PROTECTED]; hugh danaher [EMAIL PROTECTED]; php [EMAIL PROTECTED] Sent

Re: [PHP] Formatting a MYSQL time

2002-02-07 Thread Jim Lucas [php]
well, from what you show here you are trying to use a MYSQL timestamp format string in a UNIX Timestamp String. what you need to do is add add this to your select statement. SELECT UNIX_TIMESTAMP(replace with column name) From Table; you want to convert the MYSQL timestamp into a UNIX

Re: [PHP] Quote in input tag value?

2002-02-07 Thread Jim Lucas [php]
you might want to check your coding, but that is a parse error waiting to happen. Jim Lucas - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Nathan Cassano' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 1:54 PM Subject: RE: [PHP] Quote in input tag

Re: [PHP] Checking for plus signs?

2002-02-07 Thread Jim Lucas [php]
try this if(eregi(/\+/,$variable)) Jim Lucas - Original Message - From: Leif K-Brooks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 5:40 PM Subject: [PHP] Checking for plus signs? I'm trying if(eregi(+,$variable)){, but it gives me an error. What do I

Re: [PHP] date problems

2002-02-04 Thread Jim Lucas [php]
sounds like it might have something to do with leap year. Jim Lucas - Original Message - From: toni baker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 04, 2002 12:03 PM Subject: [PHP] date problems $date1 = 12/12/2001; $date1 = date(D M j Y, strtotime($date1));

Re: [PHP] php and sym links

2002-02-01 Thread Jim Lucas [php]
nope, should work. what, if any, error messages are you getting? Jim Lucas - Original Message - From: swade [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 01, 2002 12:20 PM Subject: [PHP] php and sym links hi, Is there something about php that would prevent me from

Re: [PHP] adding hidden form values to array

2002-02-01 Thread Jim Lucas [php]
if you name the checkbox fields with all the same names that look like this ( MyFormElement[] ) then it will act as an array. then on the next page. find out if the array count is greater then zero, if so, generate hidden elements with the value of the MyFormElement[] in a name/value manner.

Re: [PHP] Redirect problem.... UGH!!

2002-01-30 Thread Jim Lucas [php]
try puting an exit(); after the header(). ? header(location: someplace.html); exit(); ? Jim Lucas - Original Message - From: Ben Turner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 10:47 AM Subject: [PHP] Redirect problem UGH!! I am trying to put

Re: [PHP] MySQL Fetch_Array VS. Fetch_Object

2002-01-30 Thread Jim Lucas [php]
my question to you is, why do you want to put them into another variable? the $row[field_name]; is already a variable. why not just use that instead? Jim Lucas - Original Message - From: Bryan Gintz [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 10:48

Re: [PHP] MySQL Fetch_Array VS. Fetch_Object

2002-01-30 Thread Jim Lucas [php]
oh and mysql_fetch_object is a little slower then mysql_fetch_array() Jim Lucas - Original Message - From: Bryan Gintz [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 10:48 AM Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object Does anyone know what

Re: [PHP] Getting an include file into a string after PHP evaluates the vars?

2002-01-30 Thread Jim Lucas [php]
how you suggest the solution is what I use all the time. But I thought you wanted to work with is as a string. sorry for the confusion. Jim Lucas - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: 'Jim Lucas [php]' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January

Re: [PHP] Getting an include file into a string after PHP evaluates the vars?

2002-01-29 Thread Jim Lucas [php]
yes, there is a way out, you can use readfile(). capture the output using ob_*() functions and then parse/eval that string listed here are the functions you'll need. http://www.php.net/manual/en/function.readfile.php http://www.php.net/manual/en/function.ob-start.php

Re: [PHP] PHP Mysql

2002-01-29 Thread Jim Lucas [php]
you must make sure that the version of PHP that is being used was built with mysql support and/or that the drivers are being loaded for mysql. Jim Lucas - Original Message - From: Uma Shankari T. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 6:24 PM Subject:

Re: [PHP] mixed datatype

2002-01-28 Thread Jim Lucas [php]
? function MyFunc($item, $args=) { extract((isset($args)?$args:array())); return($item, $first_arg$second_arg$third_arg); } //call MyFunc() echo MyFunc(hi there, array( first_arg = my name ,

Re: [PHP] Multiple INI Files

2002-01-28 Thread Jim Lucas [php]
what OS are you running them on? if it is linux with apache, you can override most of the php.ini settings in the httpd.conf file http://www.php.net/manual/en/configuration.php#AEN2200 this will show you how to override. it doesn't show it here, but this will also work in the virtual host

[PHP] Question about 4.0.6-7 Mysql 4.0.1 and Redhat 7.2

2002-01-23 Thread Jim Lucas [php]
would be great. Jim Lucas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] ftp functions

2002-01-21 Thread Jim Lucas [php]
one problem, the ftp functions that you are trying to use are on the server. therefor you are trying to connect one server to another server. you are not connecting from your workstation to the remote server. for what you are attempting to do, ftp will not work. Jim Lucas - Original

Re: [PHP] ftp functions

2002-01-21 Thread Jim Lucas [php]
the copy() function is subject to the same problem that the ftp functions are. you are trying to call a function that is on the remote server and you want it to do things to the local machine. unfortunatly you cannot do this. through a web browser you have no direct access to the local client

Re: [PHP] foreach array into mail isnĀ“t working

2002-01-21 Thread Jim Lucas [php]
Try this: ? $maildb = file(mailaddr.txt); foreach ($maildb as $address) { mail($address, This is the subject., This is the message, From: \Jose Pablo\ [EMAIL PROTECTED] \nTo: \To Name\ $address); } ? Jim Lucas bend.com - Original Message - From: DL Neil [EMAIL PROTECTED] To: Josepablo

Re: [PHP] function trouble: pass by referrence

2002-01-21 Thread Jim Lucas [php]
where ever you are going to referance $HTTP_POST_VARS use $GLOBALS[HTTP_POST_VARS] and then use that inside your function. function myFunc() { foreach($GLOBALS[HTTP_POST_VARS] AS $k = $i) { $GLOBALS[HTTP_POST_VARS][$k] = stripslashes($i); $GLOBALS[HTTP_POST_VARS][$k] =

Re: [PHP] 2d array help

2002-01-21 Thread Jim Lucas [php]
$result = mysql_query( SELECT pkgid FROM plans); while($row = mysql_fetch_assoc($result)) { $package = mysql_fetch_assoc(mysql_query( SELECT * FROM plans WHERE pkgid='$row[pkgid]')); } obviously this will have $package = array(key = value, ...); are you wanting to have the above be

Re: [PHP] Uploads

2002-01-21 Thread Jim Lucas [php]
make sure you increase your script timeout limit. Jim Lucas - Original Message - From: Ronald Tezuka [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 21, 2002 2:50 PM Subject: [PHP] Uploads If anyone can help me out, that'd be greatly appreciated. I'm trying to create an

Re: [PHP] smarter code (mySQL arrays)

2002-01-21 Thread Jim Lucas [php]
function Build_Array($mysql_result_pointer) { if(mysql_num_rows($mysql_result_pointer)) { $res[] = mysql_field_name($mysql_result_pointer); while($row = mysql_fetch_array($mysql_result_pointer)) { $res[] = row; } } return($res); } Jim

Re: [PHP] Regular Expression

2002-01-03 Thread Jim Lucas [php]
I have seen this question reposted for the past week. now why don't you just work with the entire thing. get the body ... now once you have that, do this $str = preg_replace(body, , $str) $str = preg_replace(, , $str) now your $str var will only have the properties. Jim - Original

Re: [PHP] easy quickie..

2002-01-03 Thread Jim Lucas [php]
$GLOBALS['HTTP_REFERER'] Jim - Original Message - From: Kelly Meeks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 02, 2002 10:15 AM Subject: [PHP] easy quickie.. Happy New Year, Does php set a variable that tells you the url of the page that a user has just come

Re: [PHP] Select box won't display in Netscape 4.xx

2001-12-31 Thread Jim Lucas [php]
check and make sure the you have the correct opening and closing form tags. NS 4.x will choke if you don't have an opening and closing tag. While IE 5, 5.5 and 6 will work fine. Jim - Original Message - From: Edwin Boersma [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December

Re: [PHP] Sessions Problems!

2001-12-31 Thread Jim Lucas [php]
when you say that nothing changed, does that include permissions on the tmp session directory, the httpd.conf file or any related configurations? Jim - Original Message - From: Phillip M.(Mike) Bishop [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 31, 2001 2:58 AM

Re: [PHP] File upload memory useage.

2001-12-29 Thread Jim Lucas [php]
Well, I just finished a ftp program that originally used php to catch the uploaded file, but soon realized the it did load it into memory then dump it into a file. I finally ended up using perl running with xinetd to capture the uploaded file and drop it into a file. then let php play with it

Re: [PHP] is_uploaded_file

2001-12-28 Thread Jim Lucas [php]
take a look at this little function.. :) you might like it http://www.php.net/manual/en/function.function-exists.php - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Paul Roberts [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, December 28, 2001 7:35 AM Subject: Re:

Re: [PHP] Translating email to (real) plain text...

2001-12-27 Thread Jim Lucas [php]
I was just reading the other day the php has imap function that give you the ability to get only the body of the message. have your cron job get that and then strip HTML tags on that. Don't see why that wouldn't work. http://www.php.net/manual/en/function.imap-body.php Jim - Original

Re: [PHP] Translating email to (real) plain text...

2001-12-27 Thread Jim Lucas [php]
and this http://www.php.net/manual/en/function.imap-fetchstructure.php - Original Message - From: David Bouw [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, December 27, 2001 11:44 AM Subject: [PHP] Translating email to (real) plain text... Hi there, I

Re: [PHP] Exec as user

2001-12-27 Thread Jim Lucas [php]
I don't believe that the system variables are available to php. I work on *nix mostly, but I have a windows machine at home running php and I can't access any of my system var's. - Original Message - From: charlesk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 27,

Re: [PHP] mysql_escape_string

2001-12-26 Thread Jim Lucas [php]
where is the escaping happening first off? - Original Message - From: phantom [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 26, 2001 2:02 PM Subject: [PHP] mysql_escape_string How do I remove the slashes from mysql_escape_string when I pull the string back

Re: [PHP] Warning: Cannot send session cookie

2001-12-26 Thread Jim Lucas [php]
take the closing php tag from the end of the first line plus the openning tag from the begining of the second line. that is sending a line feed to the browser. Jim - Original Message - From: David Jackson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 26, 2001 5:54 PM

Re: [PHP] Reading semi formatted text file

2001-12-24 Thread Jim Lucas [php]
$delimiter = \t; $file = path/to/file/name.ext; if($file = fopen($file, r)) { $file_array = file($file); foreach($file_array AS $str) { $new_array[] = explode($delimiter, $file_array); } } now when you are done you will have an indexed array called new_array that

Re: [PHP] Changing From Info in eMail!

2001-12-24 Thread Jim Lucas [php]
what does the $from var look like? - Original Message - From: Thomas Edison Jr. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 24, 2001 10:35 AM Subject: [PHP] Changing From Info in eMail! Hi, I'm using the mail() function to send email. However, when the reciever

Re: [PHP] faxing in PHP

2001-12-24 Thread Jim Lucas [php]
hylafax I am working on a project right now to set this up on a linux box. Should work great. Jim - Original Message - From: LDL Enterprise [EMAIL PROTECTED] To: *PHP-General mail list [EMAIL PROTECTED] Sent: Monday, December 24, 2001 12:15 PM Subject: [PHP] faxing in PHP Hi, Is