Re: [PHP] unexpected results using sprintf() with %u

2003-10-03 Thread David Otton
On Fri, 3 Oct 2003 15:51:59 +1000, you wrote: >Im trying to retrieve the unsigned value of an integer. sounds pretty simple... > >[code] >$i = -86; >echo "" . sprintf("%d", $i); >echo "" . sprintf("%u", $i); >[/code] > >produces: >-86 >4294967198 > >what i expected: >-86 >86 > >Ive searched the ar

[PHP] PHP as a Servlet in Tomcat

2003-10-03 Thread David Erickson
ly helpful.. I'd really like to get PHP integrated into tomcat but this isn't working =( Thanks a bunch David Erickson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] stripping comments

2003-10-05 Thread David Otton
On Sun, 5 Oct 2003 04:46:16 -0400, you wrote: >I'm trying to strip comments out of my code. I can get it to strip one >section of comments but the problem comes in when I have more then one >comment section to strip. > >I am using this: $code = preg_replace('/\/*(.*?)*\//is', '$1', $code) and >ne

Re: [PHP] Select Query problem

2003-10-05 Thread David Otton
On Mon, 6 Oct 2003 14:22:59 +0800, you wrote: >Now my question is: What if I would like to display data for the CURRENT MONTH >and the last 11 months???(May also said to be the LAST MONTHS) >HOw should my select query be like?? This question isn't on-topic for this list; it's about SQL, not PHP.

Re: [PHP] ps command in php

2003-10-06 Thread David Otton
On Mon, 6 Oct 2003 14:55:56 +0800, you wrote: >I'm trying to have the output of the "ps -ef" command in Linux to my >browser. Can anyone help how to properly have the output in proper format. >I've used the passthru() function but the output is scrambled. Scrambled how, exactly? Remember, your br

Re: [PHP] Wrapping code inside [code]xxx[/code] tags.

2003-10-06 Thread David Otton
On Mon, 6 Oct 2003 10:06:44 +0100, you wrote: >I have on my site a part where users' can submit articles and no doubt their >articles will contain code. Code is wrapped inside of [code] tags, i.e. >[code][/code] > >However, there is other text in the same article, so I need to format the >code ins

Re: [PHP] Wrapping code inside [code]xxx[/code] tags.

2003-10-06 Thread David Otton
On Mon, 6 Oct 2003 07:12:07 -0500, you wrote: >Also Evolt.org does a nifty thing with code in iframes within >articles. Just a . CSS's overflow: property is a possible text-within-text solution, too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

Re: [PHP] Array of Classes

2003-10-06 Thread David Otton
On Mon, 6 Oct 2003 13:41:22 -0400, you wrote: >1) How can I create an array of classes so they could be referenced, for >instance: $array[$uniqueID][$class->var] = 10; ? > >2) Would it instantiate when that particular element was used and would the >constructor run at that point? > >3) Any way to

Re: [PHP] PHP & CSS

2003-10-06 Thread David Otton
On Mon, 6 Oct 2003 11:13:04 -0700, you wrote: >I'm currently building a dynamic site which draws page configuration >variables from config (ini) files. To use those variables from the >ini files, I write the style sheet in the header of each page. > >Here's my problem. I want to link to a style

[PHP] timeout question

2003-10-06 Thread David Coleman
I have a PHP page that for some reason is taking an ungodly long time to execute. I suspect that this is simply b/c I’m running Apache 1.3 / MySQL 4.013-nt, PHP 4, Zend studio 3.0, and MySQL GUI on a 266 MhZ win2K server. (Yes people, I know I’m choking the poor thing, but I can’t afford a new se

Re: [PHP] storing the passthru() output as an array

2003-10-06 Thread David Otton
On Tue, 7 Oct 2003 09:41:03 +0800, you wrote: >Have another problem here I need to get the output of this syntax > >$ps = (passthru("ps -ef")); > >and store it in an array line by line, Turn on output buffering, grab the output of your script, then turn it off. (ob_start, ob_get_contents, ob_end_

Re: [PHP] shell_exec question

2003-10-08 Thread David Otton
On 08 Oct 2003 13:25:51 +0200, you wrote: >I`m using a shell_exec to get a list of files from a specified >directory. > >When I run it locally on my machine i works. When I run it on the other >machine I get What Marek said. However, is there any reason you're not using readdir()? http://uk.php

Re: [PHP] Re: PHP & CSS

2003-10-08 Thread David Otton
On Wed, 8 Oct 2003 08:49:17 -0700, you wrote: >On Wed, 08 Oct 2003 20:34:51 +0600 >Raditha Dissanayake <[EMAIL PROTECTED]> wrote: >> Raquel Rice wrote: >> >Well, yes ... in a way. The plan is to have a main site, where >> >users can have a subsite off the main site. I want to give the >> >user

Re: [PHP] pasted text from word

2003-10-09 Thread David Otton
On Thu, 9 Oct 2003 11:53:51 +1000, you wrote: >Hi all, > >I'm interested in alternative solutions (to those found in the comments >on http://au.php.net/htmlspecialchars) for dealing with text pasted >into a textarea from Word et al. > >I want a way of 'dumbing down' certain characters (like quot

[PHP] Apache not auto running index.php

2003-10-09 Thread David Erickson
directories instead of giving a listing? Thanks! -David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Apache not auto running index.php

2003-10-09 Thread David Erickson
Scratch that I figured it out. DirectoryIndex index.html index.php index.html.var -David - Original Message - From: "David Erickson" <[EMAIL PROTECTED]> To: "PHP General Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, October 09, 2003 4:00 PM Subjec

[PHP] Re: Limits and php...

2003-10-09 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, > > I have been trying to understand how to write a simple code that will > let me limit the number of files view to 10 records, but I need to > under how php can look at a number of records and then caculates how > many pages it

Re: [PHP] Multiple PHP modules

2003-10-10 Thread David Otton
On Fri, 10 Oct 2003 03:10:53 -0400, you wrote: >> > Is it possible to load two different PHP modules in apache having them >> > linked to different virtual hosts? I'm hoping I can run one site with PHP >> > 5 and another with 4.3.x >I thought that might work but the Apache docs don't list LoadMod

Re: [PHP] PHP generated AuthUserFiles?

2003-10-10 Thread David Otton
On Fri, 10 Oct 2003 06:34:43 -0400, you wrote: >Is there a way to let PHP generate the necessary AuthUserFiles for use with >.htaccess? > >I don't allow my clients the ability to use .htpasswd in the command line. > >From what I see, the user file is just a text file with the username and the >enc

Re: [PHP] unset() un-appropriate ?

2003-10-13 Thread David Otton
On Mon, 13 Oct 2003 12:47:44 +0200, you wrote: >I have a form with 3 checkboxes x1,x2,x3. I want to build an array of >values from the checked boxes; I choosed the following approach: >1. build an array with all values >2. eliminate from array the "" values using unset > >For some reason, the code

Re: [PHP] 'Return values' from links

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 08:54:23 +0200 (MEST), you wrote: >I have a php file in website A's directory, which, when given a key value, >will check whether it is valid or not. Is there any way I can treat this >website like a function and have it give me a return value after it has "run >through" ? Yes

Re: [PHP] Back option using php

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 14:50:21 +0530 (IST), you wrote: > Is there any way to restrict the user not to go back once he >submitted the html form ?? Javascript, but that can't be relied on. Are you're trying to avoid the "This page has expired, resubmit?" warning in IE? Use header ("Location:") to

Re: [PHP] Dynamic tables

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 14:42:34 +0800, you wrote: >Right now, I am able to change the colour of cells using a drop down menu, and >when I clicked on "Reload" it still remains the colour that I have changed, but >when I open the page in another browser, as I echoed the value "colour", the >browser dis

Re: [PHP] Creating local vars from HTTP Post Array

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 10:11:57 +, you wrote: >I'm re-coding a fairly large multi step form which was written with PHP's >register globals turned on. Since upgrading PHP this form has stopped >working and needs editting. > >Rather than manually changing each var - > >$foo to$_POST['foo']

Re: [PHP] Session not getting destroyed !

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 15:58:36 +0530, you wrote: >My session is not getting destroyed once i close the browser. Problem is only in IE 5 >as IE 6+ its getting destroyed. I don't know what is the problem. I looked at the >session settings parameters in php.ini file but couldn't figure it out. > >I a

Re: [PHP] 'Return values' from links

2003-10-17 Thread David Otton
>fputs ($sp, "POST /path/to/script.php HTTP/1.0\r\n"); >fputs ($sp, "Host: $host\r\n"); Sorry. That should be HTTP/1.1, of course. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session not getting destroyed !

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 16:46:45 +0530, you wrote: >Yes its showing 0 only.. > >Its a weird kind of problem for me .. Is the browser really being closed? SID caught in a bookmark? Broken cache? Try starting from bare - delete all IE cookies and run the tests again. Check the cookie on the client si

Re: [PHP] variable in e-mail

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 14:51:54 +0100, you wrote: >I would like to use a form in a html page to pass the variables to a php >page, which sends an mail including these variables. > >All I get in the mail though is a 1 rather than the string that I put into >the form??? > >Can anyone help please! Redu

Re: [PHP] variables in e-mail 2nd

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 15:09:48 +0100, you wrote: >I would like to use a form in a html page to pass the variables to a php >page, which sends an mail including these variables. > >All I get in the mail though is a 1 rather than the string that I put into >the form??? > >Can anyone help please! > >So

Re: [PHP] Shouldn't script errors show in my browser?

2003-10-17 Thread David Otton
On Fri, 17 Oct 2003 11:29:41 -0400, you wrote: >I hope this question is not too stupid! When I have an error in my script, >it seems to me that the web server, or in my case the php CGI module I am >using for testing, should send something back to my browser displaying an >error message. Instead,

Re: [PHP] Re: $PHP_SELF

2003-10-20 Thread David Otton
On Mon, 20 Oct 2003 09:11:37 -0400, you wrote: >"Boris Sagadin" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> I'm having problems with $PHP_SELF variable. Mostly it works, other >> times (about 10% of tries) it's just empty. Is this a known issue with >Apache >> 2? If I use $_SE

Re: [PHP] Re: $PHP_SELF

2003-10-20 Thread David Otton
On Mon, 20 Oct 2003 14:36:33 +, you wrote: >I believe the issue is where exactly is $PHP_SELF being used. >$PHP_SELF isn't available inside a function, without global'ing >it but $_SESSION is available all the time. Then I would expect an E_NOTICE (though the default error reporting level is

Re: [PHP] Re: $PHP_SELF

2003-10-20 Thread David Otton
On Mon, 20 Oct 2003 10:40:23 -0400, you wrote: >No, you seem to be misunderstanding the point. > > >http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server Ok, there's nigh-on 30k of text on that page. I have /no/ idea what you're referring to. However, I did find this: "If

Re: [PHP] HTTP 405 - Resource not allowed error

2003-10-21 Thread David Otton
On Tue, 21 Oct 2003 18:22:26 +0530, you wrote: > > > This file and the index.php are kept in the same directory. But the > browser returns 405 is Method Not Allowed. My first guess would be that your web server won't allow you to do POSTs to that resource. If Apache, check httpd.conf or .hta

Re: [PHP] similar_text

2003-10-21 Thread David Otton
On Tue, 21 Oct 2003 17:42:17 +0200, you wrote: >does any one have an example of a function to search a database for similar >names and display them if the user inputs a name that is not found? Are you looking for SOUNDEX, perhaps? http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=SOUNDEX+al

Re: [PHP] Sorting an array by value length.

2003-10-22 Thread David Otton
On Wed, 22 Oct 2003 11:21:13 -0700, you wrote: >I've been scouring the php.net site for a few hours now trying to find a >viable way to sort a single dimensional array( array('0'=>'fddfsdsfdds', >'1'=>','d','2' => 'gofofle'); ). so that the longest lengthed >item is at the top, and the

Re: [PHP] Simple array question

2003-10-22 Thread David Otton
On Thu, 23 Oct 2003 14:01:59 -0500, you wrote: >Is there a simple way to return the key (name) of one element in an >array? I looked up key() in the docs, but there are no examples or >notes... Ok, to make sure I understand you: given an array ('apple' => 'red', 'banana' => 'yellow') you wan

Re: [PHP] Php and Fortune

2003-10-22 Thread David Otton
On Wed, 22 Oct 2003 22:54:55 -0400, you wrote: >Is there a way I can get php to call the program fortune then print that a >web page. http://uk2.php.net/system -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: limit to elements in an array?

2003-10-24 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Is there an upper limit to the number of elements that can be in an > array? If so, what is that limit? That rather depends on available memory. How big is each array element? -- Quod subigo farinam A: Because it messes up the order

Re: [PHP] session_destroy causes backspace on IE

2003-10-24 Thread David Otton
On Fri, 24 Oct 2003 15:42:45 -0400, you wrote: >Tried breaking up the echo, but still didn't work. What PHP version are you using? 4.10, maybe? http://bugs.php.net/bug.php?id=14695 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] usort

2003-10-24 Thread David Otton
On Sat, 25 Oct 2003 04:03:12 +0300, you wrote: >I don't know what the names are. I just know that there might be numbers. :) > >It still doesn't work. It gives very odd results with the $x_out variables. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

Re: [PHP] Trying to organise an array

2003-10-25 Thread David Otton
On Sat, 25 Oct 2003 09:17:46 +0100, you wrote: >I have made this function which should be quite simple but doesn't seem to >do what it is meant to. >What I want it to do is create an array where there is a numbered key (the >rows of the table) and the colume headings as the second key. First, you

Re: [PHP] output

2003-10-25 Thread David Otton
On Sat, 25 Oct 2003 11:52:53 +0300, you wrote: >I'm getting output from program I run (exec) to the web page. >How can I avoid this ? Did you even look at the manual? http://uk.php.net/manual/en/ref.exec.php escapeshellarg -- escape a string to be used as a shell argument escapeshellcmd -- esca

Re: [PHP] Trying to organise an array

2003-10-25 Thread David Otton
On Sat, 25 Oct 2003 08:55:15 -0700, you wrote: >my god man, do you know what indenting is? Uhm... it's that thing I did with 4-space tabs, all the way down. Allman-style, not K&R, for what it's worth. >that confused the heck out of me. Mailer problem? Thisparagraph

Re: [PHP] Page encoding

2003-10-25 Thread David Otton
On Sat, 25 Oct 2003 23:19:33 +0300, you wrote: >I have to use windows-1251 encoding for my pages. But just inserting > is >not enough. What shold I do? Meta tags are generally substitutes for headers. Declare the content-type with a header() statement. Oh, and you have a typo in "enncoding". (

Re: [PHP] manual key generation

2003-10-25 Thread David Otton
On Sat, 25 Oct 2003 20:31:37 -0200, you wrote: >When I enter: > >SELECT MAX(quotation_id)+1 from quotations > >I get simply the number 7 (which is ok) > >But when I do: > >$new_key = mysql_query("SELECT MAX(quotation_id)+1 from quotations") > >I get $new_key = Resource id #3 L

Re: [PHP] Get image file size

2003-10-26 Thread David Otton
On Sun, 26 Oct 2003 14:01:36 -, you wrote: >How can I get the file size of an image in KB, I know how to get the width >and height of an image using the getimagesize(); but not sure how to get the >image file size. http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=php+filesize http://www

Re: [PHP] Re: Recommendation for Unique URL

2003-10-26 Thread David Otton
On Mon, 27 Oct 2003 13:29:47 +1100, you wrote: >> What is the best approach to the unique page ID? I thought I would store >the >> dept. mgrs. email address and the session ID in a db, and use the session >ID in >> the URL. Do I even need the mgr's email address? Is another approach >better? >> Wh

Re: [PHP] Oh why won't it work

2003-10-27 Thread David Otton
On Mon, 27 Oct 2003 13:00:19 -, you wrote: $n is created /outside/ the function. > $n = 1; So you can't use it here. It's not in scope. > $array[$n][$colname] = $value; >But when I run this script, it looses the first row and doesn't really That's because you get the first row here. >

Re: [PHP] Multi-dimensional array help

2003-10-27 Thread David Otton
On 27 Oct 2003 13:20:48 -0500, you wrote: >echo ''."\n" >.'' >.'SKU' >.'Jan' >.'Feb' >.'Mar' >.'Apr' >.'May' >.'Jun' >.'Jul' >.'Aug' >.'Sep' >.'Oct' >.'Nob' >.'Dec' >.''."\n"; for ($i = 1; $i <= 12; $i++) { e

Re: [PHP] keyword search syntax

2003-10-27 Thread David Otton
On Mon, 27 Oct 2003 20:00:24 -0600, you wrote: >I've got a field in my database that contains keywords about the particular >record. I've got a form with a text entry field for visitors to enter >keywords for which they would like to find records whose keyword field >contains the words they entere

Re: [PHP] Echo issue

2003-10-29 Thread David Otton
On Wed, 29 Oct 2003 11:56:11 +1100, you wrote: >I have spent about an hour looking at this and have found I can't echo >anything with 16 characters or less! It can be over a single line or >multiple lines eg. > >echo("12345678"); >echo("12345678"); >?> >->"" > >but > >echo("12345678"); >echo("123

[PHP] PHP and java

2003-10-29 Thread David Miller
I have written PHP code to upload and download files to my server through my browser. On the local side I have generated a java applet to do a few things that I just can't do with a browser. There are some things that I need the java on the local machine to have access to on the server. I st

Re: [PHP] Echo issue RESOLVED!

2003-10-29 Thread David Otton
On Thu, 30 Oct 2003 10:00:51 +1100, you wrote: >> I would be very interested in learning more about this issue. Would you happen >> to be able to provide an example HTTP transaction that Safari mishandles? > >If you use a 'proper' html file it works OK. If you simply create a text >file (with

Re: [PHP] Passing constructor values to functions in a class

2003-10-30 Thread David Otton
On Fri, 31 Oct 2003 11:38:47 +0800, you wrote: >I've been struggling with this for some time now and can't for the life of >me figure out why the output is "GeorgeGeorge" and not "GeorgeBush" > $this->$staff_name="George"; Try this instead > $this->staff_name="George"; (superfluous $). Same

Re: [PHP] php selecting problem

2003-11-01 Thread David Otton
On Sun, 2 Nov 2003 00:06:46 +0100, you wrote: >if($bok==1) >{$query = "select compno,thCompany from main_company where thCompany LIKE >'%0123456789%'";} > >I have looked in the DB and i see quite a few companies have a number in the >beginning, but still this returns me no rowsany ideas why?

Re: [PHP] Web Applications and C++?

2003-11-01 Thread David Otton
On Sat, 1 Nov 2003 20:19:13 -0500, you wrote: >Inappropirate but intruiging nonetheless. I've always been curious >how Amazon handles the amount of traffic their site generates and now >I've got a slightly better idea. I know eBay uses CGI as I've already >seen discussion of it. Amazon mostly l

Re: [PHP] deleting characters from strings

2003-11-01 Thread David Otton
On Sat, 1 Nov 2003 11:25:09 -0600, you wrote: >I feel really stupid posting this but I can't seem to find the correct >syntax in the language guide. I have a string which has been progressively >built during a FOREACH loop through an array (a SELECT statement in which >the WHERE part is built with

Re: [PHP] passing variables to subsequent pages

2003-11-02 Thread David Otton
On Sun, 2 Nov 2003 07:44:29 -0600, you wrote: >I have a two page search. The first page queries a database and creates a >list of MANUFACTURERS from which the visitor can select all, one or >multiple entries. The page is submitted via GET to the second page of the >search. The second page uses

Re: [PHP] How to remove a variable from an array

2003-11-02 Thread David Otton
On Sun, 2 Nov 2003 14:06:31 -0500, you wrote: >I have an array variable that is set, then put into a session >variable. All is good so far, but how can I remove a specific variable >from the array? unset() >I have tried basically copying and pasting this, and adding a foreach >loop. Inside this

Re: [PHP] How to remove a variable from an array

2003-11-02 Thread David Otton
>>I have tried basically copying and pasting this, and adding a foreach >>loop. Inside this foreach loop, the array is split apart and I tried >>using unnset, but I couldn't get it to work, so I deleted the code. > >unset ($array[$index]) > >http://uk.php.net/unset There are examples in the manua

Re: [PHP] Endless 'while' loops?

2003-11-02 Thread David Otton
On Mon, 3 Nov 2003 12:29:10 +0900, you wrote: Without running the code, I can see two immediate problems. >$subject = "EigoImprov Newsletter for " .member[1]; should be $subject = "EigoImprov Newsletter for " . $member[1]; Also rewrite >$mailcontent = "Dear " .$member[0] .",\n".$message ."\nT

Re: [PHP] Return mysql_fetch_array($result) from a function

2003-11-05 Thread David Otton
On Wed, 5 Nov 2003 14:53:15 +0800, you wrote: >I am trying to get the results of a function, which queries MySQL, back into >an array for me to order. I only want to print out certain fields (I call >the same query, but use different fields in different places). >Can someone perhaps show me how t

Re: [PHP] MySQL Password Function

2003-11-06 Thread David Otton
On Thu, 6 Nov 2003 09:09:57 -0500, you wrote: >True, true. I actually use MD5() for the same reason, but, really, if >someone has access to the database to read the hashes, odds are they have >access to the rest of the database and your code. So what are you protecting >really? Many people use th

[PHP] Re: mysql_field_type() ...

2003-11-07 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > ...will say if a field is of type "ENUM", but not its possible values > (including default). Does anyone know how I can fetch possible values > of a field type of ENUM? > > Thanks. > > ...Rene > Try this little function which I use a

Re: [PHP] [Stats] PHP Net List: October 2003

2003-11-07 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Probably because nobody wants to risk offending John--or (more likely) > because no one will admit knowing who the "other" John Holmes is ;-) > > Cheers, > > > Marco > > -- > > php|architect - The Magazine for

Re: [PHP] Solutions for 1970 epoch date restriction

2003-11-09 Thread David Otton
On Mon, 10 Nov 2003 01:41:15 +0800, you wrote: >I have a table that includes 3 columns for day, month and year. Example: >Day, Month, Year >11,Jan, 1974 >4,Sep, 1921 That would be your problem - you should be using your database's native date type. >I need to construct a query where users can sp

Re: [PHP] Changing case

2003-11-12 Thread David Otton
On Wed, 12 Nov 2003 11:29:10 -0500, you wrote: >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 alp

Re: [PHP] Re: Storing images

2003-11-15 Thread David Otton
On Sat, 15 Nov 2003 13:01:21 -0800 (PST), you wrote: >--- Kim Steinhaug <[EMAIL PROTECTED]> wrote: >> Well as far as I can see you have 2 options. >> >> a) Store them directly on disc >> b) Store them in a database (eg. mySQL) >> >> I would think that a) is the best way without doubt > >I usuall

Re: [PHP] Parse error?

2003-11-15 Thread David Otton
On Sat, 15 Nov 2003 22:38:07 +0100, you wrote: >Get a parse error on line 42, but i can't see what is causing the trouble. (Parse >error: parse error in /home/.sites/95/site92/web/admin/editreis.php on line 42) > >if(is_array($_POST['accomodatieid'])) { >foreach($_POST['accomodatieid'] as $Key =>

Re: [PHP] Limiting repetitive file access

2003-11-16 Thread David Otton
On Sat, 15 Nov 2003 23:52:31 -0500, you wrote: >Recently, a 'user' attempted to access a restricted area of my site >repetitively (spanning five hours) entering the same url repetitively >[probably by script]. A massive log file was generated. I would like to ban >such behavior by limiting the

Re: [PHP] Is PHP License GPL?

2003-11-17 Thread David Otton
On Mon, 17 Nov 2003 08:44:52 -0600, you wrote: >I was looking for license information on the PHP site and only found "The >PHP License, version 3.0" http://www.php.net/license/3_0.txt > >1 - Is this license information only applicable to PHP version 3.0? The licence is bundled with the software.

[PHP] Looking for Spam free php form

2003-11-17 Thread David Buchmueller
Hello List, I am looking for a canned php form which hides the recipient email from prying eyes. Everything I have found uses a hidden field. -- Thank you, David Buchmueller - Brian Sooy & Co. | t. 440.322.

Re: [PHP] passing second function through a function

2003-11-17 Thread David Otton
On Mon, 17 Nov 2003 11:04:47 -0800, you wrote: >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 f

[PHP] window.open problem

2003-11-18 Thread David R
I am using php and mysql and am having difficulty using window.open () . I have cut the code down to the basics. Why does a new window not open? Thanks. -David r function boo() { window.open ("www.google.com"); } why does no window open? -- PHP General Mailing

Re: [PHP] window.open problem

2003-11-18 Thread David Otton
On Tue, 18 Nov 2003 16:48:20 +0200, you wrote: >I am using php and mysql and am having difficulty using window.open () . I >have cut the code down to the basics. >Why does a new window not open? This is a model request for help - you've removed all code that isn't directly related to the problem,

Re: [PHP] window.open problem

2003-11-18 Thread David R
My apologies for posting to the php group. I thought that perhaps using javescript together with php was causing the problem. btw I have no "pop-up blockers" running. -david r "David Otton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 18

Re: [PHP] window.open problem

2003-11-18 Thread David Otton
On Tue, 18 Nov 2003 17:28:50 +0200, you wrote: >My apologies for posting to the php group. I thought that perhaps using >javescript together with php was causing the problem. > >btw I have no "pop-up blockers" running. Are you /certain/? A software firewall maybe? Are you at a business site where

Re: [PHP] How to get the key of a specific index of array?

2003-11-19 Thread David Strencsev
"Wouter Van Vliet" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > First of all, you said to use the first three values of the array for anoter > reason .. well the, what I'd do is this: > > $FirstThree = array_splice($_POST, 0, 3); > > Which will give you the first three elements o

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

2003-11-20 Thread David Strencsev
"Cpt John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 define

[PHP] Re: file_exists on Windows problem

2003-11-20 Thread David Strencsev
If you're using NTFS file system... please make sure that the PHP's temporay UPLOAD directory and SESSIONDATA directory are set with the correct permissions. I mean that the user IUSR_YOURCOMPUTER has write permissions in these directories. Hope it will help - David Strencsev -- P

[PHP] Re: IE 6 mangling posted code

2003-11-20 Thread David Strencsev
You may play with these functions: addslashes(); stripslashes(); htmlentities(); html_entity_decode(); Good luck - David Strencsev -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: A loop for the hours in a working day

2003-11-23 Thread David Otton
On Sun, 23 Nov 2003 10:49:58 -0800 (PST), you wrote: >That works, but it's a little unweildy.. especially if you want to change >the range later (changing the array may not be so bad, but then you've >got to figure out how many iterations your loops must do, etc). > >How about something like thi

Re: [PHP] String returned from forms and such

2003-11-23 Thread David Otton
On Sun, 23 Nov 2003 15:19:23 -0700, you wrote: >When the 'New Mexico' gets to phpinfo, it says the string is 'New+Mexico' >and that's not what I need. I used htmlspecialchars to add the %20 to the >string but didn't get it. What am I doing wrong or missing?? That sounds like the behaviour of urle

Re: [PHP] Fatal error: Allowed memory size

2003-11-26 Thread David Otton
On Wed, 26 Nov 2003 12:43:35 -0800, you wrote: Ok, please bear in mind that I've never run into this, so what follows if guesswork. >I am using the PHP GD functions to resize my images. >I get the following error when trying to resize multiple images. It works >for one image. >---

Re: [PHP] Optimizing PHP Relevancy Ranking Algorithm

2003-11-28 Thread David Otton
On Fri, 28 Nov 2003 03:26:08 -0800, you wrote: >Anybody got a few ideas on how to speed up these two sluggish lines of >code? I'm pretty much out of ideas. And if you have any other >suggestions to speed things up, I would really appreciate them too. I know nothing about your application, and I

Re: [PHP] Important notice

2003-12-01 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Chris W. Parker wrote: > > [EMAIL PROTECTED] > > on Wednesday, November 26, 2003 9:30 PM said: > > > >>If you feel this transaction was made > >>by our mistake, please press "No". > > > > I keep clicking "N

Re: [PHP] Problem with $_POST[] and header();

2003-12-02 Thread David Otton
On Tue, 2 Dec 2003 10:26:08 -, you wrote: >if(!mysql_query($query)){ > $error = "Could not complete query"; > header("Location: file.php?error=$error"); > exit; >} The Location: header requires an absolute URI. See RFC 2616, 14.30 >However in file.php I have included $_POST[] variables

[PHP] Re: forms and mysql

2003-12-02 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi i am very new to PHP so need some help ! > > i have a form which allows the user to put in 2 team names and then displays > them, at the moment it displays them side by side but i need to insert V > (versus) in the middle--how can i d

Re: [PHP] Best way to split a string of numbers into segments.

2003-12-02 Thread David Otton
On Tue, 02 Dec 2003 13:14:20 +, you wrote: >Is there an easy, non expensive way to do the perl-equivalent of: >$date=20031202; >($year, $month, $day) = ($date =~ /(\d{4})(\d{2})(\d{2})/; > >I looked through the preg_* functions online, but couldn't see anything >to help me. Am I stuck with sub

Re: [PHP] for help :how to detect norton client through php socket

2003-12-04 Thread David Otton
On Thu, 4 Dec 2003 15:39:30 +0800, you wrote: >how can i detect whether norton antivirus client are installed on the hosts >through php socket ? Why would you want to? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] File - Success Warning Message

2003-12-04 Thread David Otton
On Thu, 4 Dec 2003 01:54:31 -0800 (PST), you wrote: >Warning: file("http://webmail.juicemarketing.net";) - Success in /me notes this is a pyramid scam site Don't know about the rest of you... but there are some people I'd prefer /not/ to do free consultancy for. -- PHP General Mailing List (ht

[PHP] Re: preserving blank space padding when using fgetcsv

2003-12-04 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hello, > > I've been researching this for most of the day and am unable to find an > answer. > > I'm using fgetcsv to read a comma delimited file (Microsoft Excel CSV). > I'm trying to create a PHP application which will read a csv fi

Re: [PHP] Problem with references

2003-12-04 Thread David Otton
On Thu, 4 Dec 2003 11:16:10 -, you wrote: >I wonder if there is a simple techique to help me here. I wish to return 2 >references to objects from a function. > >The following code describes what I want to do but obviously will not work >(and I understand why): > >function Test (&$P1, &$P2) >{

Re: [PHP] open rtf in IE

2003-12-04 Thread David Otton
On Thu, 4 Dec 2003 12:48:45 +0100, you wrote: >I generate and save a rtf file with php in my MySQL db. Is it possible to >open this file in IE? Probably not; I doubt IE understands RTF documents. You're probably asking how to make IE pass the document over to Word, though. Try variations on hea

Re: [PHP] Premature end of script headers: php.exe

2003-12-04 Thread David Otton
On Thu, 4 Dec 2003 13:17:57 +0100 , you wrote: >I have a problem. When I start my PHP script, I get message "Premature end >of script headers: php.exe". How can I solve this problem? Run from the command line, or via a webserver? IIS or Apache? CGI or Apache module? Do all scripts throw the error

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

2003-12-04 Thread David Otton
On Thu, 4 Dec 2003 15:16:06 -, you wrote: >What do you say to someone who says: > >"PHP is just a kiddie language"? > >(Source: http://www.dhtmlcentral.com/forums/topic.asp?TOPIC_ID=19373) > >PHP is currently my strongest development language and it annoys me that it >is a much less bankable s

[PHP] Showing absolute path in $_FILES

2003-12-04 Thread David Green
ame']. When i navigate to the file using the form, I can see the whole path in the "file" box, but when I print $file, it shows me only the file name without the path. Is there any way to show the whole path, and save that as a variable? Thanks! -David -- PHP General Mailin

Re: [PHP] Problem with references

2003-12-04 Thread David Otton
On Thu, 4 Dec 2003 09:58:09 -0800, you wrote: >David Otton <[EMAIL PROTECTED]> >on Thursday, December 04, 2003 3:43 AM said: > >> function f() >> { >> return (array (7, 5)); >> } >> >> list ($a, $b) = f(); > >Hey cool! I never kne

Re: [PHP] Max Upload FIle Size

2003-12-05 Thread David Otton
On Fri, 05 Dec 2003 13:41:03 +0300, you wrote: >Steve Vernon wrote: >> I have search google, and PHP but I cannot find properly how to set the >> maximum post upload size as 200Kb? >Amazing what you can find in the manual these days >http://www.php.net/manual/en/configuration.directives.php#ini.

<    6   7   8   9   10   11   12   13   14   15   >