Re: [PHP] "include" working....but confusion

2004-01-20 Thread CPT John W. Holmes
From: "Ryan A" <[EMAIL PROTECTED]> > Thanks for the very informative reply but I did try itproblem is, it > seems to work with and without...thats why the confusion. > > I have one program like the one i outlined and the second one, like this: > > some html code goes here > some output stuff g

Re: [PHP] "include" working....but confusion

2004-01-20 Thread CPT John W. Holmes
From: "Ryan A" <[EMAIL PROTECTED]> > Do I have to start and end the included files with? Yes. One day you'll learn to spend the two seconds trying this instead of asking the list. I'll be so proud of you then! ;) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] Flash .swf outside webroot: width and height problems

2004-01-20 Thread CPT John W. Holmes
From: "Toby Irmer" <[EMAIL PROTECTED]> > I am trying to display an .swf-file that is stored outside the webroot. > > Just sending the header and doing a readfile on the swf results in the swf > being displayed with the maximum available width and height. > > Does anyone know a way of displaying Fl

Re: FW: [PHP] Re: Generating an Excel file?

2004-01-20 Thread CPT John W. Holmes
From: "Ben Ramsey" <[EMAIL PROTECTED]> > [EMAIL PROTECTED] wrote: > > or download the file without the php-script and analyse the > > http-headers with a network-sniffer > > There is no way to download the "file" without the PHP script. It is > being generated by the PHP script from data in a d

Re: [PHP] preg_replce ' for use with mysql

2004-01-20 Thread CPT John W. Holmes
From: "Nirnimesh" <[EMAIL PROTECTED]> > How do I replace all ' with \' in php so that I'm able to use the mysql > queries. Note that simply using: preg_replace("/'/", "\'", -1) is not what > I'm looking for, for this does not help me. Let's say I take the address > from a form and want to enter it

Re: [PHP] php running as user apache

2004-01-20 Thread CPT John W. Holmes
From: "Nirnimesh" <[EMAIL PROTECTED]> > My question relates to using php for handling file uploads. Since php runs > as user apache, using it to manage file uploads means that I need to give > write permissions to the user apache, which is a near-to-nobody user, i.e. > 0+w permissions. Now does th

Re: [PHP] Cookie Guestion

2004-01-20 Thread CPT John W. Holmes
From: "Stuart" <[EMAIL PROTECTED]> > And don't forget the effect media hype had on their reputation. Cookies > were portrayed as bad guys. As John says, they're not if they're used > correctly, but it only takes one high-profile example of improper use to > tarnish a reputation forever. And as th

Re: [PHP] Cookie Guestion

2004-01-20 Thread CPT John W. Holmes
From: "Chris W" <[EMAIL PROTECTED]> > I am still new to web programing but I have a lot of experience in > developing non web based applications. So I think I am a reasonably > clever programmer and I have now done enough web programming that I > understand the cookie mechanism. What I can't fi

Re: [PHP] PHP Includes and Echoes in Head Sections and Search Engines

2004-01-15 Thread CPT John W. Holmes
From: "Freedomware" <[EMAIL PROTECTED]> > I discovered that includes will apparently work just about anywhere, but > echo functions apparently don't work with the tag and meta tags; > at least, I can't see the word "Alaska" in those locations when I click > View Source in my browser. Look back o

Re: [PHP] MySQL Question

2004-01-15 Thread CPT John W. Holmes
From: "John Taylor-Johnston" <[EMAIL PROTECTED]> > Sorry, don't want to be off-topic, but have found something curious about MySQL 4.0.16-standard. > > It does not seem to prioritise properly. Searching for 'English Canada' > (as opposed to +English +Canada) > gives me all instances of both words

Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread CPT John W. Holmes
From: "Toby Irmer" <[EMAIL PROTECTED]> > that was explaining the prinicple. > > of course you wouldn't do it like this, but pass an id to identify. you > could also send an encryption key... Ok. I'm sure the original poster is grateful. Hopefully, if anyone actually searches those things called t

Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread CPT John W. Holmes
From: "Toby Irmer" <[EMAIL PROTECTED]> > file: show.php > > header("Content-type: image/jpeg"); > readfile("/path/to/file/".$_GET["filename"]); > ?> > > > in your files: > > > > or something like that ;) Are you trying to get him to compromise his server? I'm sure that's just a simple suggestio

Re: [PHP] regexp with mysql

2004-01-15 Thread CPT John W. Holmes
How about: SELECT * FROM table WHERE FIND_IN_SET(2,column); where "column" is your table column containing the comma separated list. ---John Holmes... - Original Message - From: "Toby Irmer" <[EMAIL PROTECTED]> To: "Lowell Allen" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]> Sent: T

Re: [PHP] Multiple Queries

2004-01-15 Thread CPT John W. Holmes
From: "Arthur Pelkey" <[EMAIL PROTECTED]> > I have a page that has multiple queries on it, I want to do doing the > following: > > Query a mysql db multiple times in the same page, but i must be missing > something, I keep getting these AFTER the first queryis successful: > > Warning: mysql_fetch_

Re: [PHP] Junk Mail from this List?

2004-01-15 Thread CPT John W. Holmes
From: "Ben Ramsey" <[EMAIL PROTECTED]> > I'm using Mozilla Thunderbird 0.7 to view and post to this news group, > so I don't know if that has anything to do with this, but, after just > posting a few messages to the list, I've received a bunch of what I > consider spam to my e-mail address. Comm

Re: [PHP] Printing on remote windows printers

2004-01-15 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > Can i print on remote windows systems using php printing functions? > How can i do ? No. Use a client side solution. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re[2]: [PHP] nested tags

2004-01-14 Thread CPT John W. Holmes
From: "Richard Davey" <[EMAIL PROTECTED]> > GJ> HTML tags. > GJ> I can have something like > GJ> > GJ> first > GJ> > GJ> second table > GJ> > GJ> table > GJ> > > GJ> and i need to convert each tags into something more user > GJ> friendly. > > Come again? Might be helpful to give an

Re: [PHP] convert date from UK to US for strtotime

2004-01-14 Thread CPT John W. Holmes
From: "Jon Bennett" <[EMAIL PROTECTED]> > I'm trying to re-work this code from the php site > so that my users can input dates in UK > format (dd-mm-) and still use strtotime. > > // from http://uk.php.net/strtotime > > $date=explode("/",trim($records[2])); > $pos

Re: [PHP] Multiple RDBMS in one request

2004-01-14 Thread CPT John W. Holmes
From: "Geoff Caplan" <[EMAIL PROTECTED]> > Is it possible to interact with multiple RDBMS during a single > request? I seem to remember that with older versions at least, there > was some problems with this, but can't find anything definitive in the > archive or docs. Yes, you can open up multipl

Re: [PHP] Defining own globals

2004-01-14 Thread CPT John W. Holmes
From: "Ville Mattila" <[EMAIL PROTECTED]> > Would it be possible to make all hard-coded variables beginning with $_ > automatically global? I've found useful to set some variables per page > to $_PAGE variable (for example $_PAGE['title'] etc) that would be nice > to get available to all functions

Re: [PHP] Function Problem (Long-ish)

2004-01-13 Thread CPT John W. Holmes
From: "Dave Carrera" <[EMAIL PROTECTED]> > I get a Warning: > mysql_fetch_array(): supplied argument is not a valid MySQL result resource Whenever you get this warning it's because your query failed for some reason and you're trying to use a result that's not valid. Use mysql_error() to see wha

Re: [PHP] Globals problem - $_REQUEST good solution?

2004-01-12 Thread CPT John W. Holmes
From: "Ryan A" <[EMAIL PROTECTED]> > After going through the manual trying to find an answer I came accross > $_REQUEST, is this a good > solution? because I have never used this before or is this as bad as having > globals on? The only simularity it has to register_globals ON is that you don't k

Re: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
From: "Ashley M. Kirchner" <[EMAIL PROTECTED]> > >RD> SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09 > >RD> 00:00:00' AND '2004-01-04 23:59:59' > > > >Actually sorry, inverse the seconds (put the 00:00:00 onto the lower > >date, the 4th) so it encompasses the whole period. Y

Re: Re[2]: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
From: "Richard Davey" <[EMAIL PROTECTED]> > RD> SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09 > RD> 00:00:00' AND '2004-01-04 23:59:59' > > Actually sorry, inverse the seconds (put the 00:00:00 onto the lower > date, the 4th) so it encompasses the whole period. You might a

Re: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
From: "Ashley M. Kirchner" <[EMAIL PROTECTED]> > I need to query for record within a certain date stamp. The > datetime field contains the createdon information that i need and is in > the following format: 2004-01-11 21:40:50 > > What I'd like to do is search for records that are betwee

Re: [PHP] Very confusing problem!

2004-01-07 Thread CPT John W. Holmes
From: "Aaron Wolski" <[EMAIL PROTECTED]> > Fatal error: Call to a member function on a non-object in > /services/webpages/a/t/somedomain.com/secure/Store/index.php on line 140 > > The line of code is this: > > $paging->query("SELECT * FROM ProductTable"); > > At the top of the page I have this: >

Re: [PHP] if("NANC" < 0) - always evaluates TRUE...

2004-01-06 Thread CPT John W. Holmes
From: "Kelly Hallman" <[EMAIL PROTECTED]> > On Tue, 6 Jan 2004, Ivo Pletikosic wrote: > > $data = 'NANC'; > > if(is_numeric($data) && $data < 0) { die('Not OK'); } > > Interesting problem, one of the first legit oddities I've seen since > joining the list. Anyway, in addition to your workaround,

Re: [PHP] mysql_affected_rows() function

2004-01-06 Thread CPT John W. Holmes
From: "Tyler Longren" <[EMAIL PROTECTED]> > That's not the exact code. The exact code is below. Multiple workers > are being selected from a MULTIPLE form field. I just use a > while loop do go through the selected ones to delete them individually. > > PHP Version: 4.3.4 > MySQL Version: 4.0.1

Re: [PHP] mysql_affected_rows() function

2004-01-06 Thread CPT John W. Holmes
From: "Tyler Longren" <[EMAIL PROTECTED]> > I don't think mysql_affected_rows() is working like it should for me. > In the manual for mysql_affected_rows() it has this (Example 1): > > /* this should return the correct numbers of deleted records */ >mysql_query("DELETE FROM mytable WHERE id <

Re: [PHP] eregi filter stopping valid email address, part two

2004-01-06 Thread CPT John W. Holmes
From: "Dave G" <[EMAIL PROTECTED]> > A while ago on this list I posted a few questions about an eregi > filter for email addresses entered into a form. With the help of people > on this list, I settled on the following code which has worked fine in > the months since I started using it. The code i

Re: [PHP] No

2003-12-24 Thread CPT John W. Holmes
From: "Robin Kopetzky" <[EMAIL PROTECTED]> > Good Morning and Merry Christmas to all. > > I recently installed PHPTriad to a new server and the not work on ANY html page. Does anyone know what I may have missed in > configuration? Help... Try using them on a .php page? PHP doesn't normally run

Re: [PHP] Headers Problem

2003-12-24 Thread CPT John W. Holmes
From: "Beauford" <[EMAIL PROTECTED]> > Just a clarification, session_start() is on the first line of restricted.inc > and restricted.inc is included on the first line of > update-corrections-input.php. All update-corrections-write.php does is write > info to a database and includes update-correctio

Re: [PHP] Error with Absolute URLs

2003-12-24 Thread CPT John W. Holmes
From: "Brad" <[EMAIL PROTECTED]> > I keep getting errors on my websites, that contain absolute URLs, e.g. > http://www.url.com/blah.html. With most, being in the folder of my > website, it's fine, i can just add $_SERVER['DOCUMENT_ROOT'], but > there's a script I use to display the network statisti

Re: [PHP] Removing/unsetting session variables.

2003-12-24 Thread CPT John W. Holmes
From: "Alain Williams" <[EMAIL PROTECTED]> > I have several variables that I set in a session - to record that a user is logged in. > I want to be able to unset them - when they log out. > > $_SESSION['PERMS_USER'] = 'fred'; > Sets the variable quite nicely, I can also change it and the change is

Re: [PHP] String replacement problems...

2003-12-23 Thread CPT John W. Holmes
From: "John Clegg" <[EMAIL PROTECTED]> > I am trying to figure out how to get ereg_replace / preg_replace to > replace a match only once. The fourth parameter to preg_replace() is an integer limit to how many matches you want to allow. So, if you only want 1 replacement to occur, pass 1. :) ---Jo

Re: [PHP] Simple fwrite question

2003-12-23 Thread CPT John W. Holmes
From: "Hartley, Matt" <[EMAIL PROTECTED]> > I am trying to have a counter in a file. With what I have below I get in > the $counterfile > > 0 + 01 = 01 > 01 + 01 = 012 > 012 + 01 = 01213 > > [snip] > > /* Add "1" to the counter */ > $counter = ($counter + '01'); You're "adding" a string. T

Re: [PHP] warnings

2003-12-23 Thread CPT John W. Holmes
From: "Chakravarthy Cuddapah" <[EMAIL PROTECTED]> > Can anyone pls tell me how to prevent warnings to > be displayed on the screen ? > For example, I get this message: > Warning: ldap_get_entries(): supplied argument is > not a valid ldap result resource in test.php on line 235 http://us2.php.n

Re: [PHP] Addslashes limit

2003-12-17 Thread CPT John W. Holmes
From: "Cesar Cordovez" <[EMAIL PROTECTED]> > Is it just me or addslahes truncates the result to 65535 chars? Any > comments? Or can it be that a blob field in a MySQL database is just > 65535 chars, I don't think so... Think again... BLOB, TEXT L+2 bytes, where L < 2^16 MEDIUMB

Re: [PHP] PHP header command crashes IE6x/PC

2003-12-12 Thread CPT John W. Holmes
From: "Matt MacLeod" <[EMAIL PROTECTED]> > if (!ISSET($_SESSION['loggedin'])) { > header("Location: /admin/login/"); put exit(); after your header redirect and use a full URL for your location. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] $_POST[$variable]

2003-12-11 Thread CPT John W. Holmes
From: "Christian Jancso" <[EMAIL PROTECTED]> > I have the following problem: > How can I use variables in the $_POST statement? > Here is my code: > > $old_station[$o] = $_POST['$i']; > $new_station[$o] = $_POST['$i']; $old_station[$o] = $_POST[$i]; $new_station[$o] = $_POST[$i]; Variables are n

Re: [PHP] date convertion

2003-12-09 Thread CPT John W. Holmes
> I have a script where a user inputs a date in MMDD format, and I need > to convert it to month day, year. For example they will enter 20031209 > and I need the script to return the date as December 09, 2003. They won't > be entering today's date, so I can't use the timestamp with the date >

Re: [PHP] converting string into array with regex

2003-12-05 Thread CPT John W. Holmes
From: "Adam i Agnieszka Gasiorowski FNORD" <[EMAIL PROTECTED]> > No, no spaces between letters (otherways > it would be very easy, indeed). So there is > no way to match the "space between alphanumeric > chars" and split on it? I was trying to avoid > the loop solution. Of course there is. In

Re: [PHP] What do you say to someone who says...

2003-12-04 Thread CPT John W. Holmes
From: "Cesar Cordovez" <[EMAIL PROTECTED]> > > I work on a project 100% made in PHP and MySQL that > > costs a lot of money (6 figures) a copy. > > PD. Did I mention that it is cheap and reliable. Please tell me in what world is 6 figures considered cheap?? ---John Holmes... -- PHP General

Re: [PHP] Re: IE download problem

2003-11-26 Thread CPT John W. Holmes
From: "Luis Lebron" <[EMAIL PROTECTED]> > "Internet Explorer cannot download...?sender=171&filename=.jpg from > somedomain.com. Internet Explorer was not able to open this Internet site. > The requested site is either unavailable or cannot be found. Please try > again later." Are you using se

Re: [PHP] IE download problem

2003-11-26 Thread CPT John W. Holmes
From: "Luis Lebron" <[EMAIL PROTECTED]> > I am working on a script to force downloading a file. The script works fine > with NS (4.8 and 7) but does not work correctly with IE 6.0 > I have looked at examples on php.net and have googled for a solution, but > still can't find a solution. I think IE

Re: [PHP] Stripping out all illegal characters for a folder name

2003-11-26 Thread CPT John W. Holmes
Sorry for the reply to the reply, but OExpress won't let me reply to newsgroup posts... From: "Sophie Mattoug" <[EMAIL PROTECTED]> > Joseph Szobody wrote: > >I'm taking some user input, and creating a folder on the server. I'm already > >replacing " " with "_", and stripping out a few known illega

Re: [PHP] Regular expression help

2003-11-25 Thread CPT John W. Holmes
From: "Bronislav Klučka" <[EMAIL PROTECTED]> > > I need someone to tell me exactly what this regular-expression means: > > if(ereg("[^ \t\n]",$val)) { > > // do the job here > > This condition is true if there is no space, new line or tabulator in $val Actually, the regular expression will mat

Re: [PHP] Deleting a String from a file.

2003-11-21 Thread CPT John W. Holmes
From: "Cameron Badgley" <[EMAIL PROTECTED]> > Hey, I'm trying to write a script which deletes a String from a file. The > String that the user wants deleted is provided from a form and the file is > named to2do.txt. I have a hidden variable called "deleting" that lets me > know when the string has

Re: [PHP] Integrating Perl into PHP

2003-11-21 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]> > Is it possible to execute perl from a PHP script without resorting to a > system call (which might possibly be disabled on a users system)? http://us2.php.net/virtual ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread CPT John W. Holmes
From: "Chris Shiflett" <[EMAIL PROTECTED]> > --- "CPT John W. Holmes" <[EMAIL PROTECTED]> wrote: > > > > I'm against letting users enter HTML in their data, also. I'd rather > > emply a bbcode type solution, turning [b] into , etc. &g

Re: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread CPT John W. Holmes
From: "Wouter van Vliet" <[EMAIL PROTECTED]> > Let's make this personal: what would be your answer if I would advice the > friendly person to do this: Heh.. I hope you're just kidding about "making it personal"... I was just presenting security problems with various solutions. > (..) $Content h

Re: [PHP] Timer and submit button

2003-11-21 Thread CPT John W. Holmes
From: "Frank Tudor" <[EMAIL PROTECTED]> > I am trying to create a timer tha would prevent someone from > clicking submit until the timer reaches zero. JavaScript. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mulitple selects from form drop down box

2003-11-20 Thread CPT John W. Holmes
From: "Jeff McKeon" <[EMAIL PROTECTED]> > Is it possible to have a form "Drop down box" that allows multiple > selects? I know the form field itself exists, but It only seems to > return the last item selected and not all of them. > > Note in the code below the line: This is the expected behavi

Re: [PHP] Curious about something....

2003-11-20 Thread CPT John W. Holmes
From: "Dan Joseph" <[EMAIL PROTECTED]> > Is there any particular advantage to having the default PHP install exclude > a lot of useful modules such as mcrypt, cli, sockets, etc? Yes. I've found that I do not need those libraries and have a secret agreement preventing them from being included...

Re: [PHP] array_search

2003-11-20 Thread CPT John W. Holmes
From: "Jake McHenry" <[EMAIL PROTECTED]> > I've been using array_search in my scripts for a while now, but have > come across a problem. My new page has a textarea field. If I enter > any new lines in the textarea, array_search returns false. [snip] > Kinda stuck here.. Not sure what I should try

Re: [PHP] Comparing 2 strings.

2003-11-19 Thread CPT John W. Holmes
From: "Ed Curtis" <[EMAIL PROTECTED]> > I currently store text from a MySQL blob field in a string $orig_text. I > need to compare that with something someone type in from a form stored in > $new_text. How would I go about comparing them to see if they are > different or exactly the same? strcmp

Re: [PHP] I cannot run a .php file on a IIS

2003-11-19 Thread CPT John W. Holmes
From: "Papadogoulas Christos" <[EMAIL PROTECTED]> > I was going to ask you how can I run a .php file using IIS. > IIS and PHP, and a virtual directory are already installed. I would suggest you actually make an attempt at installing PHP according to the directions in the manual... http://www.p

Re: [PHP] how to trap eval error?

2003-11-18 Thread CPT John W. Holmes
From: "david" <[EMAIL PROTECTED]> > Cpt John W. Holmes wrote: > > From: "david" <[EMAIL PROTECTED]> > > > >> i found a solution (hopefully) with: > >> > >> if(function_exists($function)){ > >> eval(&#

Re: [PHP] =sessions / J. Meloni Textbook=

2003-11-18 Thread CPT John W. Holmes
Anthony Ritter wrote: > The following code is from "PHP, mySQL and Apache" (SAMS) by Julie Meloni. [snip] > if (isset($_POST[form_products])) { > if (!empty($_SESSION[products])) { > $products = array_unique( > array_merge(unserialize($_SESSION[products]), > $_POST[form_product

Re: [PHP] how to trap eval error?

2003-11-18 Thread CPT John W. Holmes
From: "david" <[EMAIL PROTECTED]> > i found a solution (hopefully) with: > > if(function_exists($function)){ > eval('$return = $function($input);'); > }else{ > // function does not exists > } > > which works quit nicely for now. not sure if that's a good thing to do. Why not ju

Re: [PHP] passing PHP variables to Javascript ...

2003-11-17 Thread CPT John W. Holmes
From: "Kenn Murrah" <[EMAIL PROTECTED]> > I need to be able to pass a PHP variable to a Javascript and can't > figure out how to do it. In short, the Javascript win() statement is > used open a page as defined in PHP -- i.e., $php_name = > "http://www.somewhere.com/something/3.jpg"; , a filenam

Re: [PHP] passing second function through a function

2003-11-17 Thread CPT John W. Holmes
From: "David Otton" <[EMAIL PROTECTED]> > >From: "Ian Truelsen" <[EMAIL PROTECTED]> > > > >> What I want to do is to call a function from within a function, but pass > >> the secondary function name through the first function. Like this: > >> > >> function1(function2) > >> > >> Then call function2

Re: [PHP] passing second function through a function

2003-11-17 Thread CPT John W. Holmes
From: "Ian Truelsen" <[EMAIL PROTECTED]> > What I want to do is to call a function from within a function, but pass > the secondary function name through the first function. Like this: > > function1(function2) > > Then call function2 from within function1. Unfortunately, I have been > unable to

Re: [PHP] convert string to number

2003-11-17 Thread CPT John W. Holmes
From: "Jay Blanchard" <[EMAIL PROTECTED]> > From: "Diana Castillo" <[EMAIL PROTECTED]> > > > [snip] > > what is the easiest way to convert a string like this "1,300.99" to a > > number? > > [/snip] > > http://www.php.net/settype That'll just result in the number 1, though, since the conversion to

Re: [PHP] msession - giving me a hard time

2003-11-17 Thread CPT John W. Holmes
From: "Guillaume Dupuis" <[EMAIL PROTECTED]> > This works. My second page has the suffix '?PHPSESSID=e6t9tu43j9tj39j...', > that matches the 'echo $sessid' I've added to your script above, so this > part did work. But to test it, I do this in my second page: > > session_start(); > $sessid = sessi

Re: [PHP] Having fits with input to array

2003-11-17 Thread CPT John W. Holmes
- Original Message - From: "Susan Ator" <[EMAIL PROTECTED]> > Hm... I should clarify this some more. This is the result of $Array2: > > Array ( > [0] => Array ( > [0] => 15083 [snip] > What I need is to be able to assign a variable to $Array2[0] - [0] so for > the first one it would be:

Re: [PHP] msession - giving me a hard time

2003-11-14 Thread CPT John W. Holmes
From: "Guillaume Dupuis" <[EMAIL PROTECTED]> > I've tried your suggestion and yes, I am transferring the SID variable to > the next page... but I don't know if I am doing the this right. > > This is the code I use: > --- > session_start(); > $SID = session_id(); > echo $SID; > ?> > > LinuxBox2 > -

Re: [PHP] Having fits with input to array

2003-11-14 Thread CPT John W. Holmes
From: "Susan Ator" <[EMAIL PROTECTED]> > Perfect! That did exactly what I needed. Good... > Now, *ahem*, I thought I knew how to assign variables to the elements in > Array2 but *cough* I'm somewhat befuddled. I've not been able to find > anything in the online php manual. Could you point me in

Re: [PHP] variables from perl cgi into a php

2003-11-14 Thread CPT John W. Holmes
From: "mailing" <[EMAIL PROTECTED]> > I have a multiuser web based image managment application (the Perl script) and I want to add some accounting scripts (to be written in php). The guy that wrote the perl script is unavailable to work it in the perl script due to time constraints - so I was won

Re: [PHP] get some part of text

2003-11-14 Thread CPT John W. Holmes
[snip] job_resp errorCode="4194337" description="Originator you" I need to take only errorCode value from this string. I am thinking and thinking and can not find how to to. I can split with "=" but allways erroCode place is changing in the string. [/snip] How about this, also... $pos = strpos('

Re: [PHP] variables from perl cgi into a php

2003-11-14 Thread CPT John W. Holmes
From: "mailing" <[EMAIL PROTECTED]> > I wonder if any one can help with this problem. > I have a script working really well (not my scripting but my script) written in perl /cgi. > I would like to write some simple scripts using the variables and data from the cgi script. > Is there a way that I ca

Re: [PHP] Having fits with input to array

2003-11-14 Thread CPT John W. Holmes
From: "Susan Ator" <[EMAIL PROTECTED]> > For example, the command: > > ps -C bash --no-headers -o fname,state,vsz,start_time,flag,user,cputime,args > --cols 200 > > gives me the output of: > bash S 4396 Nov13 000 sator 00:00:00 -bash > bash S 4392 Nov13 000 sator 00:00:00 -bash > bash S 4396 Nov13

Re: [PHP] Random Function

2003-11-14 Thread CPT John W. Holmes
You're code doesn't make sense. You're looking for 3 random numbers, between 1 and 3 inclusive. Umm.. 1,2,3. Do you want them in a random order, or something? Maybe the upper limit of rand() and how many numbers you're looking for ($n), should be different?? ---John Holmes... - Original Mes

Re: [PHP] File permissions on Windows, IIS

2003-11-14 Thread CPT John W. Holmes
From: "Chris Shiflett" <[EMAIL PROTECTED]> --- Marius Røstad <[EMAIL PROTECTED]> wrote: > > I have a Windows XP pro > [snip] > > How do I change file permissions to make it "identical" to the > > chmod 777 on Unix systems. > > With Windows, you probably right-click the file and go to properties, th

Re: [PHP] Headers Sent Message

2003-11-14 Thread CPT John W. Holmes
From: "Mark Roberts" <[EMAIL PROTECTED]> > Could someone help me out with this. I had this problem about a year ago > with another site and I can't for the life of me remember what I had to do > to fix it. I am in a oscommerce application, however I think it is really a > php problem. I get this m

Re: [PHP] msession - giving me a hard time

2003-11-13 Thread CPT John W. Holmes
From: "Guillaume Dupuis" <[EMAIL PROTECTED]> > Now, I am testing the interaction of 2+ servers working together. From > SERVERA I create and echo the my SID using "echo session_start(); echo > session_id();echo $SID;", and then I follow a link (within the same browser > session) to SERVERB and then

Re: [PHP] session timeout

2003-11-13 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > > How do I set the session timeout - eg someone leaves a broweser for say > > half an hour then have to log in again.. > > As I'm on an intranet I want to increase ro 3 hours > > Pete, Change the default configuration of the option session.cookie_lifetime > in the php.in

Re: [PHP] session timeout

2003-11-13 Thread CPT John W. Holmes
From: "pete M" <[EMAIL PROTECTED]> > How do I set the session timeout - eg someone leaves a broweser for say > half an hour then have to log in again.. > > As I'm on an intranet I want to increase ro 3 hours Exact method: Save the current time on each request in the session. On each request, chec

Re: [PHP] validate names with regex

2003-11-12 Thread CPT John W. Holmes
From: "Chris W. Parker" <[EMAIL PROTECTED]> > Can someone post a function or regex that can validate names (first and > last)? The most important bit is that names like O'Malley and Hope-Jones > are not barred. I use this: //allow a possible ', -, or space in name. ' will //be re

[PHP] Re: Need a nicer way to escape single/double quotes....

2003-11-12 Thread CPT John W. Holmes
"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > I haven't found a more efficient way to better escape the quote > characters for the javascript right from PHP because I only get "The kid" in > the javascript alert message, so I'm wondering if anyone of y

Re: [PHP] Getting an uploaded picture

2003-11-12 Thread CPT John W. Holmes
From: "Mike R" <[EMAIL PROTECTED]> > I thought about that, but figured I'd ask first - particularly since I > wasn't sure which code to send: the code for uploading the pictures or the > code that displays the pictures/links to them? Show the code that displays the links to them and some of the re

Re: [PHP] Why is this code not working?

2003-11-12 Thread CPT John W. Holmes
From: "Dave G" <[EMAIL PROTECTED]> > PHP Gurus, If you say so... > I'm trying to put the results of a query into an array. > My code looks like this: > $query = "SELECT datecolumn FROM table WHERE MONTH(datecolumn) = " . > $currentMonth; > $result = mysql_query($query); > $numRows = mysql_num_r

Re: [PHP] overriding string concatenation '.'

2003-11-12 Thread CPT John W. Holmes
From: "Chris W. Parker" <[EMAIL PROTECTED]> > > CPT John W. Holmes <mailto:[EMAIL PROTECTED]> > > > The dots in ipaddr variable are considered to be > > > string concatenations. > > > > No they are not. Show some examples. > >

Re: [PHP] overriding string concatenation '.'

2003-11-12 Thread CPT John W. Holmes
From: "tirumal b" <[EMAIL PROTECTED]> > I have an ip addr in a variable. I use > 'ssh'.$ipaddr.'command' in a php file > > The dots in ipaddr variable are considered to be > string concatenations. No they are not. Show some examples. ---John Holmes... -- PHP General Mailing List (http://ww

Re: [PHP] keyword searching

2003-11-12 Thread CPT John W. Holmes
From: "Adam Williams" <[EMAIL PROTECTED]> > I'm using Informix SQL. Could have saved some bandwidth by mentioning that in the first place and only posting to either php-general or php-db (which is more appropriate), not both. :) Ignore what my other posts said, as I don't know how Informix works

Re: [PHP] testing a variable

2003-11-12 Thread CPT John W. Holmes
From: "Adam Williams" <[EMAIL PROTECTED]> > I need to test a variable to see if it contains a value or not, and if > not, do something. [snip] > if ( !isset($var ) > { echo "do something";} That's the correct way. > What I am doing is checking a field in an sql table, and if the field is > nul

Re: [PHP] Changing case

2003-11-12 Thread CPT John W. Holmes
From: "Robert Sossomon" <[EMAIL PROTECTED]> > I have a form that allows for an item to be entered, the other pieces > have been fixed so far that were bogging me down, but now I am looking > for a way to convert any entry in the form to be UPPER case so that when > the quote is listed, they are al

Re: [PHP] Re: High bandwidth application tips

2003-11-07 Thread CPT John W. Holmes
From: "Richard Baskett" <[EMAIL PROTECTED]> > > * use recent mysql 4.x The new versions have ability to cache results of > > often used queries, and return the results very fast without even touching > > the disk. Note that this is much better for web apps than usual query > > cacheing that many da

Re: [PHP] To format a number

2003-11-06 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]> > I have a number for example 5 and I would it transform in 5,00. > I tried with round() but it doesn't add the numbers after comma with an interger number. > Does some funtion that make this exist? You mean some function that'll format a number? Hmmm... number_format()

Re: [PHP] restricting text fill on a text area

2003-11-06 Thread CPT John W. Holmes
From: "Ian Truelsen" <[EMAIL PROTECTED]> > I want to set up a sized div on my page and be able to fill it with text > from a text file. Easy enough, but I want to be able to 'sense' when the > text area fills, no matter what size text the browser has set. Client side issue, not PHP. Ask on a Java

Re: [PHP] Send data Header Response

2003-11-06 Thread CPT John W. Holmes
From: "Jonathan Villa" <[EMAIL PROTECTED]> > I would like submit a form to a page, do some processing on that page, > then if need be, return to the referrer but also send the submitted data > along with it... and data is coming from a POST form, not a GET. I > tried > > header('location:'.$refer

Re: [PHP] Issues with Mysql 4.0 and PHP in a production environment

2003-11-06 Thread CPT John W. Holmes
From: "Luis Lebron" <[EMAIL PROTECTED]> > Are there any issues with running PHP 4.3.X and Mysql 4.0 in a production > environment? Of course there is. If you write crappy code, your program will suffer. If you don't write crappy code, well, then you're fine. ---John Holmes... -- PHP General Ma

Re: [PHP] preg_replace ^M

2003-11-06 Thread CPT John W. Holmes
From: "Torsten Rosenberger" <[EMAIL PROTECTED]> > > Those are \r characters from dos newline (\r\n). Generally they are not > > harmful and many editors can work with them without problems (vim). You > > can use some utility commands to convert to or from dos or unix newlines. > > But i'm working

Re: [PHP] preg_replace ^M

2003-11-06 Thread CPT John W. Holmes
From: "Torsten Rosenberger" <[EMAIL PROTECTED]> > i try to replace a string in a file > but if i have linefeeds in the string > the output file after the replacement has > ^M carachters in in Some text editors will display \r as ^M. So, if you're file uses \r\n as the newline, you'll see these ^M

Re: [PHP] MySQL Password Function

2003-11-06 Thread CPT John W. Holmes
From: "Raditha Dissanayake" <[EMAIL PROTECTED]> > >Oh, and this will do almost NOTHING to make your site more secure. Why do > >you think it will? > > You are partly right about this we had a nice flame war about this very > issue couple of weeks ago on the jabber lists. Anyone interested in the >

Re: [PHP] High bandwidth application tips

2003-11-06 Thread CPT John W. Holmes
From: "Luis Lebron" <[EMAIL PROTECTED]> > Excellent tips. I think I'm really going to have to polish my sql skills for > this task. Any good tools for benchmarking sql queries? If you've been following the "Load Stress Tool" thead, this program: http://jakarta.apache.org/jmeter/index.html was men

Re: [PHP] MySQL Password Function

2003-11-06 Thread CPT John W. Holmes
From: "Raditha Dissanayake" <[EMAIL PROTECTED]> > From: "Shaun" > >I am trying to make my site more secure, can anyone suggest a tutorial on > >using the mySQL password function with PHP. I can't find anything through > >google... > > it's very simple intead of using > insert into users set userPas

Re: [PHP] File creation date.

2003-11-06 Thread CPT John W. Holmes
From: "Carles Xavier Munyoz Baldó" <[EMAIL PROTECTED]> > I want to write a PHP function for delete the files in a directory older than > 1800 seconds. > Is there any function for it ? Read this thread, too: http://www.phparch.com/mailinglists/msg.php?a=701737&s=Mike+Migurski+find&sp=1 If you can

Re: [PHP] File creation date.

2003-11-06 Thread CPT John W. Holmes
From: "Carles Xavier Munyoz Baldó" <[EMAIL PROTECTED]> > I want to write a PHP function for delete the files in a directory older than > 1800 seconds. > Is there any function for it ? Start here: http://us2.php.net/manual/en/ref.filesystem.php ---John Holmes... -- PHP General Mailing List (htt

Re: [PHP] Re: Input Validation of $_SESSION values

2003-11-06 Thread CPT John W. Holmes
From: "Boyan Nedkov" <[EMAIL PROTECTED]> > [snip] > > ... Short of any severe bugs in PHP's core, there is no way for a > > user of your Web application to modify session data ... > [/snip] > > It seems that statement is not completely correct considering the topic > discussed in the paper 'Sess

  1   2   3   4   5   >