[PHP] Coding Question

2004-12-05 Thread Al
I've searched the PHP manual and can't find an answer for this question I'd like to use the OR DIE construct; but instead of DIE I'd like to use RETURN FOO. I haven't found a way to do it. $string= file_get_contents($filename) OR die(Could not read file); $db_link= mysql_connect($host,

[PHP] Is there a shorthand way to...?

2004-11-22 Thread Al
When handling $_POST[] values that may or may not be assigned, I am forever using: if((isset($_POST['courses_list']) AND $_POST['courses_list']== 'Used')) Is there a shorthand way of doing this without causing notice errors? Thanks. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Error logging problem

2004-11-10 Thread Al
Greg Donald wrote: On Wed, 10 Nov 2004 10:49:29 -0500, Al [EMAIL PROTECTED] wrote: ini_set(error_log, /AutoSch/error.log); Looks like this might be a path relative to your domain or your vhost definition? I'd go with a full system path if that's the case. Hey Greg, that did it. It's obvious now

[PHP] Multiple session_start()s / Is it a problem??

2004-11-10 Thread Al
. Of course I can simply use @session_start() to negate the Notice; but, I want to be certain this is good practice. Al. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Error logging problem

2004-11-10 Thread Al
My site is on a virtual host and I'd like to log errors to a file while I'm debugging. Can't get it to work. Here is the code at the top of my script: ini_set(display_errors, on); //also tried Off ini_set(error_log, /AutoSch/error.log); $ini_array= ini_get_all();

[PHP] Re: blank function parameters

2004-11-03 Thread Al
Giles Roadnight wrote: Hello If I defined a function with 4 parameters but only pass 3 I get an error. Is there anyway around this? I want to be able to set the missing parameter to a default value if it is not passed which works ok but How do I get rid of the error message? Thanks Giles

[PHP] session_save_path

2004-10-07 Thread Al
My virtual host eliminated the common session tmp folder which forces me to set up one in my area. I'm trying to come up with the best, considering: Custom php.ini; resisting because having to make certain it is always in sync with host's changes. Tried adding to htaccess: php_value

Re: [PHP] session_save_path

2004-10-07 Thread Al
John Holmes wrote: Al wrote: Tried adding to htaccess: php_value session.save_path /www/u/username/htdoc/session Hoping it would override php.ini. Got a server error 500. Try putting quotes around the path and this should work, providing your ISP allows .htaccess files. I'm guessing

Re: [PHP] session_save_path

2004-10-07 Thread Al
a server error 500. -Original Message- From: Al [mailto:[EMAIL PROTECTED] Sent: Thursday, October 07, 2004 8:25 AM To: [EMAIL PROTECTED] Subject: [PHP] session_save_path My virtual host eliminated the common session tmp folder which forces me to set up one in my area. I'm trying to come up

Re: [PHP] session_save_path

2004-10-07 Thread Al
John Holmes wrote: Al wrote: Tried adding to htaccess: php_value session.save_path /www/u/username/htdoc/session Hoping it would override php.ini. Got a server error 500. Try putting quotes around the path and this should work, providing your ISP allows .htaccess files. I'm guessing

[PHP] Question about error_reporting()

2004-10-01 Thread Al
If I place this at the top of my script file, the page just hangs. error_reporting (E_ERROR | E_WARNING); A virtual host on a Unix/Apache system. Runs fine without the error_reporting(). The default system error reporting only shows E_ERRORS, so I wanted to see warnings also. Thanks -- PHP

Re: [PHP] Question about error_reporting()

2004-10-01 Thread Al
Greg Donald wrote: On Fri, 01 Oct 2004 10:36:28 -0400, Al [EMAIL PROTECTED] wrote: If I place this at the top of my script file, the page just hangs. error_reporting (E_ERROR | E_WARNING); A virtual host on a Unix/Apache system. Runs fine without the error_reporting(). The default system error

[PHP] Book recommendation

2004-09-21 Thread Al
How can get Edit/Mail Newsgroups/Composition/defaults for Html to work? Edit/Mail Newsgroups/Send Format/Send in HTML is checked. All newsgroups and emails default to plain small text. Is this a bug, or am I missing something? Thanks.. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Book recommendation

2004-09-21 Thread Al
John Nichel wrote: Al wrote: How can get Edit/Mail Newsgroups/Composition/defaults for Html to work? Edit/Mail Newsgroups/Send Format/Send in HTML is checked. All newsgroups and emails default to plain small text. Is this a bug, or am I missing something? Thanks.. Huh? Sorry everyone. I

[PHP] Need help with using htaccess to override php.ini error settings

2004-08-24 Thread Al
I need to active php error level Warning and log the errors in a file for my whole Apache virtual website. It is clear how to do everything on a script-by-script basis; but, I need to do it across the site. I can't find any direct documentation to help. The php manual and Apache directives

Re: [PHP] Need help with using htaccess to override php.ini error settings

2004-08-24 Thread Al
with and without the quotes, etc. John Holmes wrote: From: Al [EMAIL PROTECTED] I need to active php error level Warning and log the errors in a file for my whole Apache virtual website. It is clear how to do everything on a script-by-script basis; but, I need to do it across the site. http

Re: [PHP] Need help with using htaccess to override php.ini error settings

2004-08-24 Thread Al
: From: Al [EMAIL PROTECTED] Per the documentation, error_reporting must use the bitmask values form. And, that works great. However, I can't get the errors to log in a special file. They insist on being logged in the system's error log file. There is a log_errors setting and a error_log setting

Re: [PHP] Need help with using htaccess to override php.ini error settings

2004-08-24 Thread Al
24 August 2004 23:37, Al wrote: The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log ./errors.txt[and the full

Re: [PHP] Need help with using htaccess to override php.ini error settings

2004-08-24 Thread Al
24 August 2004 23:37, Al wrote: The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log ./errors.txt[and the full path

Re: [PHP] Need help with using htaccess to override php.ini error settings

2004-08-24 Thread Al
24 August 2004 23:37, Al wrote: The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log ./errors.txt[and the full path

Re: [PHP] Need help with using htaccess to override php.ini error

2004-08-24 Thread Al
test Al wrote: The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log ./errors.txt[and the full path string] John

Re: [PHP] Need help with using htaccess to override php.ini error settings

2004-08-24 Thread Al
Everything is working, thanks to you and Jason. The key was that I had to provide a seed file since error_log only appends messages to an existing file and doesn't create one if it does not exist. Al John Holmes wrote: From: Al [EMAIL PROTECTED] php_value error_log /home/jones

[PHP] Re: Code elegance and cleanliness

2004-07-25 Thread Al
Not really knowing why you need to provide indexes for the array, since they are generated automatically if none are provided, I'd use: $imgBkgrnd = array( 'bkgrnd-default.gif', 'bkgrnd-positive.gif', 'bkgrnd-negative.gif' ); $imgNeeded = table['field']; $imgName = $imgBkgrnd[$imgNeeded]; The

[PHP] Re: HTML Escaping

2004-07-23 Thread Al
Look up heredoc in te php manual Robb Kerr wrote: I've got a conditional button that needs to appear/hide on my page depending upon the contents of a field in my database. The button is an image and has a long URL and JavaScript for image rotation attached to it. Needless to say, the href is quite

[PHP] Re: silly question: an IDE for php?

2004-07-18 Thread Al
A terrific IDE editor. Is a low cost shareware. http://www.waterproof.fr/ Zhang Weiwu wrote: Not to start flame. I have been writing php using just vim for some time, it is a waste of time to put 'echo' statement everywhere to track variable values. I wonder what do the experienced users on

[PHP] Re: Determine whether $_GET has a value

2004-06-24 Thread Al
You need to be specific about what you consider to be a legitimate value for your application. consider: $var= $_GET['myname']; if((preg_match(/([0-9]|[a-z]|[A-Z]/, $var) { Do something } No spaces and watch the | between the ] and the [ If $myname has at least one number or character, there

[PHP] Regular Expressions Tester/designer

2004-06-19 Thread Al
Anyone know of a good regular expressions tester/designer for php coding running windows. I've looked at the Rad Software Regular Expressions Designer and it looks pretty good except that it is intended for .net and it really doesn't seem to be entirely PCRE compatible. Thanks -- PHP

[PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
I posted this previously; but the subject was misleading. I could use one additional clarification regarding good practice. As I understand the php manual the following is acceptable and I assume good practice. $foo= TRUE; if($foo) do.. ; where $foo is a binary; but not a variable.

[PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
I posted this previously; but the subject was misleading. I could use one additional clarification regarding good practice. As I understand the php manual the following is acceptable and I assume good practice. $foo= TRUE; if($foo) do.. ; where $foo is a binary; but not a variable.

Re: [PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
That's a big help Mike. My server has the error level set such that my incorrect use of if($var) did not show undefined variables. Though everything seemed to work OK. I'm going my code and using if( TRUE or FALSE) isset() and empty() as appropriate. Al.. Mike Ford wrote: On 07 June

[PHP] A follow up on my question about good coding practice [isset]

2004-06-06 Thread Al
I could use one additional clarification regarding good practice. As I understand the php manual the following is acceptable. $foo= TRUE; if($foo) do.. ; where $foo is a binary; but not a variable. Use isset($var) for variables and be careful with $var= ' '; etc. because $var is

[PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Al
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] CONSTANTS and good coding practice

2004-05-21 Thread Al
Can someone explain to me the value of using defined custom constants, in the context of good coding practice. I don't recall ever seeing define() used in the scripts I've seen and only the characteristics are described in the my php book and the php manual; but, not the use. Thanks. --

[PHP] Re: CONSTANTS and good coding practice

2004-05-21 Thread Al
Many thanks everyone. Seems like I should be using constants a lot of places where I've been using globals. Al wrote: Can someone explain to me the value of using defined custom constants, in the context of good coding practice. I don't recall ever seeing define() used in the scripts I've

[PHP] newbie question about preg_match

2004-05-20 Thread Al
I'm trying to compose a general purpose text snip expression to extract a text segment from a string. Should this work for all reasonable cases? It seems to work for several test strings. $start= str1; $end= str2; preg_match (|$start (.*) ? $end |i, $contents, $text); $segment= $text[1];

Re: [PHP] newbie question about preg_match

2004-05-20 Thread Al
preg_match_all and use $text [1]. Thanks John W. Holmes wrote: From: Al [EMAIL PROTECTED] I'm trying to compose a general purpose text snip expression to extract a text segment from a string. Should this work for all reasonable cases? It seems to work for several test strings. $start

[PHP] Re: accessing $_POST from another page.

2004-05-15 Thread Al
Save the POST variables in $_SESSION buffers. Don't forget to 'start_session first thing on the page. Edward Peloke wrote: I have a page class which controls what happens within a given page. For example, the code in my index page is this: $page=new AdminPage(); $page-action($action);

Re: [PHP] SQLite /how can I install on an Apache virtual host?

2004-04-13 Thread Al
had some success using phpshell. Curt Zirzow wrote: * Thus wrote Al ([EMAIL PROTECTED]): I've got a website on an Apache virtual host and would like to install the SQLite library. Can someone give me a brief outline of what I need to do or point me to a good writeup? some info

[PHP] SQLite /how can I install on an Apache virtual host?

2004-04-12 Thread Al
I've got a website on an Apache virtual host and would like to install the SQLite library. Can someone give me a brief outline of what I need to do or point me to a good writeup? My host makes it tough to run command line code to make files, etc. I've found a a Linux binary [sqlite.so].

[PHP] Can I get varaibles from an include file without exectuting it?

2004-04-07 Thread Al
I have a script that is run with a cronjob and would like to fetch some variables from it, using another file, without the script executing. I could resort to putting the variables in a third file, or reading the script as a text file and reconstructing the variables. But, I was hoping there

[PHP] Finding orphan functions

2004-02-18 Thread Al
Anyone have a suggestion for how I can determine if I have any orphan functions in a function file? I have a include file with about 30 functions that I have been adding to for several months. No doubt some have been superseded, etc. and are now obsolete. I could laboriously trace every path

Re: [PHP] Another preg question

2004-02-15 Thread Al
Thanks for the feedback. Here was my problem; I misunderstood how the + worked. It only applies to the last \n, not both n\n. Hans Juergen Von Lengerke wrote: From: Al [EMAIL PROTECTED] $text= preg_replace(/\n\n+/, \n\n, $text); // remove excess This doesn't seem to do anything

[PHP] New Line code question \r\n etc.

2004-02-13 Thread Al
I've got a php application running on a Unix system and need some help with the new line code. The application reads and saves text in a file from a browser textarea. Also, the text file is occassionally opened and edited via ftp and a regular plain text editor. It appears the new line code

[PHP] Another preg question

2004-02-13 Thread Al
I'm trying to clean up newline code received from a browser textarea. First, I'm normalizing the newline codes to Unix with: $text= preg_replace(/(\r\n|\r)/, \n, $text); //this seems to work OK Next, I want to remove excessive CR/LF, [i.e. more than 2] $text=

Re: [PHP] Another preg question

2004-02-13 Thread Al
Didn't work. I'm beginning to think the problem is more involved. I am going to break out just the essentials of the code that is involved and debug just it. Thanks Matt Matijevich wrote: snip Next, I want to remove excessive CR/LF, [i.e. more than 2] $text= preg_replace(/\n\n+/,

[PHP] Re: Apache+modssl+php problem??? possible IE bug?

2004-02-13 Thread Al
Did you try print_r($_SESSION); to see if anything is getting into the buffer? Chris Wilson wrote: When in IE, submitting any form on our https page, the post variables intermittantly don't come through. The get variables come through fine. Just not the $_POST variables. I have tried

[PHP] Re: PHP EDITORS

2004-01-28 Thread Al
Great and it's free. http://phpedit.net John Jensen wrote: Hello everyone. I am new to PhP and MySQL. I was wondering what a good (Or Free) Php Editor is? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: content management

2004-01-26 Thread Al
) ? - -- This is one of the most frequently asked questions about the LAMP platform. A fantastic site that offers a comparison of all the different open source CMS systems out there and lets you test drive them all is http://www.opensourcecms.com/ . I highly recommend it. Hope it helps, Al -- PHP General

[PHP] Re: content management

2004-01-26 Thread Al
Justin French [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tuesday, January 27, 2004, at 04:23 PM, Al wrote: This is one of the most frequently asked questions about the LAMP platform. A fantastic site that offers a comparison of all the different open source CMS

[PHP] Ques: Conflicting functions in two include files.

2004-01-23 Thread Al
I have a page that calls functions from two different include files. Unfortunately, some of the functions have the same name; but are slightly different. I know I can change the names of the conflicting functions; but, that is a bit of a chore. Is it possible to control from which include

[PHP] Re: Comparison PHP to Perl

2004-01-06 Thread Al
at the documentation ... it's very user-friendly. [http://www.php.net/manual/en/] You'll also find a ridiculously large number of articles online comparing PHP to Perl, just do a Google search such as: [http://www.google.com/search?q=php+perl+comparison] Hope it helps, Al -- PHP General Mailing

[PHP] Re: Syntax Highlighting

2004-01-06 Thread Al
://www.beautifier.org/, a free PHP app that can syntax highlight a ridiculously large number of languages ... even Logo! Hope it helps, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP $_SESSION Expiring in IE

2004-01-03 Thread Al
IE and Moz have different JAVA script engines. Try turning off JAVA and see if IE maintains it's session. Tarrant Costelloe wrote: Hello, I have recently launched the new Planet-Tolkien.com, one would think that writing a message board from scratch and a dynamic weather system, a simple

[PHP] Session logic question

2004-01-02 Thread Al
I use the $_SESSION buffer extensively on my site without a problem, except one. Maybe someone can help me understand the problem. I have a simple page counter with a test to see if the page has been counted for the user. start_session(); * * [additional code] *

Re: [PHP] Session logic question

2004-01-02 Thread Al
Thanks for the reply. i just found the bug in my code. I had a statement in the second script: $_SESSION = $array; that obviously, completely replaced everything in the $_ SESSION buffer. These little I gotchas can be fun. Chris Shiflett wrote: --- Al [EMAIL PROTECTED] wrote

[PHP] Another Session Question

2003-12-31 Thread Al
just fine. Al.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Another Session Question

2003-12-31 Thread Al
Your'e right, that's a typo. If I put a echo $_SESSION['counter_file'] . ' testx ' . $counterFile; Before and after the conditional, $_SESSION['counter_file'] is set after the conditional, as it should be. But, it is gone from the before echo when the function is recalled. The

[PHP] Re: Testing for Well-Formed XML

2003-12-30 Thread Al
/packages.php?catpid=22catname=XML, and in particular the XML parser module at http://pear.php.net/package/XML_Parser. Hope that helps, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: HELP! -- Problem with imagejpeg()

2003-12-27 Thread Al
Here is a complete function I wrote a few months ago. It should do it for you or give you hints for fixing your problem. René fournier wrote: Hello, I have a function that is meant to check if an image is greater than a certain width and height, and if it is, downsample it. The checking part

[PHP] Re: Where and how do i use $_post etc

2003-12-26 Thread Al
the name'.$firstName.' '.$lastName; ? If you had set the form method=post in your HTML, then you could have accessed the form values from the $_POST array within PHP. Hope that helps, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP IDE?

2003-12-15 Thread Al
I searched for weeks and tried about 8 php editors and settled on http://www.phpedit.net/products/PHPEdit/ Code hints and completion, and highlighting, etc. are superb. Has a few minor bugs, but they are not serious. The automatic documenter [they call it help, which it really isn't] is

[PHP] Re: How could I count the elements of each dimension of an array?

2003-12-14 Thread Al
on lines 5 - 8? This kind of coding bug is a by-product of a type-juggling, permissive languge that doesn't require you to pre-declare variables. To fix your code, change the first line of your code to read: $ojpp[0] = array(); Hope that helps, Al -- PHP General Mailing List (http

[PHP] Re: Operation in an Array

2003-12-14 Thread Al
Harry.De [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How can i make an operation like adding variables in an array for example $array[$a+$b]; You'll have to be more specific. What exactly do you want to do? Add values of an array together? Their keys? Al -- PHP General Mailing

[PHP] Re: Trying to check for a valid URL String.

2003-12-14 Thread Al
for domain names. 2) You allow dashes in the first pattern, but do not escape the dash character. 3) You have not provided a quantifier to the top-level domain pattern: [a-zA-Z], so it is only looking for one character fits the class [a-zA-Z]. Hope that helps, Al -- PHP General Mailing List (http

[PHP] Re: passing arrays?

2003-12-11 Thread Al
, STATS, MCI, CONLIST, CP, OAFS, LO); $level_2 = array(PN, GALUP, VP, PUBUP, MCI, CONLIST, CP, OAFS, LO); $level = ${'level_' . $_SESSION['user']['level']}; Hope it helps, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Write on image in faint color

2003-12-10 Thread Al
out there at the moment (that I know of) is a PHP extension available through PECL, the PHP extension library. According to the docs, it provides a wrapper to the ImageMagick/GraphicsMagick library. You can find it and download it at http://pecl.php.net/package/imagick. Hope that helps. Al

[PHP] Re: Write on image in faint color

2003-12-09 Thread Al
this. Hope it helps, Al Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, This was asked some time ago but cant find it in the archive, anybody remember how it was solved please write and tell me. Requirment: Write domain name in faint color on picture (a kind of watermark

[PHP] Re: html stripping

2003-12-04 Thread Al
starters: http://www.phpfreaks.com/tutorials/52/0.php Good luck. Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Sort Array by date

2003-12-04 Thread Al
, $bYear) = explode('-', $b); $bIsoDate = sprintf(%04d-%02d-%02d, $bYear, $bMonth, $bDay); return strcmp($aIsoDate, $bIsoDate); } Good luck with it, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Export data

2003-12-01 Thread Al
them to your users as XLS files. Good luck, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question on sending PhP variable results to an HTML page to be displayed.

2003-12-01 Thread Al Costanzo
engines, but when it comes to php... well ... thanks for the help! Al Costanzo - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Al Costanzo [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 01, 2003 8:49 AM Subject: RE: [PHP] Question on sending PhP variable

[PHP] Question on sending PhP variable results to an HTML page to be displayed.

2003-11-28 Thread Al Costanzo
can get the date and it will not change in the cache since the actual code is not on the page that generated it. My question is how do I get the answer that I have in a PHP variable back to an HTML page and give it lets say to JavaScript to display. Thanks for any help on this. Al -- PHP

[PHP] Re: Count online users question

2003-11-26 Thread Al
numbers (e.g. firewalls) which may skew your stats. You would be better off using cookies on user's machines to identify them and log their accesses to a DB. Hope that helps, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: User/Pwd Management Package?

2003-11-23 Thread Al
There are a number of open-source PEAR packages that can help you manage usernames, passwords, and user preferences. Check out: http://pear.php.net/packages.php?catpid=1catname=Authentication Hope it helps, Al Jonathan Rosenberg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED

[PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Al
From the PHP Manual notes (http://us2.php.net/manual/en/function.chop.php): $string = substr($string, 0, -1); Al Jed R. Brubaker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does PHP have an equivalent to PERL's chop - that is, a way to get rid of the last character in a string

[PHP] Re: PHP to get mail headers

2003-11-23 Thread Al
Hope it helps. Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Get value between 2 strings

2003-11-17 Thread Al
Here's what I use: /** * get_text() * * $t The total text string * $s starting text string [e.g. h1] * $e ending text string [e.g. /h1 * * @return the extracted text string. [e.g., returns string between start and end texts. */ function get_text($text, $s, $e) // Get string out of text { $sp

[PHP] Re: Good php WebMail Clients thru apache

2003-11-16 Thread Al
Jerry Alan Braga [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Any suggestions ? The best I've seen (by a long shot) is IMP, which is part of the open source Horde project. Product homepage is at: http://www.horde.org/imp/ Hope it helps, Al -- PHP General Mailing List (http

[PHP] Re: whois api's

2003-11-11 Thread Al
There is a PEAR Project that does exactly what you want: http://pear.php.net/package/Net_Whois Al Rolf Brusletto [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hey all - I'm currently working on a project which requires domain name information. Has anybody used, or can anybody

[PHP] Re: Oh, for a sureset() (orthogonal to isset())

2003-10-30 Thread Al
function sureset($var) { if(!isset($var) || empty($var)) return ''; else return $var; } Of course, when you've got strict checking on, the above doesn't work, because if the variable is unset you get caught on the fact before the function call happens. One change will make your code

[PHP] Re: PPTs and thumbnails

2003-10-30 Thread Al
natively manipulate PPT files, nor are there any PEAR packages for that purpose. Good luck, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PPTs and thumbnails

2003-10-30 Thread Al
In short: not with PHP. You're going to need a program that can read and render PHP files, and save them as a static image (i.e. gif, jpg, etc). Al Apologies, the 2nd sentence should read You're going to need a program that can read and render PPT files ... Arrrgh, I hate tpyos! :) Al

[PHP] Re: Object Undefinded index

2003-10-29 Thread Al
foreach ($cart as $product_id = $quantity) { echo $product_id . br . $quantity; } The way you are accessing the array is incorrect. The $items array is a property of the Cart object. Since the Cart object may have many different array properties, the foreach statement above has to be

[PHP] Re: Object Undefinded index

2003-10-29 Thread Al
anyway. Cheers, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Recommendation for Unique URL

2003-10-26 Thread Al
and manager's email, and then use an MD5 hash of it as the unique string. i.e: $unique_id = md5 ( $employee_email . $manager_email ); For more info on what MD5 is, see http://us2.php.net/manual/en/function.md5.php Cheers, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

[PHP] Idea for new operator

2003-10-26 Thread Al
is only justified if the vast majority of PHP users do these comparisons as much as I do, and are as averse to work as I am ... :). Thoughts? Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: problem in 2 dimensional Array

2003-10-26 Thread Al
); } $array = array ('a', 'b'); echo The array has . countArray($array) . items.; ? Cheers, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Newbie question about Class

2003-10-15 Thread Al
My question seems fundamental. I want to set a variable in one function in a class and then want to use the value in a second function. However, the functions are called a html page with two passes. Submit reloads the page and an if(...) calls the second function in the class. If I declare

Re: [PHP] Newbie question about Class

2003-10-15 Thread Al
I was afraid that was the case. Tom Rogers wrote: Hi, Thursday, October 16, 2003, 3:35:56 AM, you wrote: A My question seems fundamental. I want to set a variable in one function A in a class and then want to use the value in a second function. A However, the functions are called a html

[PHP] Re: Echo $PHP_SELF not working

2003-10-10 Thread Al
Put a ; [no quotes] after such as: echo $PHP_SELF; Jeff McKeon wrote: I've just published a new website and something is wrong. I suspect the PHP.ini on the server but I can't seem to find anything. The line: form method='post' action='?PHP ECHO $PHP_SELF ?' Doesn't seem to work. If I

[PHP] str_replace question

2003-09-09 Thread Al
I've got a simple expression quesxx where xx is a number from 0 to 99. I want to replace it with simply ques. That is, I want to remove the numbers. Will str_replace do it, or must I use ereg_replace? I haven't figured out from reading the php manual on regular expression how to do this

[PHP] Re: Table format needs php correction

2003-08-30 Thread Al
There are too many problems with your code for anyone to spend the time going thru them all. I'd suggest, first constructing a regular html table that looks like you want it to. Hint, IE6 requires something in TDs [e.g., nbsp;] for borders to show. When the table looks the way you want it

[PHP] Re: Freeze Pane

2003-07-25 Thread Al
Inline frames http://www.cs.tut.fi/~jkorpela/html/iframe.html Jason Martyn wrote: This is probably under the category of javascript, however I would like ot know if it is possible to be done with php. Let's say I have a table that is 30 columns wide and so the entire table doesn't fit on the

[PHP] Question about Include_once

2003-07-19 Thread Al
Does file called by Include_once stay with the client's session or just for operations in the page where it is stated? For example, assume I have one file that contains several functions, then if use include_once('functions.php') on several pages, does the server reload the file for every

[PHP] Re: corrupt images

2003-05-30 Thread Al
Check that you are using the correct MIME type. There is a note on this in the User Contributed Notes under the function definition. Jason Jacobs wrote: Hi all. I've been struggling with getting images to upload cleanly. I'm using php 4.2.2. When I look at the uploaded file info, it

[PHP] Anyone know of a php script to extract files from a zip file.

2003-05-27 Thread Al
I doing a little photos album application and I'd like my, non-techie, users to be able to zip together their photos and upload them to a folder on the site. I've got everything going nicely except the unzipper. I would not like to teach them to use ftp, even with a browser. I'm on a

Re: [PHP] Anyone know of a php script to extract files from a zipfile.

2003-05-27 Thread Al
Does appear to be promising. I'll try it. His description is a bit vague about what zip formats it handles. Evan Nemerson wrote: http://dev.maxg.info/projets/projet.ziplib.en.maxg maybe??? haven't tried it On Tuesday 27 May 2003 12:16 pm, Al wrote: I doing a little photos album

[PHP] Removing a string from one area to another...

2003-03-29 Thread Al
the inforamtion So maybe with a preg_match on the boundary and then strip from that value until the next time you see the value?? Though now to put this in a language php understands?? Thanks --Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Is there any easy way to take out the mime of an email...

2003-03-29 Thread Al Nutile
From: -X Subject: | /home/nepso/nepso-mail/report_gateway.php) } This is working so far with Mozilla as the client. The nice thing too is it by passes the attachment which was another problem I was having since I do not want those. Hope this is more clear and thanks Tyler for your time. --Al Tyler F

[PHP] Help with procmail script...

2003-03-28 Thread Al
of the aliase file for sendmail. Though using procmail to strip the above info my be better in the long run? Thanks, --Al Gateway.php #!/usr/local/bin/php -q ?php /* $Id: gateway.php,v 1.11 2002/10/28 15:52:27 root Exp $ * Copyright (C) 2002 Justin Mazzi [EMAIL PROTECTED

<    2   3   4   5   6   7   8   >