RE: [PHP] What do I do wrong?

2003-03-13 Thread John W. Holmes
could be wrong. ---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] Will this do what I think it will?

2003-03-13 Thread John W. Holmes
. ---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] ^M in PHP

2003-03-13 Thread John W. Holmes
-suggestion-what-I-use-is-best-and-it-does-this-and-that-whic h-the-other-ones-don't-oh-and-by-the-way-mine-is-free/cheap/easy/opensou rce-too war, okay. Search the archives, there are plenty of recommendations. :) ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy

RE: [PHP] ^M in PHP

2003-03-13 Thread John W. Holmes
it was saved on Windows? You could read in the file and get rid of all of the \r characters with str_replace(). ---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

RE: [PHP] preg_replace question,

2003-03-13 Thread John W. Holmes
$value? ---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] Checkboxes

2003-03-13 Thread John W. Holmes
a number of bullets representing the items I check but no value! What is $fskill? Did you forget to update your code? echo li{$_POST['skill'][$i]}/li\n; ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General

Re: [PHP] Will this do what I think it will?

2003-03-14 Thread CPT John W. Holmes
] Will this do what I think it will? Well, it didn't work, and I wrote it because I'm unfamiliar with regex's. John W. Holmes wrote: I call this file 'clean_gpc.php'. Will it: // trim all control codes and spaces from ends of string // standardize Window's CRLF

RE: [PHP] date

2003-03-14 Thread John W. Holmes
If I have a date in this format :19-MAR-03 how do I get the next date (the date plus 1)? echo strtoupper(date('d-M-y',strtotime($date +1 day))); But why do you have it in that format to begin with? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy

RE: [PHP] preg_replace question,

2003-03-14 Thread John W. Holmes
the current function been put in place replaces [f1253f] with a file, for inside cms content , where 1253 is the key or the id of the filename in the database , therefore to denote its an ftool they added f's around the keys , so maybe i could get away with [1253], what else i'm asking if

Re: [PHP] php/mySQL time comparison

2003-03-14 Thread CPT John W. Holmes
$timeFrom and $timeTo need to be surrounded by quotes within your SQL query for the format you're using. $query = select * from Job_TB where teamNo = $teamNo AND startTime = '$timeFrom' AND endTime = '$timeTo'; ---John Holmes... - Original Message - From: Brad Wright [EMAIL PROTECTED]

Re: [PHP] php/mySQL time comparison

2003-03-14 Thread CPT John W. Holmes
Try quoting your dates - you could also edit your code by using the BETWEEN SQL keywors. Using the less than / greater than method is slightly faster and probably more portable. I don't know how many databases implement BETWEEN. ---John Holmes... -- PHP General Mailing List

Re: [PHP] Newbie MySQL INSERT Q

2003-03-14 Thread CPT John W. Holmes
Can I have a single SQL string do INSERTS into multiple tables? No. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with sessions expiring?

2003-03-14 Thread CPT John W. Holmes
Session files will be cleaned up after 24 minutes by default. So if they take longer than that, and the garbage collection deletes their session file, then they are no longer logged in. Increase the session.gc_maxlifetime parameter in php.ini ---John Holmes... - Original Message - From:

RE: [PHP] PHP User Groups

2003-03-15 Thread John W. Holmes
Jersey (USA) Check http://php.meetup.com/ for your area. ---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] Encoding /'s

2003-03-15 Thread John W. Holmes
When my PHP page sends text that is being passed in, it places an / in front of the apostrophe. How do I encode or decode this when I am outputing the variable? www.php.net/stripslashes They are added to GET, POST, COOKIE data according to the magic_quotes_gpc setting in php.ini. ---John W

RE: [PHP] Arrays

2003-03-16 Thread John W. Holmes
)', 'ReferenceURL' = 'AU__Author(s).jsp', ) ) What I want to get is the keys 'AN' and 'AU' as values. while (??){ echo This key is $var[??]br; } This key is AN This key is AU foreach($var as $key = $value) { echo The key is $key; } ---John W. Holmes... PHP Architect - A monthly

RE: [PHP] Scrolling through values sent from a form[scanned]

2003-03-16 Thread John W. Holmes
Don't rely on checkboxes. If they are not checked, as you've found out I think, then the value is not set at all. Use a hidden value to carry over a key for each field, then check the checkbox to see whether it was checked or not. ---John W. Holmes... PHP Architect - A monthly magazine for PHP

RE: [PHP] passing values from one script to another script

2003-03-16 Thread John W. Holmes
, each request is unique, so if you want to carry something over, you have to include it in the next request. This means adding it to the URL ($_GET) or adding it to a form ($_POST), adding it to a cookie ($_COOKIE), or putting it in the session ($_SESSION). ---John W. Holmes... PHP Architect

RE: [PHP] RE: ignore html

2003-03-16 Thread John W. Holmes
nl2br() to the data. It will leave everything else along. Adapt to your needs, there may be better methods... ---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] fopen

2003-03-16 Thread John W. Holmes
='/images/mappics/$mapname.jpg'/a; } else { $mappic = img border=\0\ src='/images/noimage.gif'; } @fclose ( $fp ); echo $mappic; How about using file_exists() to check, rather than trying to open it? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your

RE: [PHP] Really simple string search question

2003-03-16 Thread John W. Holmes
Here's 3 examples: $var=www.google.com; $var=blah blah google blah; $var=google rules; Now I just want to see if $var contains the word 'google' in it - which www.php.net/strstr ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http

RE: [PHP] regex problem

2003-03-16 Thread John W. Holmes
; } ? ---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] Access DB PHP

2003-03-16 Thread John W. Holmes
the script ends or is stopped or whatever. www.php.net/register_shutdown_function ---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] RE: muliple form array values

2003-03-16 Thread John W. Holmes
in text box } ---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] Using PHP to get a word count of a MSword doc

2003-03-16 Thread John W. Holmes
the above link; I have no idea about the program. There may be better ones out there... ---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] sorting results in PHP

2003-03-17 Thread John W. Holmes
BY clause. ORDER BY date_column DESC Which will order by year, month, then day. The order by is applied after the GROUP BY, which will accomplish the same thing that you're trying to do in PHP, only much faster. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get

RE: [PHP] stripping slashes before insert behaving badly

2003-03-17 Thread John W. Holmes
not sure what to modify to fix this so the literal slash is not written. You're running addslashes() twice, somehow. Magic_quotes_gpc is probably on and you're escaping the data again. I would think PEAR would account for that, but I guess not. ---John W. Holmes... PHP Architect - A monthly

RE: [PHP] Working with dates

2003-03-17 Thread John W. Holmes
I have two variables, $StartDate and EndDate that contain values read from MySQL Date fields. How can I determine if a value entered by the user is between the two dates? I'm using PHP 4.0.6. I think you can take MySQL timestamps directly into strtotime(). If($user strtotime($StartDate)

Re: [PHP] What is the difference: include()

2003-03-17 Thread CPT John W. Holmes
What is the difference as in... why one or the other? include('somefile.php'); include(somefile.php); Just wondering... No difference as far as include() goes. Read the manual on strings to see how PHP treats strings in single and double quotes differently. ---John Holmes... -- PHP

Re: [PHP] What is the difference: include()

2003-03-17 Thread CPT John W. Holmes
If you had a constant named somefile or php and you use the second syntax, the constant would be interpolated/evaluated to the value of the constant. Generally I always use single quoted strings unless there's some need for double-quoted strings (like if I want to embed a variable) so

Re: [PHP] copy ...

2003-03-17 Thread CPT John W. Holmes
What about eregi(TI(.*)¶,$line,$m) might want to use eregi(TI([^¶]*)¶,$line,$m) so it's not greedy. ---John Holmes... - Original Message - From: John Taylor-Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, March 17, 2003 2:31 PM Subject: Re: [PHP]

Re: [PHP] copy ...

2003-03-17 Thread CPT John W. Holmes
, March 17, 2003 2:54 PM Subject: Re: [PHP] copy ... Captn John, What the difference? I recognise the code from my attempts at Perl. What's the diff between ^ and *? Is there a doc I can read up more on? ;) Swabbie John Cpt John W. Holmes wrote: What about eregi(TI(.*)¶,$line,$m) might

Re: [PHP] How to manipulate a Access database(MDB file) with PHP.

2003-03-17 Thread CPT John W. Holmes
How to manipulate a Access database(MDB file) with PHP. How do I do it? I was expecting a link or something to help me. Or is that your question... ?? Notice the question marks at the end of my questions? ;) ---John Holmes... PS: This question was already asked today... search google or the

Re: [PHP] What's this _FILE junk?

2003-03-17 Thread CPT John W. Holmes
Is enable file uploads turned on in php.ini?? ---John Holmes... - Original Message - From: Pete James [EMAIL PROTECTED] To: Liam Gibbs [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, March 17, 2003 3:33 PM Subject: Re: [PHP] What's this _FILE junk? Is your form enctype set? Like

RE: [PHP] documentation on pg_escape_string()

2003-03-17 Thread John W. Holmes
doing. ---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] Ereg sass

2003-03-18 Thread CPT John W. Holmes
If you want to look for a dash (-), you always place it last in the brackets, other wise the regex machine will be looking for a range. So just move the - to the last character. [A-Za-z0-9_.-]* ---John Holmes... - Original Message - From: Liam Gibbs [EMAIL PROTECTED] To: php list [EMAIL

Re: [PHP] what's the best way to handle this?

2003-03-18 Thread CPT John W. Holmes
When a user 'registers' with our site, I want to generate their personal webpage for them. Currently, I have a webpage where the contents are generated from their personal info in the db and I have a drop down to view client pages but it is just the same page but I pass in the clientid so it

Re: [PHP] Register_globals question

2003-03-18 Thread CPT John W. Holmes
I found a class that allows you to have a multiple page listing, where it displays a certain number of items, and then you click on the next page to show the next results. I found that it needs to have register_globals turned on. I am learning, and would like to have someone look at the class

Re: [PHP] Mysql Query Question

2003-03-18 Thread CPT John W. Holmes
$string = ' . implode(',',$group) . '; $query = SELECT * FROM table WHERE groupname IN ($string); ---John Holmes... - Original Message - From: Van Andel, Robbert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 18, 2003 3:51 PM Subject: [PHP] Mysql Query Question I am

RE: [PHP] I.P. range authentication

2003-03-18 Thread John W. Holmes
help the OP. http://www.php.net/manual/en/function.ip2long.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://www.php.net/unsub.php

RE: [PHP] Posting Query Results to an HTML form

2003-03-18 Thread John W. Holmes
, but there is an HTML trick that you can use: putting quotes around your values! input type=text name=name value=value 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

RE: [PHP] remove ' from string

2003-03-19 Thread John W. Holmes
Any functions to remove'from a longstring? Care to say why you need to do this? You may be doing a workaround instead of a solution... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing

RE: [PHP] Need help with coding problem

2003-03-19 Thread John W. Holmes
dollar signs on your variables here... if (!$paiddate1) { $daysout = $differencedays1; } else { $daysout = $diffdays; } if ($daysout 29) { echo You cannot add this product as your account is 30 days past due; exit; } ---John W. Holmes... PHP Architect - A monthly

RE: [PHP] LIsting all the Members who have not loged in for 60 days ...

2003-03-19 Thread John W. Holmes
$lastDate is a unix time stamp in mySql ... how can i list ONLY the users who have not logged in for 60days? SELECT name FROM table WHERE FROM_UNIXTIME(lastDate) CURDATE() - INTERVAL 60 DAY ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today

Re: [PHP] Posting Query Results to an HTML form

2003-03-19 Thread CPT John W. Holmes
No, there's no PHP function, but there is an HTML trick that you can use: putting quotes around your values! input type=text name=name value=value That's not a trick, that's actually required with HTML 4 and up. And XML... Umm.. yeah, got that. I was being sarcastic. ;) ---John

Re: [PHP] PHP and IIS 5.0

2003-03-19 Thread CPT John W. Holmes
I am putting together a website for a customer who insists on using IIS running on Windows XP and I'm running into some problems. It appears that no matter what PHP script I run, I'm getting tons of errors saying this variable or that variable is undefined. I have global variables turned on in

RE: [PHP] PHP and IIS - More info

2003-03-19 Thread John W. Holmes
']; Another one is: echo $HTTP_ENV_VARS[QUERY_STRING]; There is no 'login' or 'password' index in the $HTTP_SESSION_VARS array. How are you registering these variables? Try using the new method with $_SERVER. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy

RE: [PHP] MySQL Date

2003-03-19 Thread John W. Holmes
')) (notice the second equals sign!) ---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] Anybody have any thoughts on Smarty?

2003-03-19 Thread John W. Holmes
://sepodati.realxl.net (admin password is 'password'). I've never used it in a mixed developer/designer environment. I don't know how effective it is at that. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General

Re: [PHP] PHP and IIS - More info

2003-03-19 Thread CPT John W. Holmes
Further note that it is not just this script, but many PHP scripts that I run on IIS - they all work perfectly on Apache (on Windows and Linux).. HOW DOES IT NOT WORK!? ---John Holmes... - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Beauford.2002' [EMAIL

Re: [PHP] $array_nam[$variable][0]

2003-03-19 Thread CPT John W. Holmes
$var = $array_name[$var2][0]; where $var2 is an integer. I've got this array from a database and I want to use a variable in the array... what's the exact syntax of this? That is the correct syntax. Use print_r() on $array_name to see what it contains. ---John Holmes... -- PHP General

RE: [PHP] convert VARCHAR 10 to DATETIME

2003-03-19 Thread John W. Holmes
(old_date,'/',2)); Hope that helps. ---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] strip single quotes

2003-03-19 Thread John W. Holmes
have an error in your SQL syntax near 's 800 number.'' at line 1 You need to use addslashes() on any string you insert into your query. ---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] Cleaning user data

2003-03-19 Thread John W. Holmes
it in the database. Bottom line, as you hopefully know, VALIDATE EVERYTHING! ---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] Dynamic variables (with method=post)

2003-03-19 Thread John W. Holmes
correctly... ---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] Date Conversion

2003-03-19 Thread John W. Holmes
date() function. The ' ... ' would be the pattern to create '19th March 2003' ---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

RE: [PHP] Cleaning user data

2003-03-19 Thread John W. Holmes
, but the end result should be that I should see exactly what I typed into the text box. If you need to allow formatted text, then use something like BBcode where you can specify exactly what is allowed. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today

Re: [PHP] Cleaning user data

2003-03-20 Thread CPT John W. Holmes
--- John W. Holmes [EMAIL PROTECTED] wrote: I disagree. I think stripping HTML from my text is a horrible thing. If I want to put a b in my text, then use htmlentities() and show me a b when I look at it. Obviously you don't want to evaluate HTML, but the end result should be that I

RE: [PHP] Cleaning user data

2003-03-20 Thread John W. Holmes
a href, you tell them to just use [url]. It's slightly easier, but doesn't offer any additional features... ---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] php, mysql, and method question

2003-03-20 Thread John W. Holmes
this? Just not sure. Maybe not with a database at all? Can't you just add a TIMESTAMP column, ORDER BY that DESCending, and LIMIT to 9 results?? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing

Re: [PHP] Built in source encode function..

2003-03-21 Thread CPT John W. Holmes
There are programs out there that do this for you. Buy/use them if you feel you need to. I don't. ---John Holmes... - Original Message - From: Awlad Hussain [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 21, 2003 8:58 AM Subject: [PHP] Built in source encode function.. I

Re: [PHP] detecting end of line - php 4.1.2

2003-03-21 Thread CPT John W. Holmes
I am trying to get php 4.1.2 to read a Mac file (exported from FileMaker Pro) and split it into different lines using the following but php does not recognize the end of line. For some tech reason I cannot upgrade php now but I need to be able to read my Mac files now. What is the easiest

RE: [PHP] who is on the page?

2003-03-23 Thread John W. Holmes
will be adequate for your needs. ---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] numbers problem

2003-03-23 Thread John W. Holmes
countries use a comma for a decimal separator and the period as the thousands separator. You must validate everything from the user and format it to match what you need and reject everything else. Plain and simple. :) ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals

RE: [PHP] htaccess writable by httpd

2003-03-23 Thread John W. Holmes
is this a dangerous feature ? Depends what kind of server you're on to start with. If you have a dedicated server, then it's not as big of a deal. If you're on a shared server, then anyone else on that server can write your .htaccess files for you (generally). ---John W. Holmes... PHP

RE: [PHP] Re[2]: [PHP-DB] mysql timestamps

2003-03-24 Thread John W. Holmes
Yeah, sorry, it's the UNIX_TIMESTAMP() function you want. FROM_UNIXTIME() will convert a Unix timestamp to a MySQL timestamp, also. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Don

Re: [PHP] Hidden new line markers?

2003-03-24 Thread CPT John W. Holmes
nl2br() doesn't remove the newlines, it simply adds in the br / in before them. The str_replace should work, how are you trying to use it? ---John Holmes... - Original Message - From: Jeff Lewis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 2:56 PM Subject: [PHP]

Re: [PHP] looking for advice on PHP server

2003-03-24 Thread CPT John W. Holmes
My server has cURL built into its php module, but it doesn't support SSL, and thus doesn't support requests to secure servers, i.e. https. It was an effort in itself to get them incorporate cURL, and I was just wondering if I should move immediately to a new host - if this were just

Re: [PHP] Hidden new line markers?

2003-03-24 Thread CPT John W. Holmes
The data is being entered into a textarea and is being stored as it is entered but with an addslashes right before insertion. On the extract I am doing the following: $row[description] = stripslashes($row[description]); You don't have to use stripslashes() on data coming out of a database

Re: [PHP] mail() Bcc:

2003-03-24 Thread CPT John W. Holmes
From: Oden Odenius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:44 PM Subject: [PHP] mail() Bcc: How can send bcc: with mail()? - Original Message - From: Bryan Brannigan [EMAIL PROTECTED] To: Oden Odenius [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent:

Re: [PHP] mail() Bcc:

2003-03-24 Thread CPT John W. Holmes
How can send bcc: with mail()? From, CC and BCC are headers to be set in the fourth parameter of the mail() function. Headers must be spearated by end-of-line characters. $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; mail($to, $subject, $body,

Re: [PHP] session id

2003-03-25 Thread CPT John W. Holmes
can somebody tell me why I am getting this: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on line 21 Warning: session_start()

Re: [PHP] Persistent connections with mysql_pconnect()

2003-03-25 Thread CPT John W. Holmes
no, not at all... but there is a time and a place, and i don't think you should use pconnect just because you don't want to an include at the top of every page. You still have to call pconnect() on every page if you use it. It doesn't leave it open for other requests, it leaves it open within

Re: [PHP] Checking for existence of file

2003-03-25 Thread CPT John W. Holmes
What I'd like to do is check the directory 'images' first to see if 'mast_$img_pick.jpg' exists and if it doesn't, call a different image such as 'mast_default.jpg'. I'm sure this isn't hard, I'm just not sure how to start. Maybe you can start with file_exists() or is_file() and somehow work

Re: [PHP] formatting textarea input on output

2003-03-25 Thread CPT John W. Holmes
i have a textarea in a form which gets inserted into a table in my database (mySQL). When displaying this text back to the screen, how do i retain the line breaks etc. that were in the original input? I bet if you searched for textarea and line breaks you'd of found the nl2br() function... but

Re: [PHP] formatting textarea input on output

2003-03-25 Thread CPT John W. Holmes
/** * converts line break and spaces to page break * * @access public */ function nlbr($string) { return preg_replace(/(\r\n|\n|\r)/, br\n, $string); } ummm www.php.net/nl2br() ?? Start a new thread for your question, don't hijack someone else's thread. ---John Holmes...

RE: [PHP] Disabling output control when using ob_start

2003-03-25 Thread John W. Holmes
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php What if you use something like: Ob_start(dummy); Function dummy($string) { return $string; } Which basically does nothing... ---John W. Holmes... PHP Architect - A monthly magazine for PHP

RE: [PHP] variables??

2003-03-25 Thread John W. Holmes
It is considered more secure to declare the variable explicitly. $var = $_GET[var]; Ummm... that's the same result as having register_globals on (basically). You're not helping anything and it's certainly not any more secure. ---John W. Holmes... PHP Architect - A monthly magazine for PHP

RE: [PHP] Default setting garbage

2003-03-25 Thread John W. Holmes
it itself, it ends up with nothing in it. empty() returns 1, while isset() returns nothing on this. I'll guess that you're trying to access $frequency outside of the function, after you've called it, right? If so, read up on variable scope in the manual. ---John W. Holmes... PHP Architect

RE: [PHP] Changing variables in a text file

2003-03-25 Thread John W. Holmes
read the entire file into a string. If you know you're looking to match $template, then you can use a preg_replace() call. $new_value = red; preg_replace('/\$template=[^];/','$template='.$new_value.';',$text) ; or something similar. Adapt to your needs. ---John W. Holmes... PHP Architect

RE: [PHP] Benchmarking

2003-03-25 Thread John W. Holmes
the time at the end of your script from the time at the beginning. Check your web server logs for the resources question. I don't know of any PHP way to do it. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP

RE: [PHP] Difference between months

2003-03-25 Thread John W. Holmes
do this? One way... $date1 = 2003-12; $date2 = 2002-08; $d1 = explode('-',$date1); $d2 = explode('-',$date2); $diff = ($d1[0]*12+$d1[1]) - ($d2[0]*12+$d2[1]); ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP

RE: [PHP] variables??

2003-03-25 Thread John W. Holmes
exactly $_GET['var'] contains and how you're using it. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 8:15 PM To: [EMAIL

Re: [PHP] help with preg_replace please

2003-03-26 Thread CPT John W. Holmes
I get the following error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /usr/local/apache/htdocs/lib/lib_string.inc on line 218 Using this code: $str = preg_replace(!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/=])!ei, a href=\{$1}://{$2}{$3}\{$2}{$3}/a, $str); Since

Re: [PHP] Default setting garbage

2003-03-26 Thread CPT John W. Holmes
I'll guess that you're trying to access $frequency outside of the function, after you've called it, right? If so, read up on variable scope in the manual. No, I'm trying to access it inside the function. This is what I have (or an example, since I don't have it right in front of me right

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
is it possible to have a checkbox that if it is specified to be checked when the page is being formulated then it cannot be unchecked? No. No... No. If you already know you don't want it to be unchecked, then don't show a checkbox. That's why we have PHP, so you can create your page

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
On Wednesday 26 March 2003 01:43 pm, CPT John W. Holmes wrote: is it possible to have a checkbox that if it is specified to be checked when the page is being formulated then it cannot be unchecked? No. No... No. If you already know you don't want it to be unchecked, then don't show

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
But isn't it so much easier to type in that one line HTML + javascript than trying to get an image of a checked check box.. unless you have that handy, you'd have to eg. take a snapshot, or draw something, then save the file as an image file...hmm... and as you said, the effect will

RE: [PHP] auto_prepend_file

2003-03-26 Thread John W. Holmes
to error.php and you'll eventually hit a limit where your web server or browser will stop. :) ---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] Mail Header - id this PHP

2003-03-26 Thread John W. Holmes
PROTECTED] Reply-to: [EMAIL PROTECTED] Use \r\n between all of your headers (at the end of your strings, above). Just using \n will not work. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List

RE: [PHP] html_quickform - array question

2003-03-26 Thread John W. Holmes
echo The month: $thedate['m']; echo The month: {$thedate['m']}; or echo The month: $thedate[m]; ---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

Re: [PHP] php and Perl

2003-03-27 Thread CPT John W. Holmes
www.php.net/virtual ---John Holmes... - Original Message - From: Brad Wright [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Thursday, March 27, 2003 8:00 AM Subject: [PHP] php and Perl Hi all, can php call perl scripts? I know nothing of perl, but have found a perl

Re: [PHP] preg split question

2003-03-27 Thread CPT John W. Holmes
i'd like to split Benutzer_CRA.php to get CRA but sometimes the files are called Benutzer_OVE_CRA.php and therefore the result schould OVE_CRA how cann i tell preg_split to split the string at the first occurence of _ and before .php preg_match(/_(.*)\.php/,$str,$matches); $matches[1]

Re: [PHP] Removing columns from a text file

2003-03-27 Thread CPT John W. Holmes
I have a text file file ready to go into a Filemaker database. It has over 5000 rows, each containing over 500 columns. If I do a straight import I can only pull in the first 442 colums, but all records. I can't take it in via Excel for the same reason - column limit stops at 'IV' - never

RE: [PHP] split

2003-03-27 Thread John W. Holmes
I want to make a loop.Like $a = 123; //$a is One two threw not hundred... and i want to make for each $a then $b = $a + 2 The output will be. 3 (1+2) 4 (2+2) 5 (3+2) Any example? $a = 123; $c = ''; $b = strlen($a); for($x=0;$x$b;$x++) { $c .= $a{$x} +2; } echo $c; ---John W. Holmes

RE: [PHP] date math question

2003-03-28 Thread John W. Holmes
and see which is faster... ---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] Anything that is changed when the browser is closed

2003-03-28 Thread CPT John W. Holmes
While your script is running, you can use connection_aborted() to see if the user has clicked the stop button or closed the window. After your script finishes, though, then you have no way of knowing unless you use a session cookie, which will be destroyed when the browser is closed. ---John

Re: [PHP] Session Theft

2003-03-28 Thread CPT John W. Holmes
i just want to figure out a way by which i can stop session theft.i thought if i can get something from user end that is unique for that user.for e.g. his/her IP .but it will not work when they are behind firewall.they will be assigned same IP.is there a way for me to get the IP

Re: [PHP] Get the HTTP Server Username

2003-03-28 Thread CPT John W. Holmes
Is there anyway to get the HTTP Server Username (something like $_SERVER['username']) I tried printing all the variables defined in a page (and looking at a phpinfo.php) and wasn't able to figure it out... Do you mean the user your web server is running as? You should already know that...

Re: [PHP] Is there a PHP for Dummies?

2003-03-28 Thread CPT John W. Holmes
I'm really tired of trying to figure out the PHP manual and need something that explains things in plain straight forward English. Like get_magic_quotes_gpc() for example - the manual says how to use it and what it returns - but nowhere can I find out what it's for. Does it count sheep, do a

<    10   11   12   13   14   15   16   17   18   19   >