Re: [PHP] quick question

2003-03-10 Thread CPT John W. Holmes
> I'm sending credit card info to a 3rd party credit card processing site. > I would like to keep the inputted values and, after the approval, have > them appear in the value part of the form so that they don't have to > re-input the same values they had just put in for the credit card. how > ca

Re: [PHP] delete from array

2003-03-10 Thread CPT John W. Holmes
> Not sure if there is a function that I missed when I did a search on this > at php.net, but here is the situation: > > I have an array that looks something like this: > 12:00:00 > 12:05:00 > 12:10:00 > 12:15:00 > > Bascially, it just has all times in it for a day in 5 minute > increments. This i

Re: [PHP] A question of time...

2003-03-10 Thread CPT John W. Holmes
[snip] > If it turns out that I am incompetent, then I will happily send them a > bill for zero hours, otherwise I would like to take comfort that I am not > ripping them off. Just my humble opinion, of course, but I think you did the job quickly considering what you were given to start with.

Re: [PHP] A question of time...

2003-03-10 Thread CPT John W. Holmes
[snip] > Thanks, I did estimate 20 to 30 hours for them after I had set up the mirror > server and before the actual work began. At the same time I asked if they wanted > me to stop to which they replied that I should continue. Offer them some cheese with their whine and tell them to pay up! ---J

Re: [PHP] Multi-select inputs and naming

2003-03-10 Thread CPT John W. Holmes
> To others on the list: how do perl, jsp, asp, etc. > handle the passing of multiple selects? What is their equivalent of php's > "var[]" syntax for handling form values? >From what I've picked up, if there are multiple variables in the query string / post data with the same name, the scripting

Re: [PHP] header function

2003-03-10 Thread CPT John W. Holmes
Use INCLUDE(), not virtual(). virtual() isn't supposed to be used with PHP files. ---John Holmes... - Original Message - From: "Barry Gould" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 10, 2003 4:26 PM Subject: Re: [PHP] header function > I'm starting to think this i

Re: [PHP] Little Problem :)

2003-03-11 Thread CPT John W. Holmes
[snip] > The web Page (1) uses a to permit the users write their things. > If one user writes something like "" and the > sentence has 200 characters 'a' without any or enter '\n' then > in web page (2) the table becomes "too fat" (like with="2000">, for example). [snip] Use wordwrap()

Re: [PHP] Little Problem :)

2003-03-11 Thread CPT John W. Holmes
> You can use a regular expression for this task. This is what I use for my > CMS routines: > > > function make_maxlen($string, $maxlen) > { > $re = '/(.*?)([^\s]{' . $maxlen . ',})(.*)/'; > $out = null; > while (preg_match($re, $

Re: [PHP] what the hell in this sql

2003-03-12 Thread CPT John W. Holmes
> Nevertheless the $ looks weard ... Yeah, it looks weird, too. :) You're probably getting an error because $cont_id doesn't have a value. Show the SQL in context and do some debugging... ---John Holmes... > > This isn't a php question and should be directed at a sql list or to php-db > > > > H

Re: [PHP] Hacker problem

2003-03-12 Thread CPT John W. Holmes
Who cares where it comes from, just validate it. You can use POST and HTTP_REFERRER (check spelling) to stop lazy people from messing with it if that makes you feel better. ---John Holmes... - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[

Re: [PHP] foro php

2003-03-12 Thread CPT John W. Holmes
> do you know any site where I can download a free php foro to install? wtf is a "foro"? Ah... gotta love google. In italian it means "I pierce", but in spanish it means "forum", so I'll assume it's a forum you're looking for instead of some piercing PHP script. phpbb and phorum are two good one

Re: [PHP] Array syntax not covered in documentation

2003-03-12 Thread CPT John W. Holmes
> I want to do the following: > > $u=preg_replace("/[^$chars]/e",'"%".unpack("H2", "$0")', $u); > > However, as you know, unpack returns an array. I tried this instead: > > $u=preg_replace("/[^$chars]/e",'"%".(unpack("H2", "$0")[""])', $u); > > but that isn't syntactically correct. I know that th

Re: [PHP] Hacker problem

2003-03-12 Thread CPT John W. Holmes
> If you are really that strict about it coming from you site, have your form > page create an image with five letter of number on it - like 4Y6O7. Have it > create a new one each time. Then use crypt to encrypt it and put the > encrypted one into a form value, have the person that is submitting th

Re: [PHP] http->https->http redirection causes browser to show alert dialog

2003-03-13 Thread CPT John W. Holmes
> I have a login page with a form where users enter there login and > password. The form's action is "https://mysite.com/login.php";. > > login.php authenticates the user and if the authentication is successful > it ends with a: > > header("Location: http://mysite.com/welcome.html?a=b&c=etc...";);

Re: [PHP] sessions garbadge

2003-03-13 Thread CPT John W. Holmes
> > > My gc_maxlifetime = 3600 (1 hour) and my probability = 100 > > , just for > > > testing . When i create a session on my site and i dont log > > out , the > > > session var will still remain on the server , ok , after an > > hour (not > > > exactly an hour) , when i surf the site , the collect

Re: [PHP] Is there any reason...

2003-03-13 Thread CPT John W. Holmes
> If the software on this list has the facility I think the "Reply-To" > field should be set to the list. What do others think? There is already enough traffic on the list. Just use Reply-All if you want to include the list in your reply. This is how most lists I've seen are, you just have to get

Re: [PHP] form/text area input problem

2003-03-13 Thread CPT John W. Holmes
[snip] > My problem is, for the text area. [snip] www.php.net/nl2br ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is there any reason...

2003-03-13 Thread CPT John W. Holmes
> >There is already enough traffic on the list. Just use Reply-All if you want > >to include the list in your reply. This is how most lists I've seen are, you > >just have to get used to it. > > The way I see it, part of the point in a mailing list is for people with > the same question to only hav

Re: [PHP] form/text area input problem

2003-03-13 Thread CPT John W. Holmes
> for 2, yes nl2br() will do it. THanks. > > but for 1, if the user don't press enter (yes they were typing a long > paragraph), then the variable will contain one LONG string. > > ANd if I retrieve this data and put it in the html page, it would appear as > a one lined long string. DO you know w

Re: [PHP] http_session_vars

2003-03-13 Thread CPT John W. Holmes
> do the session vars get treated with magic quotes? The last comment at the bottom of: > > http://www.php.net/manual/en/function.get-magic-quotes-gpc.php > > Seems to think so. He's written good code, but I have my doubts as to whether it should be applied > to session vars. The "gpc" stands for

Re: [PHP] regex problem

2003-03-13 Thread CPT John W. Holmes
> suppose there's a string > $string="I like my(hot) coffee with sugar and (milk)(PHP)"; > > I would like to get an output of all possible combinations of the sentence > with the words between brackets: > eg. > I like my hot coffee with sugar and > I like my hot coffee with sugar and milk > I like

Re: [PHP] table cell space under image in IE

2003-03-13 Thread CPT John W. Holmes
> Has anyone had to address this problem before? I've created a table and > placed an image inside. The image is around 12 pxl high and when the table > is displayed in Mozilla the cell border is up against the image on all > sides. On IE however, the top of the image is up against the cell bord

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

2003-03-14 Thread CPT John W. Holmes
How didn't it work? How did you test it? I'd be more than willing to help you test it, but everything is sort of vague right now. ---John Holmes... - Original Message - From: "Dennis Gearon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 14, 2003 12:20 AM Subject: Re: [PH

Re: [PHP] php/mySQL time comparison

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

Re: [PHP] php/mySQL time comparison

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

Re: [PHP] Newbie MySQL INSERT Q

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

Re: [PHP] Problem with sessions expiring?

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

Re: [PHP] 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] 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
> 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
> 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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
> 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] 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
> 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] Store array as Session Variable

2003-07-28 Thread CPT John W. Holmes
> I am able to see the contents of the $company_name array. The next > part involves storing this as a session variable. > > I am trying to link this page to another search page using the href=\"full-profile.php?name=".$row['company']. "\">--Link-- If you're passing the company name in the

Re: [PHP] learning php - problem already

2003-07-29 Thread CPT John W. Holmes
> Hello everyone, > Am new to php and have run into a problem while reading my book... can anybody tell me what does this mean: Hi... let's see who gets this one first... :) > foreach($invoice as $number => $pppno) $invoice is an array. foreach() is going to loop through that array one element a

Re: [PHP] Files created by PHP/Apache

2003-07-30 Thread CPT John W. Holmes
> I've got a problem with preconfigured server (Apache 1.3/MySQL 3/PHP 4): > > Files and directories created by a PHP script are always owned by the apache > user and apache group. But the script itself is inside of a virtualhost > which has another user and group (web2 / ftponly)! > > So in fact t

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread CPT John W. Holmes
> I have PHP/Apache/MySQL installed on my WinXP laptop. I do this so that I > can write programs when not connected to the Internet (like when > traveling). I am trying to set a cookie from the http://localhost site on > my computer and it doesn't get set. Does this sound like something wrong >

Re: [PHP] downloading a file using headers

2003-07-30 Thread CPT John W. Holmes
> I have a page that queries the database then uses the data to build an > excel spreasheet. THat spreadsheet is downloaded according to info in the > headers. My manager wants to put the page inside of another HTML page to > make it prettier, but then it breaks because headers are already writte

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread CPT John W. Holmes
> h. This seemed to set the cookie just fine. Does this mean that > either localhost in the browser or Apache/PHP on a windows box has to set > the cookie differently than on RedHat/Apache/PHP? I am going on vacation > next week and need to keep working on a project that is working fine on t

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread CPT John W. Holmes
From: "Steve Buehler" <[EMAIL PROTECTED]> > hm. Looks like on my localhost I can't seta cookie like this: > setcookie ("coach_access[login_id]", "coach",0,"/","$cookhost"); > if I change it to just: > setcookie ("coach_access_login_id", "coach",0,"/","$cookhost"); > it will work. But then my

Re: [PHP] learning php - problem already

2003-07-31 Thread CPT John W. Holmes
From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> > From: John W. Holmes [mailto:[EMAIL PROTECTED] > > The four element array will be > > 1 => 'one' > > value => 'one' > > 0 => 0 > > key => 0 > > OK, some more red pen coming along Since we're whipping them out (red pens that is) > The four-element

Re: [PHP] Where am i screwing up?

2003-07-31 Thread CPT John W. Holmes
From: "Ryan A" <[EMAIL PROTECTED]> > I am just screwing around and getting used to arrays with a "foreach" thanks > to Michael,Jan and Evan from this list and have run into problems. > > My requirment is pretty simple (code is below too) > 1)unset all the sessions that might have been set with refe

Re: [PHP] Re: php path statement appears on my webpages

2003-07-31 Thread CPT John W. Holmes
> Thanks, but if I leave off this line then I get an error when I try and > view my pages. What kind of error, exactly? You need to determine if you're running PHP as a module or CGI. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] session header issue

2003-07-31 Thread CPT John W. Holmes
From: "Ow Mun Heng" <[EMAIL PROTECTED]> >> >> >> The Location: header requires a correctly formed URL, ie http://... >> > > I'm running fine using only Location:home.php on Mozilla & IE 6 > > maybe I should change. Please see my previous emails on the difference between "works" and "right"...

Re: [PHP] Formatted text from mySQL DB

2003-08-05 Thread CPT John W. Holmes
From: "PHPSpooky" <[EMAIL PROTECTED]> > When I create any field and let data be sent into my mySQL DB through > it.. it goes ok. But when I retrieve it.. the data comes completely > unformatted. Ah, this question again. Has it been four days already? HTML does not render new lines. Have a look at

Re: [PHP] PHP/JavaScript/HTML

2003-08-05 Thread CPT John W. Holmes
From: "Mauricio" <[EMAIL PROTECTED]> > I wrote a JavaScript to set the values of a Select html object by client > side. The values are copied from another Select that I create getting the > values from the database. After the user set the values he/she wants to add > it in another form, for example

Re: [PHP] Repopulating forms

2003-08-05 Thread CPT John W. Holmes
From: "Gerard L Petersen" <[EMAIL PROTECTED]> > My code looks like this. > > $test = "gerard's name is \"gerard\""; > echo $test.""; > echo ''; > ?> Just like HTML doesn't render newlines, it also doesn't understand using the \ character as an escape character. You are creating this: So, HTML

Re: [PHP] PHP/JavaScript/HTML

2003-08-05 Thread CPT John W. Holmes
From: "Mauricio" <[EMAIL PROTECTED]> > On the Address Bar I can see: index.php?slcAdd=1&slcAdd=2&slcAdd=3 > But when I get the value using $HTTP_GET_VARS['slcAdd']; it returns just the > last value. What can I do to get them all? Name your select box as "slcAdd[]" and you'll have all of the values

Re: [PHP] Parse error not understood

2003-08-07 Thread CPT John W. Holmes
From: "Chris Blake" <[EMAIL PROTECTED]> [snip] > //If "Delete User" is selected-- > if ( $_REQUEST['useroption'] == 'delete') > { [snip] > No matter which option I select I get the following output : > -- > Parse error: parse error, unexpected $ in > /var/www/html/Sessions/userman.php o

Re: [PHP] error: cannot redeclare ()

2003-08-07 Thread CPT John W. Holmes
From: "Martin Towell" <[EMAIL PROTECTED]> > I'm getting the following error: > > PHP Fatal error: Cannot redeclare () (previously declared in > /path/to/file/functions.inc:19) in /path/to/file/functions.inc on line 0 > > Anyone have any ideas how a no-name function could be generated? > Line 19 co

Re: [PHP] Correct Coding

2003-08-07 Thread CPT John W. Holmes
From: "Martin Peck" <[EMAIL PROTECTED]> > > > That can generate an error if $Task was never assigned a value. > > > > > > > could you not do > > > > if(@$Task == "Add" ){do something } > > > > to suppress the error of the variable not being set? > > I have never seen php give an error if $Task is n

Re: [PHP] Hitler and Recent Threads

2003-08-07 Thread CPT John W. Holmes
From: "Mark" <[EMAIL PROTECTED]> > > And as they say, "Never argue with a fool. People will > not be able to tell the differnce." I thought it was "Never argue with an idiot. They drag you down to their level and beat you with experience" :) ---John Holmes... -- PHP General Mailing List (http

Re: [PHP] Downloding files once

2003-08-07 Thread CPT John W. Holmes
From: "Boaz Yahav" <[EMAIL PROTECTED]> > > Can you fake a referrer by say, using fsockopen() and sending your > own headers? Yep. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: [PHP-DB] Sorting issue

2003-08-08 Thread CPT John W. Holmes
"Jeff" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why would a mysql db think that 55 was greater than 14000. > > I have several headings that display sql data under them, when you click on > the heading, it sorts that section (descending/ascending), but it only seems > to be look

Re: [PHP] setting function variables

2003-08-09 Thread CPT John W. Holmes
From: "Mark" <[EMAIL PROTECTED]> > I seem to learn something new every time you or Jennifer post (many > others as well). I never knew about variable functions. Cool! You're welcome. I wouldn't recommend that solution exactly (an abstraction class would be better), but the functions do come in han

Re: [PHP] htmlspecialchars() and HTML code

2003-08-10 Thread CPT John W. Holmes
From: "Thaddeus J. Quintin" <[EMAIL PROTECTED]> > I'm working on a site where users have the option to type HTML code into > a textarea, or upload HTML code from a local file which is then > displayed in the text area. > > The obvious problem is that an uploaded file that contains a closing tag > f

Re: [PHP] how do i get assosciative name in foreach

2003-08-10 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]> > I want to do: > > > $array['element1'] = 'element1'; > $array['element2'] = 'element2'; > > foreach ($array as $element) > { > // assuming get_assoc gets the assosciative name > if (get_assoc($element) == 'element1') > {get_assoc($element) do_s

Re: [PHP] Stop neurotic posting

2003-08-10 Thread CPT John W. Holmes
Honestly, if you people ignored the stupid responses as much as you want us to ignore the stupid questions... we wouldn't be having this "discussion". ---John Holmes... - Original Message - From: "Nicholas Robinson" <[EMAIL PROTECTED]> To: "andu" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread CPT John W. Holmes
From: "Nicholas Robinson" <[EMAIL PROTECTED]> > The 'usual' trick is to set the date to the first day of the month after the > one you want and then subtract one day. Along those same lines, this works: ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] Config files

2003-08-14 Thread CPT John W. Holmes
From: "Hardik Doshi" <[EMAIL PROTECTED]> > I have following options for working with the > configuration files with the relatively large web > application. > > 1. Configuration variables using the DEFINE. > > 2. Array - Each configuration variable as an array > element. > > 3. PHP.INI like config f

Re: [PHP] PHP Session Problem!.....urgent!

2003-08-14 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > Dear Sir, You don't have to call me that unless you're in the military, also. :) > I've been using PHP for business and personal use for a while now, and I > have to admit, I'm not just a user anymore and I am a fan. but it's been a > while I came across a problem : I

Re: [PHP] Sum a column of values from a MySQL query

2003-08-14 Thread CPT John W. Holmes
Sorry, Jay, but that's a horrible method. You could just run one query with a GROUP BY clause to get the sum for each invoiceID, instead of running multiple queries like you've mentioned... $query = "SELECT invoiceid, SUM(partpaidamount) AS partpaid FROM $tb_name GROUP BY invoiceid"; $rs = mysql_q

Re: [PHP] greedy preg

2003-08-14 Thread CPT John W. Holmes
From: "skate" <[EMAIL PROTECTED]> > $contents = preg_replace( "|.*?".$file.".*?|si", "", > $contents ); > > okay, so i figured out that it's matching the first occurence of > which will always be the first record and then going on to match the $file > and deleting everything between. obviously not

Re: [PHP] image button problem

2003-08-14 Thread CPT John W. Holmes
From: "Abdul-wahid Paterson" <[EMAIL PROTECTED]> > I am trying to create an HTML form that has several image buttons on it > and the resulting action depends on which button is pressed. > > I first tried using but from > IE on the PHP side I only get $_POST['test_x'] and $_POST['test_y'] > defined

Re: [PHP] what is %s %d

2003-08-14 Thread CPT John W. Holmes
From: "Jackson Miller" <[EMAIL PROTECTED]> > They are codes for date formatting. > > Specifically: > %s represents seconds with leading zeros. > %d represents day of the month with leading zeros > > so > date("%s %d",mktime()); > would equal something like > 59 08 Actually you'd get: %59 %08 b

Re: [PHP] Stop neurotic posting

2003-08-14 Thread CPT John W. Holmes
From: "Gabriel Guzman" <[EMAIL PROTECTED]> > On Wed, 2003-08-06 at 11:44, Chris W. Parker wrote: > > > A bad answer would be: > > > > "RTFM http://php.net/preg_match"; > > > > A good answer would be: > > > > "That can be done with a regular expression. The function you're looking > > for is called

Re: [PHP] mysql_error() problem?

2003-08-14 Thread CPT John W. Holmes
From: "Tyler Longren" <[EMAIL PROTECTED]> > I'm running an UPDATE query on my table. After executing the query, I check > mysql_error() to see if there's any errors: > if (mysql_error() == "") { > // success > } > else { > // failure > } > > mysql_error() is always empty even if the query

Re: [PHP] Array to List

2003-08-14 Thread CPT John W. Holmes
From: "James Johnson" <[EMAIL PROTECTED]> > Actually, I'm using $campusList for a SQL statement: > > SELECT name FROM campuses WHERE inst_id IN ('$campusList'); > > It wasn't working until I found out that $campusList needs to look like > '1','2','3'. > > $campusList = implode( ', ', $_POST['campu

Re: [PHP] dev style guide

2003-08-14 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > Just a remark but isn't it pointless to use Hungariannotation in a > language that is by default typeless??? I would think that it would be the reason why you WOULD want to use Hungarian notation (not that I do, though). Even though you can take nVar and concatinate it

  1   2   3   4   5   >