Re: [PHP] array encapsulate

2003-09-12 Thread John W. Holmes
Bill wrote: How do I know it won't just assume that $_POST[detail][11][116] means the 116th character in the string $_POST[detail][11]? Because $_POST['detail'][11] is an array (or it should be). If you're in doubt, make sure it is with is_array(). -- ---John Holmes... Amazon Wishlist:

Re: [PHP] Text into a url

2003-09-13 Thread John W. Holmes
Tom Wollaston wrote: Hi I am havening a problem retrieving url from a mysql database. I have the url's stored as text and am using the following code to retrieve them $query = SELECT name,url FROM clubs WHERE url'' ORDER BY name; $result = @mysql_query($query) or die (Query failed); if

Re: [PHP] MySql Query Help: COUNT()

2003-09-13 Thread John W. Holmes
I'm trying to get the total number of a certain records from a database, but the result is always '1'. Please advise! =MySql Table = =activitiy = id | employee_id | project_id | date 1 | 45 | 60 | 2003-09-09 2 | 34 | 10 | 2003-09-10 3 | 45 | 45

Re: [PHP] Calling functions from Button actions

2003-09-13 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Dan J. Rychlik wrote: Is their an easy way to call a function based upon a button action? Example: form action=action.php input type=submit name=action1 value=Execute function action1() input type=submit name=action2 value=Execute function action2() /form action.php:

Re: [PHP] Calling functions from Button actions

2003-09-13 Thread John W. Holmes
[EMAIL PROTECTED] wrote: apologies i generally use this system for deleting records, i give a confirm box if they press ok it goes to another action, i suppose i should change this system to submit the form instead and check for the post var ? i guess at least it could store the http_referer then

Re: [PHP] change PHP include directory

2003-09-13 Thread John W. Holmes
Tim Thorburn wrote: Normally to change a sites include directory for PHP I'd use a .htaccess file and the following command: php_value include_path .:/path/to/web/ Again normally, I would get the path to the site by doing a simple phpinfo(); command and find the _ENV[DOCUMENT_ROOT] line near

Re: [PHP] Need Help Troubleshooting Code That Works Till It Comes to Form at End

2003-09-14 Thread John W. Holmes
Stephen Tiano wrote: So I got is to display every column of every entry. But when I tried a specialized select statement in the query box provided by the form at the very end of this code, when I pressed the Submit button, nothing changed; I was still left staring at the table of all the info

Re: [PHP] square brackets in form names violate HTML specs?

2003-09-14 Thread John W. Holmes
Curt Zirzow wrote: * Thus wrote Robert Cummings ([EMAIL PROTECTED]): On Sat, 2003-09-13 at 17:21, Eugene Lee wrote: On Sat, Sep 13, 2003 at 06:15:29PM +, Curt Zirzow wrote: : * Thus wrote Eugene Lee ([EMAIL PROTECTED]): : Something I've noticed in PHP is a proliferation of code like this:

Re: [PHP] CGI Error, IIS

2003-09-14 Thread John W. Holmes
nabil wrote: Why this happen with me with IIS CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Although it's not a bug, read this: http://bugs.php.net/bug.php?id=12061 -- ---John Holmes... Amazon Wishlist:

Re: [PHP] space sensitive?

2003-09-14 Thread John W. Holmes
Stevie D Peele wrote: Is PHP space sensitive?? PHP is very sensitive about it's space. Don't go into it's personal space otherwise you can upset it and cause it to cry. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP

Re: [PHP] htmlentities -- can it skip tags

2003-09-14 Thread John W. Holmes
Justin French wrote: Hi all, I need to convert some text from a database for presentation on screen... as per usual, characters like quotes and ampersands () are giving me grief. the obvious answer is to apply htmlspecialchars(), BUT this also converts all and into lt; and gt; signs, which

Re: [PHP] How do I squelch warnings (without editing php.ini)?

2003-09-15 Thread CPT John W. Holmes
From: Dan Anderson [EMAIL PROTECTED] I am running a script that occasionally utters a few warnings when the user does something dumb (but it does not kill the script). Is there a way to turn off warnings within a script? I really don't want my users to see them. Short of fixing your code,

Re: [PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread CPT John W. Holmes
From: Wei Wang [EMAIL PROTECTED] This may sound very newbie. But since html comment uses !-- -- which doesn't comment out the php code. And the php comment /**/ // apparently doesn't work on html. So how do I comment out a chunk of html/php mixed code? /* and */ appears to work: ?php /*

Re: [PHP] multiple FORMS on same page problem.

2003-09-15 Thread CPT John W. Holmes
You can only use one form, as you've figured out. You can have PHP determine the action for each button, though.. In a form with two buttons, say names submit1 and submit2, only one variable will be set when the form is submitted, the actual button that was clicked. So you can use logic like this

Re: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread John W. Holmes
Jeremy Brand, B.S. wrote: Thanks to everyone for their responses, though I still have not found a way to get to the conference at a reasonable price (what I consider reasonable). If anyone has any comments other than justifying the price of the conference, like a friends of php list I can get

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread John W. Holmes
Jeremy Johnstone wrote: Actually the $495 is the conference fee only... It does not include the $160 a night for the hotel room (price of the hotel the conference is at), or food, or transportation. That is just your ticket into the conference. Factor in everything else, and your easily up to

Re: [PHP] Strange error

2003-09-16 Thread John W. Holmes
Sid wrote: You are probably right. I typed in the same code into a new file and it started to work. Just for the record, I copied and pasted this code from Opera in Windows. Anyone had similar problems? Yes. There are sometimes hidden characters in code that you cut and paste like that. It will

Re: [PHP] multiple FORMS on same page problem.

2003-09-16 Thread John W. Holmes
Golawala, Moiz M (IndSys, GE Interlogix) wrote: It is almost working.. I can't figure out why I can get the someVal to page5.php. file: page4.php ?php if (isset($_REQUEST['submit1'])){ echo button 1 was clicked, act accordingly; echo this the request values; echo $_REQUEST['someVal'];

Re: [PHP] Code check please

2003-09-17 Thread CPT John W. Holmes
From: James Johnson [EMAIL PROTECTED] Can anyone see why this code isn't working $SID = $_SESSION['svUserID']; $AdID = $_GET['AdID']; // get the campuses assigned $qCampusID = SELECT inst_id FROM ads_campuses WHERE ad_id = $AdID; You say down below that this query only selects one

Re: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread CPT John W. Holmes
From: esctoday.com | Wouter van Vliet [EMAIL PROTECTED] So, since I'm not quite a newbie I did not read all the guides .. RTFM (Read The F*ck!ng Manual) and STFW (Search The [EMAIL PROTECTED] Web) I already knew, but what does STFA stand for ;).. Hi newbie. Why don't you search the archives

Re: [PHP] Another code check

2003-09-18 Thread CPT John W. Holmes
From: James Johnson [EMAIL PROTECTED] Can anyone see what's wrong with the following code? It produces the following in the browser: Warning: Cannot add header information - headers already sent by (output started at /home/.paco/campuscb/campuscorkboard.com/AdPay_MC.php:11) in

Re: [PHP] Form CheckBox question

2003-09-18 Thread CPT John W. Holmes
From: Yves Arsenault [EMAIL PROTECTED] I have this in my form the checkUnCheck(this); will uncheck values 1,2,3 if None is chosen... Now when I submit this form, the output I get from $Avail is the word Array and not the actual content ('1,2,3' if I choose 1,2,3) td input

Re: [PHP] PHP and MYSQL don't shake hands

2003-09-18 Thread CPT John W. Holmes
From: Frank Tudor [EMAIL PROTECTED] The problem I am having is that when I try to pass values to the database the php fails. I think I have singled it down to the connection string but I am not sure. [snip] function db_connect() { global $dbhost, $dbusername, $dbuserpassword,

Re: [PHP] when clients go bad

2003-09-18 Thread CPT John W. Holmes
From: Tim Thorburn [EMAIL PROTECTED] I've done freelance web design for about 7 years now off and on. Just recently I've found myself dealing with the worst clients in the history of the world - ok, maybe not, but they've been pretty awful. After about a year of working together, the

Re: [PHP] Splice problem

2003-09-18 Thread CPT John W. Holmes
From: Stevie D Peele [EMAIL PROTECTED] My problem is that I am splicing an array and then echoing the array [code] ?php $input = array(red, green, blue, yellow); array_splice($input, 2); echo $input; ? [/code] and all that is echoed is Array. I want red green to be echoed. That's

Re: [PHP] config file

2003-09-19 Thread CPT John W. Holmes
From: Payne [EMAIL PROTECTED] I have a project that I need to write and in the past I would hard code a lot of information in pages that I should have put into a config file. I am wanting to know if there a website that example how to write a config file and how to the php call them. You can

Re: [PHP] Session and Server variable problem

2003-09-19 Thread CPT John W. Holmes
From: Stephen Schneider [EMAIL PROTECTED] Have an interesting problem. Worked on a web site for a client. They have the server (IIS) set up and we are using php. Have been working with their domain with a .net extension. To go live, they repointed their .com domain to the web folder.

Re: [PHP] Do PHP boolean operators short circuit?

2003-09-19 Thread John W. Holmes
Dan Anderson wrote: I am learning perl and my book describes boolean short circuiting. Basically: function1() OR function2(); (function2 never is evaluated if function1 is true). Will this work in PHP for any function? Yes. From my experience, it will work that way. I don't know if it's

[PHP] php|cruise

2003-09-20 Thread John W. Holmes
Is anyone planning on going to this? http://www.phparch.com/cruise/ I'm trying to go. It would be nice to put a face to the name with a few people out there. Let me know. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP

Re: [PHP] php|cruise

2003-09-21 Thread John W. Holmes
John Nichel wrote: John W. Holmes wrote: Is anyone planning on going to this? http://www.phparch.com/cruise/ I'm trying to go. It would be nice to put a face to the name with a few people out there. Let me know. [snip] The wife has been bugging me to bring her on a cruise for years now Yeah

Re: [PHP] php|cruise

2003-09-21 Thread John W. Holmes
Becoming Digital wrote: I think this is the ONLY PHP conference she'd ever agree to going to. I think this is also the ONLY cruise on which single guys won't find a fling. I smell a sausage party! ;) I wouldn't be worried about that. THe PHP conference goers are only about 300 out of 1500

Re: [PHP] problem passing variable between forms.

2003-09-23 Thread CPT John W. Holmes
From: Angelo Zanetti [EMAIL PROTECTED] therefore I can register this variable on the same page as the checkboxes? So therefore is it posssible for php to determine which checkboxes have been selected (or are the ones that are selected added to the array)? The ones that are selected are added

Re: [PHP] Logged Out of Seesion, Then use back button

2003-09-23 Thread CPT John W. Holmes
From: Roger Spears [EMAIL PROTECTED] 1) How can I prevent the use of the browser back button after someone logs out? You don't. You never prevent the use of the back button. When someone logs in, then a session should be started with some content, like you've already mentioned. So, thoughout

Re: [PHP] How can I auto upload a file to the server?

2003-09-23 Thread John W. Holmes
jane wrote: I have a .txt file on my local Windows 2000 box that i want uploaded to a remote L.A.M.P. server with only one click. I want to have a link (shortcut) on my desktop when clicked it launches a web browser loaded with a remote .php script that automatically goes into

Re: [PHP] mySQL vs pgSQL | php vs others

2003-09-24 Thread John W. Holmes
nabil wrote: Dear all; I have been using Mysql for a long time, but I have a benchmark Q. Is pgsql , better ? faster ? more reliable than mysql ? Maybe. any comment ? Some people say that php is not for a very big enterprise, banking , application !! they said that java or even .NET is better

Re: [PHP] Script that pulls several pages from list?

2003-09-24 Thread CPT John W. Holmes
- Original Message - From: MIKE YRABEDRA [EMAIL PROTECTED] I want to create a php script that will... 1. Take a list of URLs separated by commas 2. Covert that to an array 3. Then go through and pull the content from each page in a loop I am doing this so I can set up a cron job

Re: [PHP] How can I auto upload a file to the server?

2003-09-24 Thread CPT John W. Holmes
method, though. FTP would work, though... ---John Holmes... John W. Holmes wrote: jane wrote: I have a .txt file on my local Windows 2000 box that i want uploaded to a remote L.A.M.P. server with only one click. I want to have a link (shortcut) on my desktop when clicked

Re: [PHP] Casting nulls

2003-09-24 Thread CPT John W. Holmes
From: Carl Furst [EMAIL PROTECTED] IF $int is null and I have a test If($int 1) { //do some foobar } will $int be evaluated as a zero? IF I cast (int) $int.. will that turn a null $int into a zero?? Documentation aint too clear. No idea what you're doing here, but you may want to

Re: [PHP] 3 mins of your time please...logic problem

2003-09-24 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] Basically trying to limit the vote to just 1 per person, first am checking if the the person with username has voted, if that comes back as false then am checking his ip (because i dont know if the person changed his username and is trying to vote again) now

Re: [PHP] preg_replace help please

2003-09-24 Thread John W. Holmes
Justin French wrote: this is supposed to any occurrence of *something* into strongsomething/strong $str = preg_replace(!\*(.*?)\*!, strong\\1/strong\\2,$str); it works fine on single lines, but it breaks when there's a \n (and perhaps other white spaces?) in the string, eg: *something with a

Re: [PHP] How can I auto upload a file to the server?

2003-09-24 Thread John W. Holmes
Mike Migurski wrote: The only part i am having trouble with is making the remote script automatically look into the local computer's hard drive and grab the .txt file. snip The problem with the code above is the path to the file does not show up in the input type='file', and the user would

Re: [PHP] 3 mins of your time please...logic problem

2003-09-25 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] A different approache for the captcha.. instead of using a blurred image use some text and than ask a question about the text like What does the 2nd word in the first line of the 4thparagraph say? Reading images can still be automated, it just takes a lot more time to

Re: [PHP] What to use?

2003-09-25 Thread CPT John W. Holmes
From: Robert Cummings [EMAIL PROTECTED] On Thu, 2003-09-25 at 16:28, Jeff McKeon wrote: Correct me if I'm wrong please, but I think number_format() has the adverse effect of changing the value type from numeric to char and therefore baring you from using it in mathematical equation later

Re: [PHP] What to use?

2003-09-25 Thread CPT John W. Holmes
From: Jeff McKeon [EMAIL PROTECTED] Correct me if I'm wrong please, but I think number_format() has the adverse effect of changing the value type from numeric to char and therefore baring you from using it in mathematical equation later in the script. You're correct (kind of). The _result_

Re: [PHP] PHP coders spare time [OT}

2003-09-29 Thread CPT John W. Holmes
From: Marek Kilimajer [EMAIL PROTECTED] CPT John W. Holmes [EMAIL PROTECTED] and John W. Holmes [EMAIL PROTECTED] is the same address, just a different name (in and out of office ;) John made it to be second. Maybe this list shouldn't be public, since it appears I send just as much email from

Re: [PHP] php and checkboxes.

2003-09-29 Thread CPT John W. Holmes
From: Angelo Zanetti [EMAIL PROTECTED] I dont actually want to delete the record from the database, perhaps I wasnt very clear in my explanation, but I just need to remove that entry from the table. kinda like when deleting mail from your web email account like hotmail. Same idea... input

Re: [PHP] Export resultset

2003-09-29 Thread CPT John W. Holmes
From: DPCMA Metalito [EMAIL PROTECTED] New to this list. I would like to know if anybody knows where can I found information about how can I generate an Excel Spreadsheet, with the resulset of an LDAP query that my script made. The goal is that MS Explorer can download and load the xls inside

RE: [PHP] Creating Session Variables

2003-04-03 Thread John W. Holmes
globals on) will actually change the session value. With register globals off, $_SESSION['var'] and $var are two totally different variables. Just get in the habit of using $_SESSION['varname'], you'll be better off for it. ---John W. Holmes... PHP Architect - A monthly magazine for PHP

RE: [PHP] PHP and Cookies

2003-04-03 Thread John W. Holmes
do you receive the cookie? How are you checking for it later, to decide whether or not to prompt for an email? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net

RE: [PHP] HTTP or HTTPS

2003-04-03 Thread John W. Holmes
anybody knows how to find out the connection type (http or httpS)? Tried out $HTTP_SERVER_VARS. $_SERVER['HTTPS'] will be set if it's over HTTPS. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General

RE: [PHP] no worky :|

2003-04-03 Thread John W. Holmes
anything. Print the query to the screen and do a common sense check on it and then find out how to check for an error message with whatever abstraction layer you're using. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com

RE: [PHP] magic quotes

2003-04-03 Thread John W. Holmes
So, 1. turn ON runtime and gpc No, leave them off if your code runs fine without them. You'll save resources if you do the addslashes() yourself to only the fields that need it instead of everything. I see no reason at all to ever have runtime ON. It will escape data coming _from_ the

RE: [PHP] is register globals off ready for prime time

2003-04-04 Thread John W. Holmes
... no. That's not true. It may break certain programs that were written and are expecting register_globals to be on, but that's it. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http

RE: [PHP] newbie help, pressing the submit button returns nothing

2003-04-04 Thread John W. Holmes
METHOD=post Name:br INPUT NAME=UserName TYPE=textbr INPUT TYPE=SUBMIT VALUE=Enter /FORM br Your name is: ?php echo ($UserName); ? Use $_POST['UserName'] instead of just $UserName and do a search on register_globals to find out why. ---John W. Holmes... PHP Architect - A monthly

RE: [PHP] Q. Adding line numbers to highlighted source

2003-04-04 Thread John W. Holmes
); $h_file = str_replace(code,code1 ,$h_file); $count=2; $nh_file = preg_replace(/br \//e,'br /.$count++. ',$h_file); echo $nh_file; ? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http

RE: [PHP] newbie help, pressing the submit button returns nothing

2003-04-04 Thread John W. Holmes
If no action tag is specified, it'll default to the current page. Just FYI. It's up to the browser, though, so some may decide not to do anything... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original

Re: [PHP] Html forms to php scripts

2003-04-04 Thread CPT John W. Holmes
I though we already covered that this was an PHP / Apache 2 bug?? Stop using Apache 2 with PHP. ---John Holmes... - Original Message - From: VanZee, Timothy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 04, 2003 11:01 AM Subject: RE: [PHP] Html forms to php scripts Here

Re: [PHP] php/mysql group by headache

2003-04-04 Thread CPT John W. Holmes
preface: have RTM on mysql GROUP BY I have a mysql db with a number of entries... table| id | name | info | version 1 x foo1 2 x foob 2 3 x foobar 3 my sql is similar to select id,name,info

RE: [PHP] preg_match problem/question

2003-04-04 Thread John W. Holmes
out? There are examples on the page, too. http://www.php.net/manual/en/ref.pcre.php ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

RE: [PHP] newbie help, pressing the submit button returns nothing

2003-04-04 Thread John W. Holmes
?php echo $_POST['applicant']; ?! /BODY /HTML ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: David McGlone [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2003 11:48 AM To: [EMAIL

RE: [PHP] Re: Q. Adding line numbers to highlighted source

2003-04-04 Thread John W. Holmes
','sprintf(br /span style=\color:black;\%05d /span,$i++)',$file); echo hr; echo $file; Enjoy! ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Alan McFarlane [mailto:[EMAIL PROTECTED

RE: [PHP] newbie help, pressing the submit button returns nothing(solved)

2003-04-04 Thread John W. Holmes
Welcome ?php echo $applicant; ?! Thank you all for helping me, I have finally figured out why the name wasn't displaying. from the line above, $applicant should have been applicant. Are you sure you're using PHP? ---John W. Holmes... PHP Architect - A monthly magazine for PHP

Re: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not working

2003-04-04 Thread CPT John W. Holmes
How much traffic does this site get? Is it possible that the garbage collection is just never triggered? What if you up the garbage collection probability in your php.ini file to 100% (to trigger it with each session start)? Do the files get removed then? I'm sure this isn't the problem, but the

Re: [PHP] Opinion on a method....

2003-04-04 Thread CPT John W. Holmes
I would like to get some opinions here on a method I'm doing to grab connect information for a mysql connection. Currently I am doing: $pinfo = fopen (/director1/directory2/filename.ini, r); I'm looking for a more secure method of doing this. Is XML a solution? Is there something else?

Re: [PHP] PHP Another time around

2003-04-04 Thread CPT John W. Holmes
I'm getting close to what I want...I currently have this code which loops through all of the next 24 hours: SELECT NAME=futhour ? for($i = 0; $i = 24; $i++): $futhour = strtotime(+$i hour); echo 'OPTION VALUE='. date('H',$futhour) .''. date('g a',$futhour).'/OPTION';

RE: [PHP] Opinion on a method....

2003-04-04 Thread John W. Holmes
Reason I'm not using an include is simple. The file does not contain any variables, it just has a line of text that is delimited. I guess I was just looking at the include() method as insecure. I can see how it wouldn't be now. Why not create your .ini file in the same format as php.ini

RE: [PHP] native vs. phplib sessions

2003-04-04 Thread John W. Holmes
or any other method. I think all of the problems you read about are from people trying to do things the hard way or just not understanding how sessions work. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP

RE: [PHP] Questions

2003-04-04 Thread John W. Holmes
Began with one question, but some how I figure it out some stuff that I will need, and before I forget to ask, better I'll do, and are from different topics related to the php. No more than one message is sent, because the traffic on the list. Hope that in some time I get the responde of my

RE: [PHP] mysql_num_rows

2003-04-04 Thread John W. Holmes
see what is wrong. Can anyone else see where the problem might be? That means your query failed, generally. Check for mysql_error() after you run your query to see what went wrong. For example in your SQL, you're missing the FROM table portion of your query... oops! ---John W. Holmes... PHP

RE: [PHP] If else.. display no picture..

2003-04-05 Thread John W. Holmes
Geen informatie beschikbaar; What is this line supposed to do? You're missing some quotes around your string... Next time it would be more helpful if you posted the _exact_ error message along with the relevant line mentioned in the message and 5 or so lines before that one. ---John W. Holmes

RE: [PHP] Force no Cache

2003-04-05 Thread John W. Holmes
? Will they ignore it because it's expired? Thanks. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Uploading a file from a specific directory

2003-04-05 Thread John W. Holmes
/copy it from there before the script ends. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] RE: newbie alternate row colours in dynamic table -- timed tests

2003-04-05 Thread John W. Holmes
code included below. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ ?php function getmicrotime(){ list($usec, $sec) = explode( ,microtime()); return ((float)$usec + (float)$sec); } $ITERATIONS = 10

RE: [PHP] combining text with $_POST

2003-04-05 Thread John W. Holmes
'Name: ' . $_POST[name]; etc... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] combining text with $_POST

2003-04-05 Thread John W. Holmes
you also really don't need single quotes in the $_POST... (if the variable is within a string delimited by _double_ quotes) echo Name: $_POST[name]; .. should work. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com

RE: [PHP] Another problem with mysql version coding

2003-04-05 Thread John W. Holmes
You should be asking these questions on a MySQL list... DELETE FROM table WHERE laikas NOW() - INTERVAL 60 DAY AND admin != 1 Works on MySQL 3 and 4. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original

RE: [PHP] When to use a text file rather then a database

2003-04-05 Thread John W. Holmes
is if two people try to edit the file at the same time, but it doesn't sound like that'll be an issue. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

RE: [PHP] array_unique wierdness

2003-04-05 Thread John W. Holmes
I cut and pasted your code and it worked fine for me with PHP 4.3.0 (assuming the first line is really $dayarray = array(9,22,22); ) ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From

RE: [PHP] Permission issues with fopen on window xp pro.

2003-04-06 Thread John W. Holmes
What web server are you running? Are you using NTFS? PHP runs as the web server (generally) so you have to make sure that user has permission to access the file. If you're using IIS, it's the IUSR_computer_name user. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals

RE: [PHP] Great Opportunity for all group members!!!

2003-04-06 Thread John W. Holmes
Off topic, but here is a great report on the origins of spam: http://www.cdt.org/speech/spam/030319spamreport.pdf ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: -{ Rene Brehmer

Re: [PHP] Get the datetime from server

2003-06-05 Thread CPT John W. Holmes
Can anyone teach me how to get the date and time from the web-server,it's not changed with the time of local machine. I found the date() cannot do this. That's exactly what date() does... the date and time from the server. Maybe you're using it wrong. ---John Holmes... -- PHP General

Re: [PHP] pattern matching for the dot-sign

2003-06-05 Thread CPT John W. Holmes
I am looking for a way to replace . (=dot) to , in a string with either ereg_replace or preg_match . I read the manual in PHP on Pattern matching for preg_match but could not immediately trace it. All help appreciated. If that's all you need to do, use str_replace(). ---John Holmes... --

Re: [PHP] Is gd present?

2003-06-05 Thread CPT John W. Holmes
$gd_loaded = (extension_loaded('gd'))?1:0; Well, this also fails the simple-as-possible test: if the value returned by extension_loaded() can be used to drive the ?: operator, it must be evaluable as a Boolean; this means you can use it directly for later use in an if() or similar

Re: [PHP] Displaying links only when page is loaded on local site?

2003-06-05 Thread CPT John W. Holmes
Just curious to know if anyone knows of a way of displaying a set of links on a page only when that page is loaded on my local development machine and not when it's loaded by the general internet public on my remote host's machine? I have several background content editing pages which would

Re: [PHP] How do I display new lines in a textearea?

2003-06-06 Thread CPT John W. Holmes
I want to have a textarea that contains details read from a mysql table, but I want to echo each row so that it is on a new line. What is the new-line character for a textarea? ( in effect the reverse of nl2br() A newline is \n $text = word\nword\nword\n; echo textarea$word/textarea; will

RE: [PHP] Do not display page errors...

2003-06-06 Thread John W. Holmes
, because PHP is server side of course... ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

RE: [PHP] Allowing punctuation marks in regular expressions

2003-06-06 Thread John W. Holmes
I tried adding a period to the end but a string will a period still returns false function is_alphanumeric($string) { return (preg_match(/^[A-Za-z0-9.]+$/i, $string)); } No it doesn't. It's not allowing spaces, though... Is that the problem? ---John W. Holmes... Amazon Wishlist

RE: [PHP] Gracefully dealing with Cookies OFF

2003-06-06 Thread John W. Holmes
you from session IDs being sniffed from a network. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net

RE: [PHP] [FYI] phpbooks.com

2003-06-06 Thread John W. Holmes
we set up a new resource for organizing all books on PHP in a quick-to- scan, Google-like center. Hope you enjoy it. http://www.phpbooks.com There's more than that, isn't there? Also the PHP/MySQL Programming for the Absolute Beginner book shows a picture of a Perl book... :) ---John W

RE: [PHP] Software Testing and Internationalization - Free book by LISA/Lemoine International

2003-06-06 Thread John W. Holmes
statement on the page where you collect all of our info? ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net

RE: [PHP] Linux vs. Windows

2003-06-06 Thread John W. Holmes
on this one, since PHP runs quite fast on Win2K with IIS and PHP as an ISAPI. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List

RE: [PHP] new window

2003-06-06 Thread John W. Holmes
From: Adriaan Nel [mailto:[EMAIL PROTECTED] How do I open a new window from php? Click on File and then New. That will open a new text window for you to type PHP code. Or are you asking an HTML/Javascript question on a PHP list?? ---John W. Holmes... Amazon Wishlist: http://www.amazon.com

RE: [PHP] Problem Display of data

2003-06-06 Thread John W. Holmes
that when submitted does nothing? A little help here... ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net

RE: [PHP] php4isapi.dll and header(Location: ...)

2003-06-06 Thread John W. Holmes
with IIS and have never had an issue. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Fetch Array Problem

2003-05-27 Thread CPT John W. Holmes
Your query more than likely failed. If you had proper error checking, you'd of seen this already. Check mysql_error() after your query to see what the error is: $rs = mysql_query($query) or die(mysql_error()); or $rs = mysql_query($query); if($e = mysql_error()) { echo Error occurred: $e; }

Re: [PHP] Where's the cookie file?

2003-05-27 Thread CPT John W. Holmes
sessions, on my server, go into /tmp. Doesn't there have to be a similar file saved on the server for setcookie? All I know is mine aren't in /tmp No, cookies are saved on the client. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] thumbnails

2003-05-29 Thread CPT John W. Holmes
I know thumbnails have been discussed and I have looked at the archives, I am just looking for opinions. I am doing a small website for a used vehicle dealer. I need to make it as easy as possible for him to add new vehicles. I plan to just give him a form for the information, and a place to

Re: [PHP] sessions and domains

2003-05-29 Thread CPT John W. Holmes
You'd really only have to pass the session ID to the other domains, since all of the session files are located in the same directory. So, when linking to one of the other domains, just include SID in the URL or form. Should be painless. echo 'a href=http://www.otherdomain.php/page.php?'.SID.'Link

Re: [PHP] strtr question

2003-05-29 Thread CPT John W. Holmes
I want to remove unwanted characters from filenames of files uploaded to our server. I am currently using strtr to do this. I have a few characters that are being removed but I would also like a single quote to be removed if it is in the filename. I think it has to be escaped in the command

Re: [PHP] Checking if an array key exists

2003-05-29 Thread CPT John W. Holmes
I have a multi-dimensional array. Looks like this: $work_order_hdr = array ('whdr_id'='record_no', 'whdr_order_no'='request_no', 'whdr_site_id'='site_id', 'whdr_user_id'='user_id',

<    5   6   7   8   9   10   11   12   13   14   >