Re: [PHP] Store array as Session Variable

2003-07-28 Thread CPT John W. Holmes
$details is an array (just like $company_name was). Try to view print_r($details); and see what you get. ---John Holmes... - Original Message - From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 28, 2003 3:18 PM Subject: [PHP] Store array as Se

Re: [PHP] variable in function parameter

2003-07-28 Thread CPT John W. Holmes
> * Thus wrote 386-DX ([EMAIL PROTECTED]): > > Hello. Let's say I have something like this: > > > > function aa($test) { > > $a = 8; > > echo $test; > > } > > > > $a = 2; > > aa("a is ". ($a>5?"greater":"equal to or less"). " than 5".); > > http://php.net/eval No... you need to make $a glo

Re: [PHP] file_put_contents()?

2003-07-25 Thread CPT John W. Holmes
> Another stupid newbie question...(btw, is there a list more geared towards > the newbies?) Yes, it's called the manual. > Is the file_put_contents() function not available in PHP 4.3.2? Seriously: www.php.net/file_put_contents ---John Holmes... -- PHP General Mailing List (http://www.php.n

Re: [PHP] Debugging a Session Problem

2003-07-25 Thread CPT John W. Holmes
From: "Lee Stewart" <[EMAIL PROTECTED]> > I'm moving an application that I'm in the trying to move to a new > platform. It was running fine on an older Linux platform with PHP > 4.0.3 and Apache 1.3.14. The new platform is also Linux, with PHP 4.2.2 > and Apache 1.2.26 -- with register_globals o

Re: [PHP] Rewrite and tags.

2003-07-25 Thread CPT John W. Holmes
> How can I easiest rewrite A and IMG tags? I'm fetching a page with > fsockopen() and I need to rewrite these tags before sending it on to a user. > > My own theory is that it's made with Regular Expressions. I just don't > know these myself. If you're writing one of those "anonymous" browsing pr

Re: [PHP] just looking for some opinions...

2003-07-24 Thread CPT John W. Holmes
> Let's say I have a number: 1281924 > > The rules call for removing "1280+", meaning remove 128 and all 0's that > come after it, until you run into another number. > > In the end, it would leave 1924, and everything else on the beginning would > be gone. $new_number = preg_replace('/^1280+/'

Re: [PHP] Software Application Engineer WANTED (PHP/MySQL Guru)

2003-07-23 Thread CPT John W. Holmes
> Subject: [PHP] Software Application Engineer WANTED (PHP/MySQL Guru) I hope there are job postings like this if/when I get out of the Army! :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with MySQL Query

2003-07-23 Thread CPT John W. Holmes
Take out the plus sign... type != 'Meal Plans' And using single quotes in your query might make things easier (no escaping...) $dbqueryshipping1 = "select * from tempuserpurchase where usersessionid='$User_Shopping_Id' and day='1' and type!='Meal Plans'"; You don't need quotes around '1' since i

Re: [PHP] I'm really getting annoyed with PHP

2003-07-23 Thread CPT John W. Holmes
From: "Beauford.2005" <[EMAIL PROTECTED]> > Yes, I'm still screwing around with this stupid redirection thing, and > either I'm just a total idiot or there are some serious problems with > PHP. I have now tried to do it another way and - yes - you guessed it. > It does not work. > > I mean really,

Re: [PHP] Search question ..

2003-07-23 Thread CPT John W. Holmes
From: "Curt Zirzow" <[EMAIL PROTECTED]> > * Thus wrote James Hatridge ([EMAIL PROTECTED]): > > I've got a search page written for my web site. I can find the html page I > > want by keyword. Now I need to get the title of that page in to a variable. > > In other words I have a file name, for exampl

Re: [PHP] Global variable question question

2003-07-23 Thread CPT John W. Holmes
> When registered globals is set to off this does not effect the $PHP_SELF > variable right? In other words I should be able to call $PHP_SELF with > out having to do this $_SERVER['PHP_SELF'], right? No. With register_globals OFF, $PHP_SELF is not set. ---John Holmes... -- PHP General Mailin

Re: [PHP] Some SESSION Vars not Registering

2003-07-23 Thread CPT John W. Holmes
From: "Jeff Stillwall" <[EMAIL PROTECTED]> > > Now I'm (possibly) getting somewhere: > > When I modify the function to be this (notice the key name change by adding > "s"): > > function setupUserEnv ($userArray) { > > $_SESSION['loggedIn'] = 1; > > foreach($userArray as $key=>$value) { >

Re: [PHP] newbY prob

2003-07-23 Thread CPT John W. Holmes
From: "Jennifer Goodie" <[EMAIL PROTECTED]> > > ! am trying to count the number of items in this table. The table > > has one field in it. > > > > The code I am using is: > > > > $dbquerymeal = "select COUNT(*) from mealtype"; > > $resultmeal = mysql_db_query($dbname,$dbqueryshipping1); > > if(mysq

Re: [PHP] Hi

2003-07-22 Thread CPT John W. Holmes
Quit spamming us. We don't want to visit your lousy poker site. ---John Holmes... - Original Message - From: "Rausch Alexandru" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 22, 2003 4:42 AM Subject: [PHP] Hi MYSQL problems problems. I want to install an user login ap

Re: [PHP] Multiple Select Form

2003-07-22 Thread CPT John W. Holmes
> I have a form that has a select form object with where I can select multiple > values. The select is called "number". When I post the form, I get a lot > of variables called $number with the various values I selected. Is there a > way that I can make this an array of values? name it "number[]

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
> In my first post I showed that one of the versions of the logout page > that I used had this line in it. > > setcookie("user_info","",(time()-3600),"/"); > > Shouldn't that take care of the cookie? Like someone else said, that'll take care of a cookie called "user_info". Your session cookie is n

Re: [PHP] Problem with Adding info into an array

2003-07-21 Thread CPT John W. Holmes
> I have 7 checkboxes, which make up the array information. I currently use > implode to make the array, however that array only consists of the > information that it checked. > > What I need to do now is make it so the array will always be 7 items, but if > there isnt a checkbox for the item, I wa

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
> What is the point of having a unique ID for each session if the only > thing that matters is the data stored within it? Why have a session id > at all if it can't be used to uniquely track a user? Well, it can, and it does. I guess it's all in how you use it. If my session id is "abcd", then whe

Re: [PHP] filesize comparison for upload

2003-07-21 Thread CPT John W. Holmes
> I have an upload form that will be used for some really large files. I need to ask a couple of questions about the ways of improving the success rate that I have using it. > > (1) what is the best and most stable method for uploading a large file. Sometimes the transfer peters out. > > (2) how ca

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
From: "Chris W. Parker" <[EMAIL PROTECTED]> > > CPT John W. Holmes <mailto:[EMAIL PROTECTED]> > > on Monday, July 21, 2003 12:39 PM said: > > > > You should still consider the user logged out since the > > session is empty, right? > >

Re: [PHP] can't restart session

2003-07-21 Thread CPT John W. Holmes
You have the same session id, but there is no data in it, so what's the problem? You should still consider the user logged out since the session is empty, right? If you really want, upon logout, make a new session id with session_id(), md5() and uniqid(). ---John Holmes... - Original Message

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread CPT John W. Holmes
> --- Andrei Verovski <[EMAIL PROTECTED]> wrote: > > I am need to pass serialized assotiative array via form hidden > > field (not GET or POST). > > This is impossible. A hidden form field is simply a form field that is not > displayed to the user. Form actions must be GET or POST. > > > In order t

Re: [PHP] need help with mysql union

2003-07-21 Thread CPT John W. Holmes
> hi, i'm trying to select * through 3 tables - is the following syntax correct? > > $sql="(SELECT * FROM mjp_cc)"; > $sql="UNION"; > $sql="(SELECT * FROM imc_cc)"; > $sql="UNION"; > $sql="(SELECT * FROM pmp_cc)"; > $sql.=" ORDER BY savedccactivity DESC"; > > i basically just want to spit out the c

Re: [PHP] need help with MySQL full text searching!!!!

2003-07-21 Thread CPT John W. Holmes
I think you need to make a second index that just consists of the one column ALTER TABLE biblio ADD FULLTEXT (title) if you want to search on just that one column. ---John Holmes... - Original Message - From: "Angelo Zanetti" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, Ju

Re: [PHP] explode and escape character for string separator

2003-07-18 Thread CPT John W. Holmes
From: "Reuben D. Budiardja" <[EMAIL PROTECTED]> > > This is a hypothetical situation. The real situation is that I am trying to > have a protocol for data sent by client using Flash. But the basic question > remains. So FLASH is creating the string that you must decode in PHP? Is there any way to

Re: [PHP] explode and escape character for string separator

2003-07-18 Thread CPT John W. Holmes
> On Friday 18 July 2003 02:42 pm, Chris Shiflett wrote: > > --- "Reuben D. Budiardja" <[EMAIL PROTECTED]> wrote: > > > Suppose I have a long string like > > > $myStr = "$string1:$string2:$string3"; > > > > > > I can obviously explode them using ":" as the separator. But what if > > > $string1 cont

Re: [PHP] Mail From option in PHP.ini

2003-07-18 Thread CPT John W. Holmes
> Ok, I want to specify who the mail is coming from by using the sendmail_path > option in the PHP.ini. I've added the [EMAIL PROTECTED] to it, but I want > to be able to dynmaically change [EMAIL PROTECTED] to [EMAIL PROTECTED] or > whatever else. Anyone have any ideas how I can do this? I'm pu

Re: [PHP] KEEP IMAGE RATIO

2003-07-16 Thread CPT John W. Holmes
> Ok, before you go responding with percentages, I should note this. > > consider this: > Image1 : 100x100 (Ratio = 1:1) > Image2 : 100x200 (Ratio = 1:2) > > Space available for display : 75x75 > > now, i can say "width=75% height=75%", but this will > only work for Image1, since Image2 will end

Re: [PHP] PHP POS program

2003-07-16 Thread CPT John W. Holmes
> Angelo Zanetti napsal(a): > > > Anyone know where I can download a demo point-of-sale program from? preferably written in php and preferably a point-of-sale designed for restaurants? any links etc will be great > > > This problem (POS) is too serious to be written in PHP(via browser). > Maybe in

Re: [PHP] Re: reposting in textarea

2003-07-14 Thread CPT John W. Holmes
> Artoo wrote: > > How do you repost data in a textarea field of a form? I've set up a session > > variable named old_data and want to repost the data into the textarea of a > > form so it can be re-editied. > > You can use the $_POST variavle in the text area > > eg > > You should run htmlentit

Re: [PHP] Missing php.ini file

2003-07-14 Thread CPT John W. Holmes
> You'll be waiting a long time, until the end of time :) > Because the php4 module is now named php-src, so change > that in the url and you'll be set. Thanks. Someone needs to change the link in the Configuration chapter of the manual, too, b/c that's how I always find it. :) ---John Holmes...

Re: [PHP] Writing to files

2003-07-11 Thread CPT John W. Holmes
> Any ideas on how I can print the lines of my file in reverse order, > then? Does fgets() always process from the beginning of the file even > if you open the file with the pointer at the end? I tried to get the > line count of the file and go through each line of the file backwards > but that d

Re: [PHP] php mysql array question

2003-07-11 Thread CPT John W. Holmes
> Is there any php function to pull a query into an array? I know there is a > way to get the first row of the results in an array, but I'm having to loop > through each row pushing the row onto an array to get the result I'm looking > for and it seems like a lot of code for something that I would

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread CPT John W. Holmes
> Well here is some more information so you can understand what I am > trying to do: > > I need to display their username in html/php document. This document has > a form which they fill out. It is to stop people changing who they are > when they fill out the form (for example joe bloggs filling ou

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread CPT John W. Holmes
> Everything I try I get "undefined index" what does this mean? It is > vital also that I can grab the user and the pass before somebody can > access a certain part of the website, like the authentication dialogs > that appear in Internet Explorer. Like Lief said, it's $_SERVER['LOGON_USER']... T

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread CPT John W. Holmes
> CPT John W. Holmes wrote: > > >You can get the username, that's it. > > > >$_SESSION['LOGON_USER'] > > > Don't you mean $_SERVER['LOGON_USER']? Yeah :) See what I get for giving up caffeine... ---John Holmes... -- PHP General

Re: [PHP] Capturing Windows Login Details

2003-07-11 Thread CPT John W. Holmes
> I need to capture the username and password used to login to Windows > 2000/XP with PHP. Does anybody know how to do this? You can get the username, that's it. $_SESSION['LOGON_USER'] ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

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.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] 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]

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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] [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] 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] 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] 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] 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

[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] 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

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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] How do I display new lines in a textearea?

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

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

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

Re: [PHP] Is "gd" present?

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

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

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

Re: [PHP] Get the date&time from server

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

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] 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] 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] 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] 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] 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] 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

[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] 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

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] 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] 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] 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
> 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] 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] strip_tags() Quandry....

2003-05-30 Thread CPT John W. Holmes
> Yes, no problem! Glad it worked out. you may wish to actually study the > perlre man page on perl.com. This goes into the most details and talks about > how PERL actually EXTENDS shell regular expressions significantly and > excellent resource that I have used many many times. > > I figure since

Re: [PHP] Getting POSTed values from dynamically named checkboxes

2003-05-30 Thread CPT John W. Holmes
Add some debugging code. Are you sure 36 and 37 end up in the $array_id array? Try printing out $_POST['idlist'] and $thisid as you loop through this thing to figure out where/what is getting skipped. Ditto the idea on doing this another, way, btw... :) ---John Holmes... - Original Message -

Re: [PHP] Appending to the REQUEST_URI

2003-05-29 Thread CPT John W. Holmes
Replying to myself... :) > You have to check for it, regardless. See if this works for you. > > $url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING'])) ? > $_SERVER['QUERY_STRING'] . '&' : '' ) . 'newVar=1'; > > The middle part basically sees if the QUERY_STRING is empty. If it i

Re: [PHP] Appending to the REQUEST_URI

2003-05-29 Thread CPT John W. Holmes
You have to check for it, regardless. See if this works for you. $url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] . '&' : '' ) . 'newVar=1'; The middle part basically sees if the QUERY_STRING is empty. If it is, it includes a question mark other

Re: [PHP] Checking if an array key exists

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

<    1   2   3   4   5   >