Re: [PHP] zip code validation/regular expression

2003-06-03 Thread CPT John W. Holmes
> Simply trying to use regular expressions to validate a 5 or 5+4 zip code, > excluding 0 and 0-. Looked on http://www.regexlib.com, and > that's where I found the pattern below, but it doesn't work. The best I can > do on my own is two separate regular expressions, one to match a val

Re: [PHP] Variables changes their values

2003-06-03 Thread CPT John W. Holmes
> I'm getting strange behavior in some of my scripts > I just upgraded from 4.3.1 to 4.3.2 and was hoping it would solve the > problem. The problem is that variables changes its values from one line og > code to another - without specific code that should change the value. > Do anybody else had t

Re: [PHP] convert seconds to hours, minutes, seconds

2003-06-03 Thread CPT John W. Holmes
> I have a value 178607, which is stored as seconds. I > like to convert it (178607 Secs) to Hours, Minutes and > Seconds appropiatly. > Can anybody help me supplying the code? If it's stored in MySQL, you can use SEC_TO_TIME() mysql> select sec_to_time(178607); +-+ | sec_to_t

Re: [PHP] Variables changes their values

2003-06-03 Thread CPT John W. Holmes
> On Tuesday 03 June 2003 13:58, Jay Blanchard wrote: > > [snip] > > We would have to see some code > > > > Jay > > I'm not able to reproduce this in a short code-snippet. > But from the first echo to the last echo $lid change its value: Either this is a bad cut and paste job or this script wi

Re: [PHP] Displaying 5 records only/displaying specific records

2003-06-03 Thread CPT John W. Holmes
> I'm trying to build a news panel for my home page. Basically I want to > present the five most recent news articles in a recordset, but I'm not > sure how to cut off the recordset after 5. > Also I want to present a picture with my first headline. > > My code will go something like this: > >

Re: [PHP] Delete from Multidimensional Array?

2003-06-03 Thread CPT John W. Holmes
> I've built a page that collects network card information, assigning each > element its place within a $Card array, and all of the cards to $NetCards. > As you enter your card information at the bottom, the previous card is > displayed above it, with a Delete checkbox option at the end of that row

Re: [PHP] Re: Migration from register_globals=on to register_globals=off

2003-06-04 Thread CPT John W. Holmes
> yeah .. I knew it .. but it would be so very helpfull if it would be just > included in a superglobal similar to $_REQUEST ... Do it yourself, if you must: array_merge() ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: John - > RE: pagenting logic to cut short

2003-06-04 Thread CPT John W. Holmes
> Thanks, its working fine now, actually a little better than I expected :-) > Dont understand the logic though, if you find time point me to the correct > place where i can read up and figure out the logic you used. The logic isn't too hard. You're on page X. You show links to other pages from X

Re: [PHP] setting up a cron job for a PHP script

2003-06-04 Thread CPT John W. Holmes
You can also call the file through lynx or wget if you can't call the php executable directly. lynx --dump http://www.yourserver.com/file.php wget http://www.yourserver.com/file.php Down side is that the file has to be in your web root. Works great for calling remote files, though. ---John Holme

Re: [PHP] Best open source banner advertising application

2003-06-04 Thread CPT John W. Holmes
> From: "Randum Ian" <[EMAIL PROTECTED]> > Why pay for something when you can get this for nowt! ;o) I love getting things for nowt... like candy from a baby... :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] setlocale() changes?

2003-06-04 Thread CPT John W. Holmes
> I've been getting a warning on one of my scripts since I upgraded from 4.1.2 > to the most recent version of PHP. The warning is: > > Warning: setlocale(): Passing locale category name as string is deprecated. > Use the LC_* -constants instead > > > The script at the line that is failing sez: >

Re: [PHP] Sessions and headers

2003-06-05 Thread CPT John W. Holmes
> When using PHP sessions, if the user's browser supports > cookies, PHP sets the session id as a cookie (so far as I > understand it). So when trying to use the session ID in a > script, a cookie request is sent to the browser to get the ID > and assigns it to the internal variable $PHPSESSID (ag

Re: [PHP] Is "gd" present?

2003-06-05 Thread CPT John W. Holmes
> Is there a way to check within an application if the "gd" library has > been installed? Maybe get_loaded_extensions() ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file output, columns, etc...

2003-06-05 Thread CPT John W. Holmes
> Need some help here. I have to format a line with each piece of the line > being a fixed set of characters in length, wether its a mix of spaces and > letters, or all letters. Here's an example of the line: > > 06?4111ABDALARM333 N COUNTRY CLUB CANTON DD8 > > In this fi

Re: [PHP] function re-defined | WorkAround? [and some more Q's]

2003-06-05 Thread CPT John W. Holmes
> I'm working on quite a large website with a lot of php pages.. And a lot of > includable functions (modules).. Sometimes one of those modules gets > included twice accidently and then it generates an error .. of course.. This > made me wonder of there's any way to prevent the function from being

Re: [PHP] Another Session Question

2003-06-09 Thread CPT John W. Holmes
So does your code work? Here's a tip: Try a simple example, like what's in the manual, and see which method works for you. If they both work, which one do you understand? Use that one... ---John Holmes... - Original Message - From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]> To: <[EMAI

Re: [PHP] PHP vs. jsp, advice please

2003-06-10 Thread CPT John W. Holmes
Agree 100%. Don't assume that just because you use JSP, or any other language, your program is going to instantly "scale well" and be easy to maintain. You can write crappy, inefficient code in any language. You can also write good programs in most any language if you put the proper planning into i

Re: [PHP] How to show BLOB ?

2003-06-10 Thread CPT John W. Holmes
> I have a blob in the database. I want to open a file=BLOB in the browser such > a way as if I clicked on a link. So if it is pdf, its opened by pdf plugin, > if it is doc, it is open by word plugin, if it is zip the dialog for > opening/saving to disk is opened, if it is jpeg it is directly displ

Re: [PHP] MSSQL - Previous/Next Paging Results

2003-06-10 Thread CPT John W. Holmes
> > -Original Message- > > MSSQL seems to be a little bit messier that MySQL..e.g limit clause etc > > > > Anyone know of articles/examples that specifically deal with this issue? > > Look into the Top() function for MSSQL. It goes something like: > > SELECT Top(10) * FROM table > > You sh

Re: [PHP] confusing problem or am just plain confused....

2003-06-10 Thread CPT John W. Holmes
> I dont know how exactly to explain this but will do my best, i have many of > the following lines in a page: > > ="package" value="loco package"> > each line of course has a differient id[] value and package value. > > Everything is working fine with the just id[] value but now i need to add

Re: [PHP] nl2br

2003-06-11 Thread CPT John W. Holmes
> I am trying to create a very basic page where we can all easily work on a > document. I just have a huge textarea that inserts the text into a longtext > field in the mysql db. I use nl2br to keep the formatting. Of course, when > the document is viewed in the textarea, all of the are there.

Re: [PHP] slash trouble when editing text

2003-06-11 Thread CPT John W. Holmes
Use stripslashes() to remove the slashes. Use htmlentities() on the text before you put it into the , also. ---John Holmes... - Original Message - From: "Matt Palermo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 11, 2003 4:16 PM Subject: [PHP] slash trouble when edi

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread CPT John W. Holmes
> > > Sorry, I donĀ“t know that you needed an effective snipet. And you are > > right, > > I only writed for positive integers. Try something like apply 2 type cast > > simunltaneous. > > > > if ( (string) ((int) $_POST["var_int"]) == $_POST["var_int"]) > > echo "is int"; > > > > > Why not just

Re: [PHP] dealiong with quote's in SQL strings

2003-06-13 Thread CPT John W. Holmes
> I recently installed 4.3.1 and enabled the magic_quotes_gpc to deal with > quotes in mysql inserts. > > However, I think I have run into a problem that might be related, and > was wondering if there is an easy way to fix it: > > I have a script that gets user input from a drop-down, on the acti

Re: [PHP] page name string

2003-06-16 Thread CPT John W. Holmes
> I need a really simple function that retrieves the actual page file name > from a URL. So, if the URL is http://www.server.com/pagename.php, or if > it is http://www.server.com/directory/pagename.php, the function in both > cases will return "pagename.php". > > I'm sorry if this is a ridiculous

Re: [PHP] Re: Difference between $_POST[foo] and $_POST['foo']?

2003-06-17 Thread CPT John W. Holmes
> At 16:19 17-6-03, you wrote: > >$sql = 'select * from db where apple = \'' . $_POST['foo'] . '\';'; > >Like that? > you missed some quotes: > $sql = 'select * from db where apple = \''' . $_POST['foo'] . '\'"'; Go back and count the quotes again. The original post is correct as far as quotes go.

Re: [PHP] sorting an array

2003-06-17 Thread CPT John W. Holmes
> > array[numrooms] => Array ( [3] => 2 [2] => 5 [1] => 1 ) > > I want to get a result like this: > > 2=>5 > > 3=>2 > > 1=>1 > > ( I want the keys to stay attached to the results) > > perhaps asort()? > "This function sorts an array such that array indices maintain their > correlation with the arr

Re: [PHP] cron job

2003-06-17 Thread CPT John W. Holmes
> Is there a way to run a script (to check a table for new fields, or to > check time..etc) evrey few hours, without using programes souch as > crontab. In addition to what others have said, you don't _have_ to set up the cron job (or any scheduled job) on the same computer as your scripts. If you

Re: [PHP] PHP.net Manual Magic?

2003-06-17 Thread CPT John W. Holmes
> One of the coolest things I have seen online, and some of you may not even > know this works, but if you type in the url: "http://www.php.net/foo"; > you'll be taken straight to the foo page of the php manual, if one exists. > If "foo" doesn't exist, you pull up a Google search-within-the-site pa

Re: [PHP] Problems with quotes in URL - SOLVED - plz FLAME me!!!

2003-06-18 Thread CPT John W. Holmes
No, I'm all for a public flaming... let him serve as an example to others!! :) In all honesty, I have posted about the htmlentities/htmlspecialchars() requirement when putting data in form inputs quite a lot recently. You should have picked up on it sooner. :) Oh well, though... at least you know

Re: [PHP] Session filesize limit

2003-06-18 Thread CPT John W. Holmes
> Does anyone know about the ideal session filesize > limit? I am using the common functionality in the > entire application. So i am thinking to store data > into the session file once user logs into the system > rather retrieving the information from database on > each user request. But i dont kn

[PHP] Re: Fatal error: Call to undefined function: str_word_count()

2003-06-18 Thread CPT John W. Holmes
"nabil" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > when i use str_word_count() i got the following : > Fatal error: Call to undefined function: str_word_count() > > and my PHP is Version 4.2.3 > > What is the problem ??? Reading English? us2.php.net/str_word_cou

Re: [PHP] Calling c function from php

2003-06-18 Thread CPT John W. Holmes
> Anyway, can any make a suggestion on how to connect to a c function from > a php app? > > I have to connect to a sales tax calculation software. The function > is being written for me but I have to figure how to call it - get the > variable - and use it again in my php app. > > I've been told th

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

2003-06-18 Thread CPT John W. Holmes
> >> LISA, in collaboration with Lemoine International has made "Software > >> Testing and Internationalization" by Galileo Computing freely > >> available for download. > >> [snip] > >> To download a copy, please visit > >> http://www.lisa.org/interact/2003/swtestregister.html > > > >How about a

Re: [PHP] Validating a "money" input

2003-06-18 Thread CPT John W. Holmes
> What is the best way to validate a "money" input? For example, 3452.67 > versus 3452..67. if($value == (string)round((float)$value,2)) or if(preg_match('/^[0-9]*\.?[0-9]+$/',$value)) appear to work. :) Assuming your value is a string to start with. ---John Holmes... -- PHP General Maili

Re: [PHP] direct access to file uploads

2003-06-18 Thread CPT John W. Holmes
> I am new to PHP and am trying to get access to files that are uploaded. > I have RTFM ;-) and have noticed that PHP writes the file to disk in a > temporary location and provides a method/class with all of the > information needed to access it. I am loading (PDF's) into a binary > field in mySQL

Re: [PHP] [Newman] Passing an image through a php file.

2003-06-19 Thread CPT John W. Holmes
> try this: > > header("Content-type: image/jpeg"); > fopen ("d:/crushme/images/1.jpg", "r"); Just my opinion, but maybe you should try reading the file and echoing the data instead of just opening it. :) ---John Holmes... > I would like to pass an image throught > http://server/newman/ImageTE

Re: [PHP] Trapping PHP Errors

2003-06-19 Thread CPT John W. Holmes
> How do I trap a PHP error and display my own error message instead? > > I have two PHP scripts - one that creates tables on MSSQL and one that > deletes tables on MSSQL. I wish to capture the message that appears if > the user attempts to create tables that already exist, or delete ones > that d

Re: [PHP] unique random id

2003-06-19 Thread CPT John W. Holmes
> How do i generate a unique random number? You can use rand(), but there's no guarantee it'll be unique unless you remember every number you've ever generated ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session Vars

2003-06-19 Thread CPT John W. Holmes
> setting up some pages to allow users to log in, and store their userID in a > session var. > for development purposes, i've installed AMP on my windows box. > > -everything parses fine > -register globals is on. > > problem: session vars do not seem to be carrying over pages, even when i set > th

Re: [PHP] php https file download

2003-06-19 Thread CPT John W. Holmes
> Apache 2.0.40 > PHP 4.2.2 > Linux > > I have a single php script for downloading requested files. It works > beautifully on http over port 80. It does NOT work at all over https on > port 443. I am using the exact same script (the very same file) for both > http and https connections. Apache

Re: [PHP] Empty Page problems

2003-06-19 Thread CPT John W. Holmes
> Can anyone tell me what is wrong with my PHP script? I am trying to add > information to an MSSQL database from a separate HTM file. The script it > as follows: How about you tell us what the problem is? What is the result of this script? What are you expecting the result to be? Take away the @

Re: [PHP] PHP: cannot configure SMTP_port....

2003-06-19 Thread CPT John W. Holmes
> i am trying to send mail from a script, but i receive these error message: > > Warning: mail() [function.mail]: Failed to connect to mailserver at > "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini > or use ini_set() in c:\apacheserver\apache\htdocs\work-net\serial.php o

Re: [PHP] Re: error handling

2003-06-19 Thread CPT John W. Holmes
> I looked in the manual (twice now). I want to keep logging to the log > file but print to browser on this one script. > > I have in my script: > error_reporting (E_ALL); > error_reporting (E_ERROR | E_WARNING | E_PARSE); > > but they're still only being logged to file. I dont have access to >

Re: [PHP] Month loop

2003-06-19 Thread CPT John W. Holmes
> Is there any way I could loop thru and print all the month names (i.e. > January, February)? Just make an array and loop through the array. You know the rest of the names, right? :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] Cookies- peanut butter or chocolate??

2003-06-19 Thread CPT John W. Holmes
> 1. How do you setup a cookie that will not expire?? You can't. > 2. How do you put 2 items that you want to save in > the cookie and retrieve?? Examples in the PHP manual > only show how to work with a single value. You can't. Use an array or two cookies. ---John Holmes... -- PHP Gener

Re: [PHP] Is there an RTFM for 'use strict' ?

2003-06-23 Thread CPT John W. Holmes
> Done a lot of Perl & PHP coding over the years and one thing I _really_ > liked about Perl is its 'use strict;' directive. For those of you not > familiar with Perl, this made the script die if you don't (among other > things) declare your variables before using them. > > Once the fingers are fl

Re: [PHP] sending headers

2003-06-23 Thread CPT John W. Holmes
> I try to include a redirect header in my script, but is fails with the > familiar ( headers already sent) error. > > I KNOW you should put the headers call where it will cause the first > output, and I do that, the only thing happening infront of the headers > call is an include statement to my m

Re: [PHP] Performance question

2003-06-23 Thread CPT John W. Holmes
> I have a question regarding retrieving the > information. I have the functionlity in which on every > user click, system needs to retrieve information for > particular user and display the page according to the > retrieved information. Now question is which is the > scalable solution? (1) Retriev

Re: [PHP]

2003-06-23 Thread CPT John W. Holmes
> When I include in my html > code, I get a parse error. The version is 4.1.2; phpinfo() reports > that XML support is turned on. Can anyone help with this? The first two characters are opening up a PHP block of code, so you get a parse error. Either disable short open tags in php.ini, or use ";

Re: [PHP] header() issues....

2003-06-23 Thread CPT John W. Holmes
> Does anyone know if there are issues with using the header() function inside > frames? Is there extra stuff that needs to be added to it to get it to work > correctly? No... each frame is it's own HTTP request. PHP operates server side so it has no idea of "frames". It simply processes the code

Re: [PHP] php.ini

2003-06-25 Thread CPT John W. Holmes
- Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> > [snip] > > I am running a red hat 9 linux box with Apache 1.3.27 with > > PHP 4 what is > > > > the default location for the php.ini file > [/snip] > > Create a page with just the following... > > phpinfo(); > ?> > > place

Re: [PHP] cannot get php through apache to write to my home dir on shared server

2003-06-26 Thread CPT John W. Holmes
From: "frank reeves" <[EMAIL PROTECTED]> > I have an account on shared server and am trying to > write a logfile (a dump of an email which i use mail() > to send) to a logfile in my home dir. This logfile > will grow with all emails send by my app and will thus > give me an archive of sorts. > > H

Re: [PHP] PHP Interview questions

2003-08-26 Thread CPT John W. Holmes
From: "Micheal Harris" <[EMAIL PROTECTED]> > I am in the process of hiring someone that needs to have extensive PHP and > MySQL experience. Does anyone have any suggestions for interview questions? > I have no PHP or MySQL experience, and come from a non-technical background. > I want the question

Re: [PHP] Serve a file using PHP

2003-08-26 Thread CPT John W. Holmes
From: "Grant Rutherford" <[EMAIL PROTECTED]> > Is there a way that PHP can allow a user to browse the files on the > server's network, and ultimately send the file to the user? > > I'm making a database interface with PHP to be used internally on our > network. Through a PHP interface, the user wa

Re: [PHP] PHP Interview questions

2003-08-26 Thread CPT John W. Holmes
From: "Jay Blanchard" <[EMAIL PROTECTED]> > Also ask a couple of other questions that require thought, but have > nothing else to do with code. such as... > > In one room you have 3 light switches, each connected to one light bulb > in another room. How many trips must you make to determine which

Re: [PHP] verifying sql INSERTs

2003-08-26 Thread CPT John W. Holmes
From: "Chris W. Parker" <[EMAIL PROTECTED]> > I should instead just try to perform the INSERT and then if it fails I > know I've already got a record. If it doesn't I know everything is cool. If it is a certain kind of failure, then you have a duplicate, otherwise it could be another type of fail

Re: [PHP] Website templating schemes

2003-08-26 Thread CPT John W. Holmes
From: "Joel Konkle-Parker" <[EMAIL PROTECTED]> > I'm trying to make a PHP-backed website, and I'm trying to decide between two > templating schemes: > > 1. define 2 php template files: header.php, footer.php. in index.php, require > header.php, output content, require footer.php > > 2. define a p

Re: [PHP] verifying sql INSERTs

2003-08-27 Thread CPT John W. Holmes
From: "Curt Zirzow" <[EMAIL PROTECTED]> > > I should instead just try to perform the INSERT and then if it fails I > > know I've already got a record. If it doesn't I know everything is cool. > > I've debated with myself several times if this is really a good > method to not have duplicates in the

Re: [PHP] PHP Interview questions

2003-08-27 Thread CPT John W. Holmes
From: "Curt Zirzow" <[EMAIL PROTECTED]> > toggle_light(1); > sleep(120); > toggle_light(1); > > toggle_light(2); > move('self', 'room/'); > > if ($lightbulb['temp'] > $room['temp']) { > echo "switch #1"; > } elseif ($lightbulb['ison']) { > echo "switch #2"; > } else { > echo "switch #3"; >

Re: [PHP] Looping through a list - Newbie question

2003-08-27 Thread CPT John W. Holmes
From: "James Johnson" <[EMAIL PROTECTED]> > I have a list contained in a session var. I want to loop through the list, > getting the value of the current item, then do a query based on that value. > Is there an easy way to do this, or do I need to convert the list to an > array first? In the code b

Re: [PHP] dealing with arrays

2003-08-27 Thread CPT John W. Holmes
You need to name the elements a little differently. You're on the right track with making them an array, but if I check the third box, that'll make $check[0] = 1, and if I put in a name in the first box, that'll make $name[0] = 'John'... so you have no way of relating the name from "entry one" to t

Re: [PHP] Cannot pass values from one page to another

2003-08-27 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > Ok this is a major vulnerability that you are coding. Register globals > on and password being stored in the session is like having a banner on > your home page saying 'come and hack me'. Please explain how you've come to this conclusion... ---John Holmes... -- PHP

Re: [PHP] Implode slows down file reading? [was: str_replace performance in large mailing script]

2003-08-27 Thread CPT John W. Holmes
From: "frederik feys" <[EMAIL PROTECTED]> > I thought str_replace caused slow down of my mailing script, but it > seems to be this line of code: > > $fd = > implode("",file("http://www.domain.org/store/min/Mailing_template.html";) > ); > > I first put the mailing template in $fd (only once) and th

Re: [PHP] Cannot pass values from one page to another

2003-08-27 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > Didn't know this was the army :-) Yeah, I signed you up last week. You report to basic training in November. I hope you're ready! :) > first unless you got your variable ordering (POST, GET, Env, Sesssion > etc). the values in the session can be easily overridden with

Re: [PHP] session.cookie_domain

2003-08-27 Thread CPT John W. Holmes
From: "Shu Chow" <[EMAIL PROTECTED]> > We're having a problem with a site that recently upgraded to php 4.3.3. > Ever since the upgrade, session variables won't pass between pages. > Looking at the php.ini file, I see that session.cookie_domain is set to > server.hostingcompany.com while our site

Re: [PHP] Session var read by form C++ CGI prog ?

2003-09-02 Thread CPT John W. Holmes
From: "John Bryan" <[EMAIL PROTECTED]> > If so, the problem is that this file that is being uploaded > via the form to the program MyCppProg.exe gets sent > as THE input to the prog, apparently as a cgi-type > parameter through stdin (i.e. cin), so that when I try to > pass the value as a cgi par

Re: [PHP] Session var read by form C++ CGI prog ?

2003-09-02 Thread CPT John W. Holmes
From: "John Bryan" <[EMAIL PROTECTED]> > The file would already exist on the client side. They are > uploading the file to be processed by this program > MyCppProg.exe, which is invoked as a form 'action'. > This already works, but depends on the Apache variable > REMOTE_USER being set when user

Re: [PHP] evaluating dynamic variable

2003-09-02 Thread CPT John W. Holmes
From: "Stephen Goodman" <[EMAIL PROTECTED]> > When I run the code you've attached, with $i iterating up to 3, I get > three 'empty!', even if $resolution1 should be 'not empty!'. It seems > like the $i in $_POST["resolutions".$i] is not getting parsed into a > value, and php is looking for a key

Re: [PHP] Form variables lost when duplicate records are found !

2003-09-02 Thread CPT John W. Holmes
From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]> > I am making use of a php form to add company details to a MySQL > Database. Before I add the form variables I am checking to see if the > SAME company name exists in the DB. If the same company exists, then a > notification is provided. In bet

Re: [PHP] PHP installation on IIS

2003-09-03 Thread CPT John W. Holmes
From: "Sid" <[EMAIL PROTECTED]> > This is the first time I am installing PHP on IIS and I don't know what I am doing wrong. I copied the default php.ini file to the winnt dir. > Then I added an ISAPI extention with .php to the App Mapings tab. (ISAPI caching enabled) > Then I made a test.php file

Re: [PHP] Q on Class and EXTEND

2003-09-03 Thread CPT John W. Holmes
jsWalter wrote: > What I am trying to do is EXTEND the PEAR::Auth Class with new properties > and methods. > > But I still want to use the original instantiation call... > >$myAuth =& Auth(); > > So, I don't think I can rename the orginal Class in this case. > > I'm just being particular. > >

Re: [PHP] Get the lowest value out of different fields

2003-09-03 Thread CPT John W. Holmes
From: "Frank Keessen" <[EMAIL PROTECTED]> > I hope you can help me with this: > > I have a tabel in my database like this > > TEST > > fieldnameValue's > > testid 1 > testf1 3 > testf2 4 > testf3 0 > testf4 2 > testf5 0 > > (so this is

Re: [PHP] mysql Pattern Matching

2003-09-04 Thread CPT John W. Holmes
From: "Ralph Guzman" <[EMAIL PROTECTED]> > I know this question is best for the mySQL mailing list, but I am unable > to subscribe to their list at this moment so perhaps somebody here can > help me out. > > I have a table with a field where amenities are listed together using a > comma delimiter

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]> > But how much overhead is there in: > > $link = mysql_connect($hostname,$username,$password) or die(""); > $db = mysql_select_db($database,$link) or die(""); > > Would it be beneficial to run a single one at the beginning of every > script? Currently I hav

Re: [PHP] mysql Pattern Matching

2003-09-05 Thread CPT John W. Holmes
From: "Ralph Guzman" <[EMAIL PROTECTED]> > Is there an advantage or difference in running FIND_IN_SET() instead of > LIKE? Actually no, I guess there isn't. Neither one will use an index. mysql> desc test; +---+-+--+-+-+---+ | Field | Type| Null | Key

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]> > > While multiple connections will just return the first connection, anyhow, > > why do the extra work, right? > > Yes that was what I was thinking. But I was also thinking that I would > need to global the $link and $db variables and run mysql_query() w

Re: [PHP] Form data

2003-09-08 Thread CPT John W. Holmes
From: "Hardik Doshi" <[EMAIL PROTECTED]> > I have a form for adding a university course details. > It has some fields for which the parent form calls the > child form. For example: Each course is associated > with at least one faculty member. So when the user > enters faculty member then first use

Re: [PHP] Creating a Calender

2003-09-08 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]> > Does anybody know how to generate calendars easily? (i.e. print out > complete calenders from the current month on) I'd check out PEAR or phpclasses.org. I'm sure something is already written, but I don't know of any personally. ---John Holmes... --

Re: [PHP] adodb and php5

2003-09-08 Thread CPT John W. Holmes
From: "Gilberto Garcia Jr." <[EMAIL PROTECTED]> > Does anyone had tested ADODB with php5? > I can make a query, print the recordcount but when i try to show the result i got nothing > > while (!$qry->EOF) { > echo $qry->fields['campo'] . ""; > > $qry->MoveNext(); > } You might want to ask on the

Re: [PHP] Session Variables in a Class

2003-09-09 Thread CPT John W. Holmes
From: "micro brew" <[EMAIL PROTECTED]> > I've been experimenting with sessions. I can make > them work just fine in a normal PHP page. But when I > create a class and try to define a session variable > within a method in the class it won't work. I've > tried setting the session variable directly

Re: [PHP] Multiple image buttons

2003-09-09 Thread CPT John W. Holmes
From: "Hardik Doshi" <[EMAIL PROTECTED]> > I have a page on which there are multiple image > buttons. Is there any way to determine which button is > pressed by the user? > > For example, there is a page on which i display all > the users of the system with the edit and delete > button beside each

Re: [PHP] Session Variables in a Class

2003-09-10 Thread CPT John W. Holmes
From: "micro brew" <[EMAIL PROTECTED]> > Here's my class. I start the session in the > constructor and in later methods attempt to register > session variables. You can see I've tried a couple > different methods but none of them maintain the > session variable values. Any suggestions? Is regi

Re: [PHP] divide

2003-09-10 Thread CPT John W. Holmes
From: "phpu" <[EMAIL PROTECTED]> > I'm new in php and i've got allready a problem. > I wanna divide 2 numbers and the result to be an integer separated by comma. For example: > $number1=1000; > $number2=17; > $result=$number1 / $number2; > In this case the result is 588235.29411764 > And I

Re: [PHP] How to access a program outside of PHP?

2003-09-10 Thread CPT John W. Holmes
From: "Adam Douglas" <[EMAIL PROTECTED]> > Hi. I'm trying to develop a web interface to the ghostscript (gs) > application. I have the ghostscript syntax down perfectly in the console. > Now when I go to try and do it in PHP I get nothing. No errors, nothing just > a blank page with PHP logs turn

Re: [PHP] Can't use strtotime for dates before 1970. Why not??

2003-09-10 Thread CPT John W. Holmes
From: "Free Grafton" <[EMAIL PROTECTED]> > We provide a MySQL, PHP solution to customers. One of the fields that we > store for the customers are birthdates. We just recently upgraded from Red > Hat 7.1 to Red Hat 9.0 and now have realized that at version 7.3 they > changed it where strtotime no l

Re: [PHP] reverse lookup/domain lookup in PHP

2003-09-11 Thread CPT John W. Holmes
From: "Tim Baker" <[EMAIL PROTECTED]> > Is it possible to reverse lookup (like here > http://www.whatismyipaddress.com/reverse.asp) to > find the domain with PHP? I assume a DNS lookup > requires an external server somewhere? That's be great if there was a PHP function to do this, something like

Re: [PHP] Mysql Authentication problem

2003-09-11 Thread CPT John W. Holmes
From: "James Hamilton" <[EMAIL PROTECTED]> > current testing code: > > $link = mysql_connect("localhost", "user", "pass" ) > or die("Could not connect : " . mysql_error()); > print "Connected successfully"; > mysql_select_db("name") or die("Could not select database"); > print "connected"; >

Re: [PHP] reverse lookup/domain lookup in PHP

2003-09-11 Thread CPT John W. Holmes
From: "Tim Baker" <[EMAIL PROTECTED]> > Expensive? In server/processor time, money or bandwidth (doubt the latter?) server/processor time. It can take a while to get a response. Same as doing it from command line. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] New Session Ids generated with each page request

2003-09-11 Thread CPT John W. Holmes
From: "Golawala, Moiz M (IndSys, GE Interlogix)" <[EMAIL PROTECTED]> > My problem is that I get a new Session Id with every > request I send to the server. For that reason I am unable > to share variables between pages using sessions. (I get a > new session Id even I refresh the same page). The c

Re: [PHP] Mailing List Programme

2003-09-11 Thread CPT John W. Holmes
From: "Sheni R. Meledath" <[EMAIL PROTECTED]> > Many thanks for the details. Now the problem is Flush() is not working on > my server (UNIX/Apache 1.3). Are there any issues with Unix servers. The > page displays the title and then waits for teh complete script to execute. > I am using IE 6.0 to br

Re: [PHP] Problem with HTML Text box and PHP variable.

2003-09-11 Thread CPT John W. Holmes
From: "murugesan" <[EMAIL PROTECTED]> > This will help you > > $dins="Dinesh"; > echo ""; > ?> Use double quotes for HTML attributes. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] some kind of redirection (not the header function)

2003-09-11 Thread CPT John W. Holmes
From: "Juan Nin" <[EMAIL PROTECTED]> > The beheaviour I want to acomplish is the same as in yahoorgoups. > > You can access a mian page, where you login and have a list of all the groups you are subscribe to. > You click on the link to each one and it redirects you to: http://groups.yahoo.com/grou

Re: [PHP] rename()

2003-09-11 Thread CPT John W. Holmes
From: "Edward Peloke" <[EMAIL PROTECTED]> > This is probably an easy question Yep.. ;) > I have an uploaded image in a temp file that I want to rename and put in > another folder. I am using rename() which works fine, the problem is, I > want to force an overwrite if the file already exists. [

Re: [PHP] Simple (?) var_dump question

2003-09-12 Thread CPT John W. Holmes
From: "Thomas Panzarella" <[EMAIL PROTECTED]> > Hi. I'm new to the list so sorry if this has already > been asked before ... > > I want to find a way to capture the var_dump > output as a string so I can write it to a log file ... > (for example): > > $logger->debug(var_dump($foo)); > > So, the a

Re: [PHP] Simple (?) var_dump question

2003-09-12 Thread CPT John W. Holmes
From: "Wouter van Vliet" <[EMAIL PROTECTED]> > aiaiaia ... you are all pretty right, for another function was forged. > var_export has a "return" flag as second argument where print_r and var_dump > both have other variables as second (and third, and fourth, and sixth) .. > > So you can do: $logg

Re: [PHP] Simple (?) var_dump question

2003-09-12 Thread CPT John W. Holmes
From: "CPT John W. Holmes" <[EMAIL PROTECTED]> > The only difference between print_r() and var_export() produces valid PHP > code. That should say var_export() produces valid PHP code, while print_r() does not. ---John Holmes... -- PHP General Mailing List (http://www.ph

Re: [PHP] Calling a function.

2003-09-12 Thread CPT John W. Holmes
From: "Vincent M." <[EMAIL PROTECTED]> > Is there any way to call a function with a variable inside the call. ie: > > if($preferences != "") { > dis_display$$preferences() ; $functon = "dis_play$preferences"; $function(); ---John Holmes... -- PHP General Mailing List (http://www.php.

Re: [PHP] error cannot instantiate non-existent class

2003-09-12 Thread CPT John W. Holmes
From: "Golawala, Moiz M (IndSys, GE Interlogix)" <[EMAIL PROTECTED]> > I am newbie with php and I am trying to instantiate a > class. Welcome to PHP. > this->$config = $config; $this->config = $config; > Parse error: parse error, unexpected T_OBJECT_OPERATOR > in C:\Program Files\Apache Group\

Re: [PHP] Calling a function.

2003-09-12 Thread CPT John W. Holmes
From: "Jason Wong" <[EMAIL PROTECTED]> > On Saturday 13 September 2003 01:40, CPT John W. Holmes wrote: > > From: "Vincent M." <[EMAIL PROTECTED]> > > > > > Is there any way to call a function with a variable inside the call. ie: > >

<    1   2   3   4   5   >