Re: [PHP] echo vs. print() performance?

2001-12-14 Thread Jim Lucas
that my site uses. I will try an get that data together by the first of next week. it will show microsecond time lines of include(), requires(), print() echo, ?=?, and other related functions. Lets me know what you would like to see. Jim Lucas - Original Message - From: Jack Dempsey

[PHP] Re: [PHP-DB] while...if statements???

2001-12-18 Thread Jim Lucas
I would do a mysql_num_row(); on your results to see if it returning anything at all. Jim - Original Message - From: Jay Fitzgerald [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 12:08 PM Subject: [PHP-DB] while...if

Re: [PHP] Error while calling a function

2001-12-18 Thread Jim Lucas
Try putting a closing ? php tag just before the final HTML. Jim - Original Message - From: J.F.Kishor [EMAIL PROTECTED] To: PHP Mailing List [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 5:26 AM Subject: [PHP] Error while calling a function hi all, I have got a problem, when I

Re: [PHP] OPEN_BASEDIR from user point of view (instead server admin)

2001-12-18 Thread Jim Lucas
php will return you four $vars to work with. check this out. http://www.php.net/manual/en/features.file-upload.php then work with the tmp file and get done with it what needs to be done before the script closes cause php will delete the file when the script is done. jim - Original Message

Re: [PHP] PHP4 on Windows98 with PWS4

2001-12-18 Thread Jim Lucas
make sure you copy all the correct dll's into the c:\windows\system or system32 directory. the dll's have to be in a location that is included in the window PATH in the autoexec.bat Jim - Original Message - From: Alex Shi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December

Re: [PHP] JavaScript php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Jim Lucas
actually Martin, that is what Martin was doing. href=javascript:function_name() calls to a js function. my suggestion would be to write it this way. a href=#no_hash onClick=YourFunction(xx)text/a that way, if the client clicks the link/button before the page is done downloading the page. it

Re: [PHP] Working with designers...

2001-12-18 Thread Jim Lucas
hope you don't plan to use that example table in netscape 4.x - Original Message - From: Mark [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 4:10 PM Subject: Re: [PHP] Working with designers... On Tue, 18 Dec 2001 16:00:09 -0800, Fred

Re: [PHP] JavaScript php question - mainly JS though so slightly OT but hep needed!!! :o)

2001-12-18 Thread Jim Lucas
: [PHP] JavaScript php question - mainly JS though so slightly OT but hep needed!!! :o) On Tue, 18 Dec 2001 15:58:10 -0800, Jim Lucas wrote: actually Martin, that is what Martin was doing. href=javascript:function_name() calls to a js function. my suggestion would be to write it this way. a href

Re: [PHP] Working with designers...

2001-12-18 Thread Jim Lucas
. Use Netscape 4. Now there's a condtradiction you don't hear every day. Mike Jim Lucas wrote: hope you don't plan to use that example table in netscape 4.x - Original Message - From: Mark [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, December

Re: [PHP] Access rights for php files on Linux?

2001-12-18 Thread Jim Lucas
your scripts have to have to be readable by your apache user/group if it can't read them then it can't run them. now as for being allowed to only view files of yours, you would want to place the apache user in your group. this will give it access to read your files, but so will others running

Re: [PHP] Help on dealing with arrays of HTTP_POST vars

2001-12-19 Thread Jim Lucas
in your SearchOrder() function change the for() to a foreach() Jim - Original Message - From: Carlos Fernando Scheidecker Antunes [EMAIL PROTECTED] To: PHP-GENERAL [EMAIL PROTECTED] Sent: Wednesday, December 19, 2001 10:15 AM Subject: [PHP] Help on dealing with arrays of HTTP_POST vars

Re: [PHP] sessions var

2001-12-19 Thread Jim Lucas
as long as the domain of the cookie is set to yoursite.com it will be readable from whateveryouwant.yoursite.com but if the domain is set to www.yoursite.com you won't be able to read it from yoursite.com Jim - Original Message - From: Mehmet Kamil ERISEN [EMAIL PROTECTED] To: [EMAIL

Re: [PHP] Slash problem

2001-12-19 Thread Jim Lucas
it is a thingy called magic quotes. setup in the php.ini file. turn it off and they will go away. or, if you can't add a stripslashes() to every variable that will passed this way. Jim - Original Message - From: Evansville Scene [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

Re: [PHP] Secure File Upload

2002-06-05 Thread Jim lucas
? (this is what it sounds like you are asking, to me anyways) Answer these two questions and it will help me alot Jim Lucas - Original Message - From: Christoph Starkmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 8:34 AM Subject: [PHP] Secure File Upload Hi

Re: [PHP] Regular Expressions Help

2002-06-05 Thread Jim lucas
not sure why you have such a complex reg there, but will this work for you. preg_replace(/(http:\/\/)?([^\/ ]*)(.*);/, http://\\2\\3;, $str); \\1 = http:// ; if there \\2 = domain \\3 = request_uri Jim Lucas - Original Message - From: J. Younker [EMAIL PROTECTED] To: [EMAIL

Re: [PHP] what is the format of the filemtime string

2002-06-05 Thread Jim lucas
the date() function takes two arguments. $date_time_format = m-d-Y; echo date($date_time_format, $unix_time_string); Jim Lucas - Original Message - From: _michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 11:15 AM Subject: RE: [PHP] what is the format

Re: [PHP] mail() problem

2002-06-05 Thread Jim lucas
of you mail that you are sending, a) the content type, b) bit number 8bit, 7 bit, etc... that solved the problem for me. Jim Lucas - Original Message - From: César L. Aracena [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 9:29 AM Subject: [PHP] mail

Re: [PHP] mail() problem

2002-06-07 Thread Jim lucas
. it should give you some insight on what is going on with the error messages included in the return mail. Jim Lucas - Original Message - From: César L. Aracena [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Wednesday, June 05, 2002 8:42 PM Subject: RE: [PHP] mail() problem Ok. I've

Re: [PHP] regex

2002-06-11 Thread Jim lucas
$file = preg_replace('/^([a-z0-9\-\_]*).([a-z]{3,4})$/i', $new_file . .$2, $_FILES['upload']['name']); Maybe this? Jim Lucas - Original Message - From: Gerard Samuel [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 3:11 PM Subject: [PHP] regex Im expecting

Re: [PHP] include_once(blah); vs $blah=blah; include($blah);

2002-06-11 Thread Jim lucas
is your isp using a unix machine or windows machine? if they are using a unix box then your backslash needs to be a forward slash /, and if they are using a windows machine, your backslash needs to be escaped. -- \\ other wise you are escaping the b in blah... Jim Lucas - Original

Re: [PHP] get pwd on windows

2002-06-11 Thread Jim lucas
what does $GLOBALS['DOCUMENT_ROOT'] return? Jim Lucas - Original Message - From: Lazor, Ed [EMAIL PROTECTED] To: 'Shane Wright' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 4:35 PM Subject: RE: [PHP] get pwd on windows Will getcwd() work for you? Also, try

Re: [PHP] php JavaScript

2002-06-24 Thread Jim lucas
nope, theres nothing in apache that needs to be setup for js to be used. does your js file have any php in it? when you say that you couldn't get it to work, do you mean that the include doesn't work or that the js doesn't work on the page that you are including it to? Jim Lucas - Original

Re: [PHP] rounding a number

2002-06-24 Thread Jim lucas
seems to work fine for me. what are your results when you do this? mine are 0.4 and this is what is should be. if it were .349 it would round down. isn't this how it should work? What were your results? Jim Lucas - Original Message - From: George Whiffen [EMAIL PROTECTED] To: [EMAIL

Re: [PHP] php JavaScript

2002-06-25 Thread Jim lucas
check out the reply he sent to my last message. it had the code as an attachment. Jim Lucas - Original Message - From: David Freeman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 24, 2002 2:25 PM Subject: RE: [PHP] php JavaScript I've tried to include a simple

Re: [PHP] viewing php predefined fucntions

2002-07-01 Thread Jim lucas
here is a quicky that I wrote up to do just that ?php $ext = get_loaded_extensions(); foreach($ext AS $module_name) $functions[$module_name] = get_extension_funcs($module_name); print_r($functions); // This is the returned array from above ? Jim Lucas - Original Message - From

Re: [PHP] Passing variables

2002-07-08 Thread Jim lucas
after entering the second script and is should work. if it doesn't, if you have php 4.1.0 or newer use $_SESSION['course'] if older version you are working with, use $HTTP_SESSION_VARS['course'] . Hope this helps. Jim Lucas - Original Message - From: Anthony Rodriguez [EMAIL PROTECTED

Re: [PHP] Session problems with popup window

2002-07-08 Thread Jim lucas
pass the user id to the page as a url variable. maybe set a unique cookie name for that value that won't get destroyed when the person logs out. Jim Lucas - Original Message - From: Michael Champagne [EMAIL PROTECTED] To: PHP General Mailing List [EMAIL PROTECTED] Sent: Monday, July 08

Re: [PHP] isset

2002-07-09 Thread Jim lucas
what is it you are testing for? a page that has been submitted. do you mean from an html form or some other method? Jim Lucas - Original Message - From: Preston Wade [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 09, 2002 3:20 PM Subject: [PHP] isset Hello All, I am

Re: [PHP] tag img and php

2002-05-16 Thread Jim lucas
show the contents of 'try_param.php' please. Jim Lucas - Original Message - From: Maciej Przybycien [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 15, 2002 10:38 AM Subject: [PHP] tag img and php Hi, I included php file as html img: img src=/smtMonitoring

Re: [PHP] display errors for developers only?

2002-05-20 Thread Jim lucas
if you are running apache you could turn that option on inside of a specific VirtualHost.../VirtualHost block. Jim Lucas - Original Message - From: Jeff Bearer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 20, 2002 12:44 PM Subject: [PHP] display errors for developers only

Re: [PHP] array empty after use

2002-05-21 Thread Jim lucas
when you loop through a mysql result set you move the pointer up one place. you need to use the mysql_data_seek($results, 0); to reset the pointer Jim Lucas - Original Message - From: Web [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Tuesday, May 21, 2002 2:47 AM Subject: [PHP] array

Re: [PHP] Passing an array on

2002-05-22 Thread Jim lucas
you can use serialize() and unserialize() and make sure that you urlencode() and urldecode() the serialized string before attaching it to your URL. if you don't, you might find that some chars will not be right on the other end of the line. Jim Lucas - Original Message - From: John

Re: [PHP] unable to register session variables

2002-05-22 Thread Jim lucas
Are you starting the session first? ? session_start(); session_register('variable'); ? Jim Lucas - Original Message - From: Pushkar Pradhan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 22, 2002 10:19 AM Subject: [PHP] unable to register session variables I am

Re: [PHP] unable to register session variables

2002-05-22 Thread Jim lucas
not that I am aware of. Jim Lucas - Original Message - From: Pushkar Pradhan [EMAIL PROTECTED] To: Jim lucas [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 22, 2002 10:43 AM Subject: Re: [PHP] unable to register session variables Aren't there two method to register

Re: [PHP] diplaying the path

2002-05-31 Thread Jim lucas
depending on what version of php you are running, you can use $GLOBALS['HTTP_REFERER'] or on newer versions you can use $_SERVER['HTTP_REFERER'] Jim Lucas - Original Message - From: Kris Vose [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 31, 2002 9:19 AM Subject: [PHP

Re: [PHP] Run php function with user click

2002-05-31 Thread Jim lucas
use flash to open a tunnel to the server and run a script, therefor it never has to leave the current page. ::) Jim Lucas - Original Message - From: Michael Sweeney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Dave Shacket [EMAIL PROTECTED] Sent: Friday, May 31, 2002 10:36 AM Subject

Re: [PHP] diplaying the path

2002-05-31 Thread Jim lucas
the bad thing about the BTW seciton is, is that it is not true inside of a function, that is the reason I refered to it as $GLOBALS['HTTP_REFERER'] Jim lucas - Original Message - From: Philip Olson [EMAIL PROTECTED] To: Jim lucas [EMAIL PROTECTED] Cc: Kris Vose [EMAIL PROTECTED]; [EMAIL

Re: [PHP] Run php function with user click

2002-05-31 Thread Jim lucas
but that would take you off the current page wouldn't it? or would you return false? Jim Lucas - Original Message - From: Leotta, Natalie (NCI/IMS) [EMAIL PROTECTED] To: 'Jim lucas' [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Dave Shacket [EMAIL PROTECTED] Sent: Friday

Re: [PHP] Running a script to check something before submitting a form. Can this be done?

2002-05-31 Thread Jim lucas
page no-matter what. do the validating and then if the email address isn't there, redirect with the php header() function to the custom page that you are talking about. Jim lucas - Original Message - From: Don [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Friday, May 31, 2002 1:46 PM

Re: [PHP] echoing two varibles(newbie)

2002-06-03 Thread Jim lucas
string concat something like this require(contant.$variable.string); Jim Lucas - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 03, 2002 1:26 AM Subject: [PHP] echoing two varibles(newbie) How can I echo(or include) two variables

Re: Re[2]: [PHP] A small question - Mysql_insert_id

2002-06-03 Thread Jim lucas
of shitting on them and telling them to f*** off? Just an observation Jim Lucas - Original Message - From: Julie Meloni [EMAIL PROTECTED] To: r [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, June 01, 2002 8:06 AM Subject: Re[2]: [PHP] A small question - Mysql_insert_id r

Re: [PHP] header() problem!!!!

2002-09-11 Thread Jim lucas
This is not a bug. This is just one of many differances between the big browser war. With Netscape (not sure which versions), the attachment thing I found is required. But with IE it kills the browser. ? define('MSIE', (preg_match(/msie/i, $_SERVER['HTTP_USER_AGENT])?1:0));

[PHP] Re: [PHP-DB] array-problems

2001-10-24 Thread Jim Lucas
Try this: BEGIN:PHP-CODE $result = mysql_query (SELECT DISTINCT date FROM linktracker WHERE name LIKE '$PHP_AUTH_USER' GROUP BY date ORDER BY date); if (mysql_num_rows($result)) { for($i=0;$icount($row);$i++) { $date = array( begin = array($i = $row[date]),

Re: [PHP] Trying to subtract...no luck. (Long Code)

2001-10-24 Thread Jim Lucas
one problem on the second script you are trying to use variables that are in an array. if this is where you are talking about you need to specify the array[key] while ($myrow=DB_fetch_array($result)){ $difference = ($budget - $actual); $difference = ($myrow[budget] - $myrow[actual]);

Re: [PHP] Making a string from an Array

2001-10-25 Thread Jim Lucas
try this out $words = explode( , $keywordText); $compare = array('on', 'the', 'in', 'at', 'is', 'it'); foreach ($words AS $value) { if (in_array($value, $compare)) { $ignored[] = $value; } else { $included[] = $value; } } Jim Lucas - Original Message

Re: [PHP] while() looping over query results twice?

2001-10-25 Thread Jim Lucas
I notice that you are concatinating then each time. try setting them to = before using them $companyID_string = ; $companyName_string = ; then: while() { $companyID_string .= , . $query_data[0]; $companyName_string .= , . $query_data[1]; } Jim ps. try

Re: [PHP] while() looping over query results twice?

2001-10-25 Thread Jim Lucas
[EMAIL PROTECTED] To: Jim Lucas [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, October 25, 2001 1:17 PM Subject: Re: [PHP] while() looping over query results twice? OK, so I defined the variables before using them and that solved the problem. (Thanks!) I'm still curious as to why

Re: [PHP] Setting A MySQL Column to NO DUPLICATES

2001-10-25 Thread Jim Lucas
are you trying to have one column not be a dup or a combination of columns? jim - Original Message - From: Jeff Gannaway [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 25, 2001 2:31 PM Subject: [PHP] Setting A MySQL Column to NO DUPLICATES Does anyone know how to set

Re: [PHP] account for missing/optional arguments in functions?

2001-10-25 Thread Jim Lucas
function foo($arg1, $arg2=) // or you can replace the with array() { blah } Jim - Original Message - From: Kurt Lieber [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 25, 2001 3:57 PM Subject: [PHP] account for missing/optional arguments in functions? Is it

Re: [PHP] Q:Syntax for a space? ...like \n is for new line???

2001-10-25 Thread Jim Lucas
the bad thing about using the #160, mac user won't be able to view this. mac uses a different ASCII set 160 isn't a space :) Jim - Original Message - From: Steve Werby [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, October 25, 2001 4:06 PM Subject: Re: [PHP]

Re: [PHP] Re: is there a commandline php.exe interpreter?

2001-10-25 Thread Jim Lucas
try this ? system(php.exe filename, $output); echo $output; ? make sure you put the correct paths to the .exe and file otherwise it will think that it is realtive to where you are in the file system. Jim - Original Message - From: John A. Grant [EMAIL PROTECTED] To: [EMAIL PROTECTED]

Re: [PHP] checkboxes

2001-10-26 Thread Jim Lucas
function jsFunc() { // then check the status of the checkbox if (checked) { run this } else { run this } } onClick=jsFunc() Jim Lucas - Original Message - From: Johnson, Kirk [EMAIL PROTECTED] To: PHP General (E-mail) [EMAIL PROTECTED] Sent: Friday

Re: [PHP] how to recognize local or server execution?

2001-10-26 Thread Jim Lucas
use $GLOBALS[SERVER_ADDR] it will return the IP address of the server. then use that in an if..then..else Jim - Original Message - From: John A. Grant [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 26, 2001 2:18 PM Subject: [PHP] how to recognize local or server

Re: [PHP] session_star() problem

2001-10-26 Thread Jim Lucas
this means that on line 8 of the product_list.php file, you are sending something to the browser with print() echo or ?something? find out what is on that line then, make sure that the session_start(); is the first thing that gets called. jim - Original Message - From: Gate [EMAIL

Re: [PHP] show png in the browser

2001-10-30 Thread Jim Lucas
what type of browser are you using to view this image? jim - Original Message - From: Luz Lopez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 31, 2001 1:56 AM Subject: Re: [PHP] show png in the browser Hi David, of course, I send of header: header(Content-type:

Re: [PHP] php mysql prob...

2001-10-30 Thread Jim Lucas
returns 0 Jim Lucas [EMAIL PROTECTED] wrote in message 03ad01c161b0$026caee0$[EMAIL PROTECTED]">news:03ad01c161b0$026caee0$[EMAIL PROTECTED]... mysql_error() and mysql_errno() return the value. $error = mysql_error($dblink); $errno = mysql_errno($dblink); or echo mysql_error

Re: Re[2]: [PHP] split array in 2 halfs

2001-10-31 Thread Jim Lucas
take a look at the manual http://www.php.net/manual/en/function.array-slice.php it will show you the right way to do it jim - Original Message - From: Daniel Harik [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 31, 2001 11:25 PM Subject: Re[2]: [PHP] split array in

Re: [PHP] submitting form to a page with frames

2001-11-01 Thread Jim Lucas
try using the $GLOBALS[variable_name] array. Jim - Original Message - From: Matt Fair [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 3:08 PM Subject: [PHP] submitting form to a page with frames I have 2 pages page1.php and page2.php. I want to submit the

Re: [PHP] Where is my php.ini?

2001-11-01 Thread Jim Lucas
most of my installs, Redhat linux 7.0 and 7.1, have placed the php.ini file in the /etc/php.ini location. what version of linux are you using? Jim - Original Message - From: Gaylen Fraley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 3:16 PM Subject: [PHP]

Re: [PHP] Array HELP PLEASE

2001-11-08 Thread Jim Lucas
read this page a little closer! http://www.php.net/manual/en/function.mysql-fetch-array.php the mysql_fetch_array(); does not pull all the results in one big array. it IS only a single row of data. try this out, it should do what you are looking to do. $results = mysql_query(SELECT * FROM

Re: [PHP] Including declare statements that contain variables

2001-11-14 Thread Jim Lucas
Here are a few pointers to make it run just a little faster also. don't extract the entire $GLOBALS array. just use the $var that you need. function GetData($Query) { return(mysql_query($Query, $GLOBALS[db_conn])); } another thing would be to build a wrapper function for mysql_query() and

Re: [PHP] very weird PHP behaviour...

2001-11-14 Thread Jim Lucas
try this: function Upload($source_file,$source_filename,$dest_dir,$allowed_types=array(), $upload_errmsg=) { if( count($allowed_types) ) { if(!in_array(ArquivoExt($source_filename),$allowed_types)) { ?O arquivo ?=$source_filename? não está entre os tipos

Re: [PHP] IP Address Variable

2001-11-14 Thread Jim Lucas
check this out http://www.php.net/manual/en/function.gethostbyaddr.php jim - Original Message - From: Ben Clumeck [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 14, 2001 2:48 PM Subject: [PHP] IP Address Variable I currently log ip address that reach my site.

Re: [PHP] What version did $PHP_SELF still work?

2001-11-15 Thread Jim Lucas
try using $GLOBALS[PHP_SELF] no matter where you are at (ie out of a function, in a function, in an array(), etc... ), you will get the correct value Jim - Original Message - From: John Steele [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Thursday, November 15, 2001

Re: [PHP] eregi_replace probs

2001-11-16 Thread Jim Lucas
eregi_replace isn't your problem this funciton RETURNS the new string. function scan_string($str) { $forbid = array (coke, tylenol, ford); $swap = array (pepsi, advil, chevrolet); for ($i = 0; $i count ($forbid); $i++) { $NEW_STRING =

Re: [PHP] eregi_replace probs

2001-11-16 Thread Jim Lucas
sorry didn't notice the in the args you'll want this instead. function scan_string($str) { $forbid = array (coke, tylenol, ford); $swap = array (pepsi, advil, chevrolet); for ($i = 0; $i count ($forbid); $i++) { $str = eregi_replace($forbid[$i],$swap[$i],$str); }

Re: [PHP] Auto Thumbnail?

2001-11-16 Thread Jim Lucas
well, if you are on a *nix based system, you could use ImageMagic. and have it generate the thumbnails for you. as for a script, well, you would have to write that. Jim - Original Message - From: cosmin laslau [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 16, 2001 3:16

Re: [PHP] HTTP_REFERER

2001-11-23 Thread Jim Lucas
at our site, we built the error trapping that you are wanting to build. here is a snippet of what we used. PSID: (. PSID .)\n. Page: ($GLOBALS[REQUEST_URI])\n. As refered from: ($GLOBALS[HTTP_REFERER])\n. Browser Platform: ($GLOBALS[HTTP_USER_AGENT])\n.

Re: [PHP] php-html

2001-11-24 Thread Jim Lucas
checkout the output control function at php.net http://www.php.net/manual/en/ref.outcontrol.php they allow you to capture the test that would have normally been sent to the browser. take the value of the variable and write it to a file.. :) Jim Lucas - Original Message - From

Re: [PHP] zip.exe files

2001-12-03 Thread Jim Lucas
check out the www.php.net and look into the using the header function to force the down load instead of trying to executing the file. www.php.net/header Jim - Original Message - From: AAustin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 29, 2001 4:26 PM Subject:

[PHP] Header redirecting with POST

2001-12-12 Thread Jim Lucas
, GET has a size limit on the amount of data you can send throught the URL, 2kb. I want to be able to send larger amounts with a header() redirect. Any ideas on how to send the data in a POST with header(); woud be appreciated. Thanks Jim Lucas -- PHP General Mailing List (http://www.php.net

Re: [PHP] Performance

2001-12-13 Thread Jim Lucas
()/require() stuff. If you would like information on the performance results I might be able to round up some of the data. It is faster and cleaner. Jim Lucas www.bend.com - Original Message - From: René Fournier [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday

Re: [PHP] file_exists, is_readable effective UID/GID

2007-10-24 Thread Jim Lucas
($filename); if ( $stat_info ) { // do something... } The '@' will suppress the E_WARNING notice if stat fails the condition will fail. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V

Re: [PHP] RE: [Ticket #29] [PHP] Executing PHP

2007-10-26 Thread Jim Lucas
, and voila! don't give out our alternate purpose of mailing lists :) ... ... just kidding -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List

Re: [PHP] SPL

2007-10-28 Thread Jim Lucas
what you are trying to do here. -- Jim Lucas Perseverance is not a long race; it is many short races one after the other Walter Elliot Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V

Re: [PHP] SPL

2007-10-29 Thread Jim Lucas
; } } } displayDirectory($_GET['location']); -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Jim Lucas
that '', Side note, you might want to look into using the '+' instead of the '*'. '+' = must be one or more '*' = 0 or more In some of the cases here, I see where this can bite you in the butt later. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have

[PHP] Perl style chomp()

2007-11-01 Thread Jim Lucas
\n; var_dump(chomp($data)); -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Perl style chomp()

2007-11-01 Thread Jim Lucas
mike wrote: On 11/1/07, Jim Lucas [EMAIL PROTECTED] wrote: I noticed, while perusing the chop() manual page, that some people were giving examples of Perl's chop() and chomp() functions. Comments made about both said the examples were good, but not correct. what about trim(), rtrim

Re: [PHP] Transfer query result to another script

2007-11-01 Thread Jim Lucas
handler is only available within the lifetime of the current script. When the script ends, the all resource handlers get removed! The only thing that my help, is if you use persistent connections in mysql using mysql_pconnect() -- Jim Lucas Some men are born to greatness, some achieve

Re: [PHP] Generating HTML table from MySQL table based on some criteria

2007-11-01 Thread Jim Lucas
'; echo 'tdimg src='.$path.' //td'; echo '/tr'; } echo '/table'; } else { echo 'No results found'; } -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V

Re: [PHP] PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5)

2007-11-01 Thread Jim Lucas
configuration is anything like the default OpenBSD setup. I know you can manually start httpd with the -u flag to disable chrooting Again, I can't find any examples of the Mac setup, but my money would be on chrooting as the problem. -- Jim Lucas Some men are born to greatness, some achieve greatness

Re: [PHP] Including GD inside HTML code

2007-11-01 Thread Jim Lucas
should have a separate script generate the img and link to it with your HTML img src=generate_image.php?img=someImage / Then in the script generate_image.php you create the image and pass it back at that point. -- Jim Lucas Some men are born to greatness, some achieve greatness

Re: [PHP] what is better way to write the query

2007-11-02 Thread Jim Lucas
is so small to consider any optimization? thanks for any help. -afan I would perform multiple inserts @ a time. This way you save yourself some time by not having mysql rebuild the indexes, if any exist, after each insert statement. -- Jim Lucas Some men are born to greatness, some achieve

Re: [PHP] Transfer query result to another script

2007-11-02 Thread Jim Lucas
are wanting to do is make a table layout sortable, why not use something like this? http://www.kryogenix.org/code/browser/sorttable/ -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William

Re: [PHP] Including GD inside HTML code

2007-11-02 Thread Jim Lucas
GD function calls, necessarily using a header call of the correct type, prevent any other html output on that page? David It does not prevent other HTML output, but the browser will not read it as HTML, it will think that it is binary data in the format of the picture data instead. -- Jim

Re: [PHP] mail and quotes

2007-11-02 Thread Jim Lucas
, the input going to your mail function call has the body/data escaped. Check that magic quotes are not turned on. This would escape all your form data being sent to the processing script. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness

Re: [PHP] Generating HTML table from MySQL table based on some criteria

2007-11-03 Thread Jim Lucas
Sudheer Satyanarayana wrote: Wolf wrote: Sudheer, Post the code you are using and we'll better be able to point you in the right direction to get your code working. Thanks Jim Lucas, Wolf and Jay Blanchard for your suggestions. Here is the code I am using [code] print 'table border=1tr

Re: [PHP] mysql_fetch_array

2007-11-03 Thread Jim Lucas
Eduardo Vizcarra wrote: I have a WHILE sentence to retrieve all records from a SELECT query in a database and am using mysql_fetch_array to store them in a matrix, the sentence is like this: while($row=mysql_fetch_array($fotos)) { $fotos_mostrar[] = $row; } $fotos contains all

Re: [PHP] $_POST superglobal empty, while readfile(php://input) does return data.

2007-11-03 Thread Jim Lucas
Mackatack wrote: Nathan Nobbe schreef: On 11/3/07, Mackatack [EMAIL PROTECTED] wrote: Hey all! Im trying to submit a very basic form to phpinfo(): form action='?' method='POST' input type='hidden' name='foo' value='bar' / input type='submit' / /form ?php

Re: [PHP] mysql_fetch_array

2007-11-04 Thread Jim Lucas
statement retrieves 2 columns from one table, how do I display the second column ? Thanks Eduardo Jim Lucas [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Eduardo Vizcarra wrote: I have a WHILE sentence to retrieve all records from a SELECT query in a database and am using

Re: [PHP] mysql_fetch_array

2007-11-04 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Do you even need reset()? I've never used it. Personally, I do not see the need. The op is building the array then wanting to work with it. At this point, the internal pointer should still be at the beginning. AFAIK Jim -- PHP General Mailing List

Re: [PHP] How to replace define in a require file with mysql?

2007-11-05 Thread Jim Lucas
Ronald Wiplinger wrote: Jim Lucas wrote: Ronald Wiplinger wrote: I have a file linked with require into my program with statements like: define(_ADDRESS,Address); define(_CITY,City); I would like to replace this with a mysql table with these two fields (out of many other fields). How can I

Re: [PHP] Mail function doesn't work

2007-11-05 Thread Jim Lucas
de Informática Carlos Marx de Matanzas. La gran batalla se librará en el campo de las ideas is your apache process chroot'ed ? Can PHP see the sendmail binary? -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Jim Lucas
use screen. Screen allows you to start a new terminal, start something, and then detach from that screen. Then you are allowed to log out and the next time you log in, you are able to resume the previous terminal session. -- Jim Lucas Some men are born to greatness, some achieve greatness

Re: [PHP] Can I make a process run in background?

2007-11-06 Thread Jim Lucas
. Screen allows you to start a new terminal, start something, and then detach from that screen. Then you are allowed to log out and the next time you log in, you are able to resume the previous terminal session. Per Jessen wrote: Jim Lucas wrote: This method will work until you log out, when

Re: [PHP] Regular Expressions

2007-11-06 Thread Jim Lucas
(array_keys($replacements), array_values($replacements), $in); -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net

Re: [PHP] Regular Expressions

2007-11-06 Thread Jim Lucas
); $link = str_replace( array_keys( $map ), array_values( $map ), $link ); ? The only way to make it faster is to build the key array and value array separately, but then the association is not so clear. Cheers, Rob. -- Jim Lucas Perseverance is not a long race

Re: [PHP] html parsing

2007-11-08 Thread Jim Lucas
the SSI and spit out what it needs, then you can read the file anyway you like. understand that php reading a file from the file system, is different then your browser calling to a server/webpage and having Apache serve the page back to the browser. -- Jim Lucas Perseverance

Re: [PHP] Need a hint how to track an error

2007-11-12 Thread Jim Lucas
in firefox and the syntax highlighting would have shown you the problem. Why in the world are you still using the font... tag? Also, learn to close your HTML tags that require a closing tag. What version of HTML are you coding for? bye Ronald -- Jim Lucas Some men are born

  1   2   3   4   5   6   7   8   9   10   >