[PHP] Re: Parsing of forms

2009-05-18 Thread Peter Ford
x27;d missed a [] on the name is the answer. As I like to say in other areas of life (especially to my children), "stop whining and get on with it!" ( sorry :) ) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Software to read/write Excel to CD?

2009-05-15 Thread Peter Ford
that the only com links are to satellites... (expensive). I suspect that a USB key is a better option (and more physically portable) than a UFB CD. But why write an Excel spreadsheet - why not save the data in something more portable like CSV that ExCel and read and write to once you are back

Re: [PHP] When is __destruct called on an object in $_SESSION ?

2009-05-14 Thread Peter Ford
Stuart wrote: > 2009/5/14 Peter Ford : >> I'm sure I've seen something about this before, but I can't find it: >> >> I'm creating a file which needs to live for the duration of a session, and >> ONLY >> the duration of the session. >>

[PHP] When is __destruct called on an object in $_SESSION ?

2009-05-14 Thread Peter Ford
n the session: I was then expecting TFR::__destruct() to only be called when the session was closed, with either a timeout, or a session_destroy() call. But it looks like the object destructor is called at the end of every page. Any ideas about working around that? -- Peter Ford

Re: [PHP]Cannot output the same data from text file in PHP

2009-05-14 Thread Peter Ford
a PHP problem, but a HTML problem: First, HTML compresses white space into just one space, so all of those leading spaces on line 2 are lost. Second, you are (probably) displaying using a proportionally-spaced font, so the narrow pipeline characters take up less width than the let

Re: [PHP] Can not read write file from Desktop

2009-05-12 Thread Peter Ford
ed in as root unless one is doing a short-lived system maintenance task: certainly one should not doing development work there... I know it sounds dictatorial, but it's (part-way to) best practice... Those config files should be in something like /etc/apache/extra, perhaps, if they are not safe i

Re: [PHP] Re: Trying to create a colortable - what am I missing here?

2009-05-12 Thread Peter Ford
creating a truecolor image 4096 pixels square is going to take a LOT of memory, and it will take a while to download to the client, AND it is 4096 pixels square! That's a fair bit bigger than most screens... I suspect the OP is going to have to rethink this... -- Peter Ford

Re: [PHP] How to deal with identical fields in db

2009-05-06 Thread Peter Ford
tedd wrote: > At 3:14 AM -0700 5/6/09, Michael A. Peters wrote: >> Peter Ford wrote: >>> >>> tedd wrote: (and I added in some extra bits...) >>>> You need to normalize. >>>> >>>> Authors should have an unique id in an authors table

Re: [PHP] How to deal with identical fields in db

2009-05-06 Thread Peter Ford
hat has the book's id and look up > each author via their author id. > > Do you see how it works? > > Cheers, > > tedd > It always surprises me how many people need to have database normalisation explained to them - it seems obvious to me... (a

[PHP] Re: graphical integrated development environment recommendations?

2009-05-05 Thread Peter Ford
Netbeans: works on Windows or Linux (or OSX, if you're that way inclined), and it's free. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Maili

Re: [PHP] object literals

2009-05-01 Thread Peter Ford
. Eg: > > $foo = createObject(array('key' => 'value')); > > It's not great, but PHP doesn't have a object literal syntax AFAIK. > You could use JSON, $foo = json_decode('{"a":1,"b":3}'); but I guess that's no

[PHP] Re: error in printer_open function

2009-04-28 Thread Peter Ford
file > > and write a sim ple page as- > > > > > > Prabal Cable Network > > > > > > The ";" at the start of the configuration line in php.ini is a comment character... Remove that, restart the web server, and you might see things w

[PHP] Multiple return statements in a function.

2009-04-23 Thread Peter van der Does
e { $return='Not Array'; } return $return; } Example of the other method: function check($a) { if ( is_array( $a ) ) { return ('Array'); } else { return ('Not Array'); } } What is your take? And is there any benefit to either method? --

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Peter Ford
tandard-compliant mode in IE7. At least then I only have to worry about the JavaScript incompatibilities, and the table model, and the event model, and -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft Intern

Re: [PHP] Larger fonts...

2009-04-08 Thread Peter Ford
te: > Pete, > Before you get slated by the list, I'm guessing you meant to send this > to someone else? > (It came to me via the PHP-General Mailing List. > > Tom > > 2009/4/8 Peter Ford mailto:p...@justcroft.com>> > > Patrick, > > The reason you

[PHP] Larger fonts...

2009-04-08 Thread Peter Ford
need to be properly designed. Replacing them with just words is not very good - it makes them all different sizes, which messes up the layout. I could remove the shaded background and see if that helps. Other points I will work on. Cheers -- Peter Ford phone: 01

[PHP] Re: PHP class or functions to manipulate PDF metadata?

2009-04-07 Thread Peter Ford
O. Lavell wrote: > Peter Ford wrote: > >> O. Lavell wrote: > > [..] > >>> Any and all suggestions are welcome. Thank you in advance. >>> >> So many people ask about manipulating, editing and generally processing >> PDF files. In my experienc

[PHP] Re: PHP class or functions to manipulate PDF metadata?

2009-04-06 Thread Peter Ford
t I found so far is PDFTK (http://www.pdfhacks.com/pdftk/) which is a command-line tool that you could presumably call with exec or whatever... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd.,

Re: [PHP] What is wrong with this code

2009-04-03 Thread Peter van der Does
e. Please don't fill in the address field. Address Name: Email Address: Comments: '; echo 'You have supplied the following information:'; echo 'Name: $name '; echo 'Email Address: $email '; echo &

[PHP] Re: Java applet clearing session variables?

2009-04-03 Thread Peter Ford
cess to, or does not attempt to access, the cookie that carries the session ID. You may have to prime the applet with the session ID somehow before it runs so that it can generate a PHP_SESSIONID (or whatever it is) cookie to send back to PHP... -- Peter Ford ph

Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Peter Ford
Peter Ford wrote: > Michael A. Peters wrote: >> Shaun Thornburgh wrote: >>> Hi, >>> >>> We are getting errors when trying to vaildate our HTML due to the [ >>> character when using Post Arrays: >>> >>> Line 173, Column 65: >>

Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Peter Ford
eed an ID for each of the inputs then you'll have to generate a unique one for each. To the rest of the list: I'm not too happy about having stuff inside the [] either - is that some syntax I've missed or is it just wrong? -- Peter Ford phone: 0158

[PHP] Re: Button id's - firefox and IE different ?

2009-04-02 Thread Peter Ford
Peter Ford wrote: > Angus Mann wrote: >> Hi all. >> >> I want to have several delete buttons with just one form, and depending on >> which button is pressed, one of several items is deleted. >> >> So I need multiple submit buttons for 1 form, each displaying

[PHP] Re: Button id's - firefox and IE different ?

2009-04-02 Thread Peter Ford
ifferent delete buttons act on their respective bits of the form. Or: bite the bullet and use javascript onclick events to set a hidden field which signals what the action is supposed to be in the back end. -- Peter Ford phone: 01580 89 Developer

Re: [PHP] XML data extraction

2009-04-02 Thread Peter Ford
t; > > www.willandy.co.uk > Oh, I thought of another one: Write some XSL to turn you XML into SQL. Write some code to run that SQL. HTH Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft Internation

Re: [PHP] XML data extraction

2009-04-02 Thread Peter Ford
is a very vague question, and this list is not normally well disposed to writing people's programs for them, especially when they look like college assignments. Cheers Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 8933

Re: [PHP] Web Development/Application Analysis

2009-03-20 Thread Peter Ford
... Me: ... that you never sent to me ... Boss: Oh. 2 Goes like this: Boss: How long will it take to code that up then? Me: An hour. Boss: Really? Me: No, a year. Boss: Eh? Me: Actually, somewhere between the two, I suspect... Boss wanders off, tearing out some more of the little hair remain

Re: [PHP] ltrim behavior.

2009-03-11 Thread Peter van der Does
On Wed, 11 Mar 2009 15:28:04 -0400 Paul M Foster wrote: > On Wed, Mar 11, 2009 at 03:07:18PM -0400, Peter van der Does wrote: > > > This might be old for some of you but I never encountered it until > > today and I would like to know why this is happening. > > > >

[PHP] ltrim behavior.

2009-03-11 Thread Peter van der Does
x27;options[options][name]'; php > echo ltrim($a,'options['); ][name] UH, what? Not exactly what I expected. This works: php > $a='options[options][name]'; php > echo ltrim(ltrim($a,'options'),'['); options][name] Can somebody explain the sec

Re: [PHP] whoami explanation

2009-03-04 Thread Peter Ford
for FILE in $LIST do cp $FILE $FILE.bak done to make a backup copy of each of the files. In PHP, something like should do much the same thing (if permissions etc. allow...) Note that in both of these examples, filenames with spaces in them will blow the whole thing up :( -- Peter

[PHP] Re: preg_match and dates

2009-03-02 Thread Peter Ford
ons you can deal with those by hand. As for your expectation of a museum: the reputation of "dusty old rooms full of stuff" is not entirely un-earned, so I wouldn't expect their databases to be spotless! -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: "use strict" or similar in PHP?

2009-02-27 Thread Peter Ford
WHERE username=$1'; $params = Array('pete'); $result = pg_query_params($sql,$params); That way you get the safest handling of values without any tedious messing about with manually escaping strings. I suspect that under the hood it actually prepares a statement and then executes it

Re: [PHP] Couple of beginner questions

2009-01-12 Thread Peter Ford
ly beautiful web sites AND really elegant code libraries. But then the dot-com thing all fell over and it was too expensive for most people to pay for three teams and a couple of managers just to build a web shop... -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Re: Webhotel structure

2008-12-31 Thread Peter Sorensen
host?!? Change! It seems like surftown is an okay host, compared to my less than 2$ a month, but their help is a major candidate for winning the price of the most useless help ever. A google search found a blog where the guy say they do not support ssh on pivate hosting, so I guess not. /Pete

[PHP] Re: Webhotel structure

2008-12-30 Thread Peter Sorensen
la to correct the permissions. I anyone want to know more abot this see coppermine forum search for batch-add best regards Peter Sørensen "Carlos Medina" wrote in message news:c5.73.47432.da8b6...@pb1.pair.com... Nordstjernealle 10 schrieb: Hi PHP experts What is the overall structu

Re: [PHP] Secure uploads tutorial

2008-12-16 Thread Peter Ford
tecting IE users from malicious code - if they care then they shouldn't be using IE, and if they don't care they shouldn't be on the internet. Tim's efforts do seem to be a bit of overkill... -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Re: Poll of Sorts: Application Frameworks--Zend, Cake etc

2008-12-12 Thread Peter Ford
all documented by the VirtualBox people) and the server is visible just like it was a real machine... So I can take this machine around, and (without needing any network connection) show off the app in IE, Firefox, Opera or Chrome without having to run IIS. Well, I thought it was cool, anyway :( -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A MySQL Question

2008-12-09 Thread Peter Ford
nction doesn't say who's doing the creating, it just checks for >> the existence of the universe. > > Lol, I agree, the function bigbang() doesn't need to be implemented (or it > could be empty if it needs to be there for this line to work), because by > definition,

Re: [PHP] Parsing XML

2008-12-01 Thread Peter Ford
read in as an include. Or better yet, if you use the XSL classes, you can register PHP functions and then call them within your XSL directly. That could potentially handle the validation you required, and even do the database inserts. I'm looking into using something like that on a

Re: [PHP] Netbeans 6.5 WAS: phpDesigner 2008?

2008-11-28 Thread Peter Ford
ipse plugins?!? >> Seriously? That's $150 at best) >> >> Daevid. >> http://www.daevid.com <http://daevid.com> >> >> > I've installed it but have yet to use it. I am having a good time with > APTANA Studio, though there is a learning curve >

[PHP] Re: phpDesigner 2008?

2008-11-18 Thread Peter Ford
trying to get debugging to work. I've just got a development release of Netbeans 6.5 and the PHP support is really quite good now (I wasn't impressed with the 6.1 version I tried). I've used various incarnations of Netbeans (since about 3.5) for Java, and I've always liked it... I

Re: [PHP] It's Sunday, and I'm bored...

2008-11-10 Thread Peter Ford
evant to the original thread) when I commit code to the repository, it asks for a comment to attach to the commit. That's really useful (as I think Richard finds) when I come to do my timesheets, which is usually less often than my commits... Cheers Pete -- Peter Ford

[PHP] Re: PHP Dev Facts

2008-10-22 Thread Peter Ford
*Anything else you use frequently in you're PHP'ing that's worth > mentioning:* > > ps: I'm not asking for any kind of research project, just interested and > interested to know what's most common + might learn something/find some > new tools/toys! > &g

[PHP] Re: 1 last error to fix before the application is done!

2008-10-14 Thread Peter Ford
& isset($_SESSION['userInfo']['loggedIn'] && $_SESSION['userInfo']['loggedin'] == TRUE) { You can probably short-circuit some of that - for example if $_SESSION['userInfo']['loggedIn'] is only ever set to TRUE (and is not se

[PHP] Re: AJAX and PHP

2008-10-04 Thread Peter Wang
"Alain Roger" <[EMAIL PROTECTED]> writes: I think both will be ok, it just depends on what's you want:) > HI, > > i'm currently working on some web application and i would like to know what > is the best way to do what i want. > basically like all application i have a menu and based on selected i

Re: [PHP] ASCII Captcha

2008-09-11 Thread Peter Ford
Anything else? Cheers, tedd why don't people just check for x/y co-ord's on an image submit instead? Not so good if you're using lynx, or if you're blind, I guess. -- Peter Ford phone: 01580 89 Developer fax: 0

Re: [PHP] Length of Exception text?

2008-09-09 Thread Peter Ford
You want the php.ini setting: log_errors_max_len It defaults to 1024 characters: presumably that includes the preamble giving you 1015 or so to play with. If you set it to zero then you get unlimited log messages. 'course that might fill your logs up a bit... -- Peter Ford

Re: [PHP] Google Chrome

2008-09-05 Thread Peter Ford
er to test on Wine or Mono? -Shawn Tried on Wine (version 0.9.60 on OpenSuse) and I could even get the downloader to start. To be fair, I've never really got anything to work on Wine... -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Re: php File upload

2008-08-08 Thread Peter Ford
am or some such) and the actual size of the data sent in the request is therefore likely to be some fraction bigger than the file itself (like 33% bigger for base-64 encoding) -- Peter Ford phone: 01580 89 Developer fax: 01

[PHP] Re: RSS Feed using PHP/MySQL errors

2008-08-07 Thread Peter Ford
use one of: die("ERROR--CAN'T CONNECT TO SERVER"); die('ERROR--CAN\'T CONNECT TO SERVER'); die('ERROR--CANNOT CONNECT TO SERVER'); // English is a very powerful language!! and similar for the other message... There may be other error

Re: [PHP] Back to Basics - Why Use Single Quotes?

2008-08-01 Thread Peter Ford
string: e.g. $foo = 'You need to pay $dollars...'; compared with $foo = "You need to pay \$dollars..."; Again, it depends on you view of backslashes. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justc

Re: [PHP] Code beautifier

2008-07-28 Thread Peter Ford
nstead, I would say But -- pause -- that didn't happen. So, I write it: But, that didn't happen. It's arguably more correct in this case to use ellipsis: But ... I could be wrong :) -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Trailing Spaces Problem

2008-07-18 Thread Peter Ford
preg_split('/\s+/',$string); echo "1: ". $data[0] . " 2: " . $data[1] . " 3: " . $data[2] . " 4: " . $data[3] . " 5: " . $data[4] ?> Does that work for you? -- Peter Ford phone: 01580 89

[PHP] Re: Corrupted ZIP files (downloaded via a php script) : Internext Explorer 7

2008-07-17 Thread Peter Ford
t there is *nothing* output to the client before you start pushing the ZIP file out - that definitely leads to corruption of such things, although if you were sending data before changing the headers you would get an error message about that. What I can't understand is why is might work with

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: From: Peter Ford [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 7:28 AM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: -Original Message- From: Peter Ford

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: From: Peter Ford [EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 7:28 AM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: -Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED] Sent: Tuesday, July

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
Wei, Alice J. wrote: -Original Message- From: Peter Ford [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2008 4:06 AM To: php-general@lists.php.net Subject: Re: [PHP] mkdir permission errors Wei, Alice J. wrote: Hi, Rob: I forgot to mention that I have been using yum install. I

Re: [PHP] mkdir permission errors

2008-07-15 Thread Peter Ford
ging permissions in /var - where is your web root?! It looks like your PHP code has the /usr/local/apache/htdocs path hard-coded, when your web files are actually in /var/something... -- Peter Ford phone: 01580 89 Developer fax: 015

[PHP] Re: Logic sought

2008-07-10 Thread Peter Ford
ne know if Apache can do such a thing? In a Java environment, I used a session object which cleaned up such folders when it was garbage-collected... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft Interna

[PHP] Re: What font/size do you use for programming?

2008-07-10 Thread Peter Ford
randa, but it's raining horizontally at the moment and my keyboard hates being wet. I'm using Lucida Sans for code these days - I finally figured that it didn't really have to be a fixed-width font, since I couldn't find one that wasn't ugly. -- Peter Ford

Re: [PHP] how to create a slide show using PHP5

2008-07-08 Thread Peter Ford
e new image was a background image, which was being copied up to the foreground... and I had caching disabled (I was on my development system and hacking some annoying IE/JS problems) so the copying-up was forcing a reload from source... Not broken after all. Faith restored. All is well. --

Re: [PHP] odbc msaccess php5 [Giving Up]

2008-07-06 Thread Peter Jackson
Peter Jackson wrote: well thats it Ive come to the conclusion that its a driver/lib issue. From what I can see mdbtools lib only reads and only does basic select. (eg Select * from table where col =thistext But not tex* % or date. Also looks like the project has died (think the last release

Re: [PHP] odbc msaccess php5

2008-07-05 Thread Peter Jackson
Bastien Koert wrote: On Sat, Jul 5, 2008 at 11:04 AM, Bastien Koert <[EMAIL PROTECTED]> wrote: On Sat, Jul 5, 2008 at 6:51 AM, Peter Jackson <[EMAIL PROTECTED]> wrote: $conn=odbc_connect("Database","",""); works $a = "abcd"; (this va

[PHP] Re: Trying to keep a dropdown selection sticky

2008-07-05 Thread Peter Jackson
} echo ''; echo ''; ?> If I'm reading this correctly you mean if the value has been selected before select it again? If so way I did it was by checking the database value eg echo " $value \n"; Peter Jackson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] odbc msaccess php5

2008-07-05 Thread Peter Jackson
r) And before everyone shouts use mySQL postgresql etc that isnt an option at this point in time. I dont need to update the records I just need to be able to read them with php. Oh and whilst I'm here is it possible to read an ms-query via odbc? (eg select * from myquery). Just thinking that may fix one of my problems (Caps and spaces in table/column names aaarrgghh) Peter Jackson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] substr?

2008-06-19 Thread Peter Ford
Jim Lucas wrote: Peter Ford wrote: Frank Arensmeier wrote: 17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip

Re: [PHP] substr?

2008-06-18 Thread Peter Ford
o, 'cos it's been uploaded before your script runs) then you should do a bit more checking before accepting it. The Unix/Linux "file" command can help here. Not perfect, but still... You could also Virus-scan the file before accepting it. All depends on whether your cust

Re: [PHP] Choosing PHP or ? for building an automatic photo web.

2008-06-09 Thread Peter Sorensen
tp://stut.net/ - Original Message - From: "Stut" <[EMAIL PROTECTED]> Newsgroups: php.general To: "Peter Sorensen" <[EMAIL PROTECTED]> Cc: Sent: Sunday, June 08, 2008 11:27 PM Subject: Re: [PHP] Choosing PHP or ? for building an automatic photo web. On

[PHP] Choosing PHP or ? for building an automatic photo web.

2008-06-08 Thread Peter Sorensen
ithin a limited amount of hours? Is PHP the choice? Do I need to use mySQL for this? What features must the webhotel suport and do you know if Surftown does? Is there anywhere I get template source code for this, free or at a low price? best regards Peter Sørensen -- PHP General Mai

[PHP] Re: Scripts slowing down?

2008-05-13 Thread Peter Ford
see if there are any messages written around the time that yourt script runs. Don't always assume that it is your code that is wrong (that's what managers are for) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 J

Re: [PHP] Re: A Little Something.

2008-05-13 Thread Peter Ford
s that make me laugh) and tend to choose what products I buy based on my own research, rather than what a marketing droid thinks I need to buy. Anyway, this is waaay off-topic: it was right from the start - sorry everyone :( I'll keep my pet peeves private from now on ..

Re: [PHP] Re: A Little Something.

2008-05-12 Thread Peter Ford
Stut wrote: On 12 May 2008, at 09:39, Peter Ford wrote: tedd wrote: Hi gang: This is what I did this morning: http://webbytedd.com/bb/tribute/ It speaks for itself. Cheers, tedd tedd, Nothing to do with the subject matter, but I noticed because it is one of your more simple pages: I get a

[PHP] Re: A Little Something.

2008-05-12 Thread Peter Ford
sandboxes) 'course, there are many sites that make the same call to urchinTracker(), and many many worse errors... Cheers Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurs

[PHP] Re: problem with for loop

2008-05-02 Thread Peter Ford
ck the boundary conditions on your loop. As you write it, for($i = 1; $i <= $number; $i++) if $number is 4 then $i will have the values 1,2,3,4. Perhaps message list is zero-based, and you actually need to count from zero: for($i = 0; $i < $number; $i++) so you would get

[PHP] Re: newbie with another HTML/navigation question

2008-04-29 Thread Peter Ford
WebDeveloper tool bar - it has a View Generated Source function which extracts the source from the DOM model the browser used to render the page. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International

[PHP] Re: File Upload Security

2008-04-14 Thread Peter Ford
to find a nice Unix magic numbers file that returns mime types (they're easier to parse than regular magic number responses). Probably something like /usr/share/misc/magic.mime, but that depends on the system. -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Quarters -- ERRORS --

2008-04-14 Thread Peter Ford
Document.getElementById() works fine in IE5 and later. There must be some other error. You could check that document.getElementById(id) is actually returning something - if it fails it returns null. Maybe you have given your checkbox a name and not an id, although that should fail with FF (and Saf

Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-09 Thread Peter Ford
. Your Javascript code also adds a spurious tag (line 17 of dynamic_no_of_recipients2.js) This is not really anything to do with PHP, of course... :) -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. w

Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-09 Thread Peter Ford
Peter Ford wrote: Mark Weaver wrote: Ryan S wrote: Hey everyone, A bit of a puzzle here, dont know if this is a JS problem or PHP or FF or just me. (My money is on the last one :p ) Here's what I am trying to do: In a form I have a listbox with the values 1-5, and unde

Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Peter Ford
View Generated Source tool which will show you what Firefox thinks your page actually looks like after the JS has run... 2. Check that the TD you are loading with content is actually inside the tags - otherwise the inputs won't be included in the request/post variables... Cheers Pete -- Pe

[PHP] Re: putting variables in a variable

2008-03-28 Thread Peter Ford
nd the src attribute to avoid those ugly backslashes ... $body .=" "; Might be better in this case to use heredoc syntax ... $body .<< EndOfChunk; -- Peter Ford phone: 01580 89 Developer fax: 015

Re: [PHP] Re: optimilize web page loading

2008-03-28 Thread Peter Ford
Eric Butera wrote: On Thu, Mar 27, 2008 at 12:41 PM, Peter Ford <[EMAIL PROTECTED]> wrote: Jason Pruim wrote: > > On Mar 27, 2008, at 11:05 AM, Shawn McKenzie wrote: >> Al wrote: >>> Good point. I usually do use the single quotes, just happened to key

Re: [PHP] Re: optimilize web page loading

2008-03-27 Thread Peter Ford
,$foo; is actually the fastest, because the strings are not concatenated before output. I think that was the overall summary - I can't locate the original post to verify (or attribute) but it's in this list somewhere... Cheers -- Peter Ford phone: 015

[PHP] Re: Pattern etc to reduce duplicated validation?

2008-03-27 Thread Peter Ford
d value for bar in class foo'); } } } // = Script = $var = $_POST['var']; $foo = new foo(); try { $foo->setBar($var); } catch (Exception $e) { echo 'An error occurred: ',$e->getMessage(),"\n"; } Take a look at http://www.php.net/manual/en/language.exc

[PHP] Re: fwrite/fclose troubles

2008-03-20 Thread Peter Ford
ay you were constructing the file name: interpolating the variables in a string is slightly less efficient than concatenating the bits together, and there are possible gotchas when using the $this->variable structure in a string like that. An alternative syntax is to escape the variables with

Re: [PHP] Transferring files between computers using php

2008-03-07 Thread Peter Ford
new directories sshfs B:/path_to_where_the_file_ismount_point_for_B sshfs C:/path_to_where_the_file_goes mount_point_for_C # Copy the file across: repeat this step every few seconds (cron job?) cp mount_point_for_B/the_file_to_copy mount_point_for_C # Unmount the SSHFS mounts when you'

Re: [PHP] Re: temporary error

2008-02-25 Thread Peter Ford
g me then fine. > > But the truth is it is harming all of us. Do we really want our > children taught about a magical sky-god who insists on genital > mutilation at birth? Do we want influences into our governments that > inhibit natural advances in modern scien

Re: [PHP] Sending XML to MSIE7

2008-02-15 Thread Peter Ford
e URL, to be certain... That seems to work - IE7 sees the xml-stylesheet PI and doesn't then try to mangle the XML in it's own special way. Only problem is the extra hit on the server to get the XSLT... :( -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Re: Create collections of objects

2008-02-15 Thread Peter Ford
Emilio Astarita wrote: > Peter Ford <[EMAIL PROTECTED]> writes: > >> Emilio Astarita wrote: >>> Hi people, >>> >> A static method should still be able to set values of private members. I do >> something like: >> ... >> > > Thank

[PHP] Re: Create collections of objects

2008-02-15 Thread Peter Ford
ded) condition, indexed by the element Id (useful for making HTML lists, for example). In fact, I have a base class which implements this by class introspection - filling the properties of objects which extend it by mapping them to the database fields... -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: XSLTProcessor without validation

2008-02-15 Thread Peter Ford
Siegfried Gipp wrote: > Hi, > > i still got no answer. Maybe i did not see it, altough i'm trying to read any > single post. But may be i overlooked it due to high traffic. So now i have > set up a filter (hopefully) copying answers to another folder. > > Here is the question: Is it possible to

Re: [PHP] Anyone else doing PHP on Symbian?

2008-02-06 Thread Peter Ford
Paul Scott wrote: > On Tue, 2008-02-05 at 13:29 -0500, Daniel Brown wrote: >> Still debating what >> device I'll get next, but I want to use it as a mobile server myself. >> I had been working on a bound-for-trash PDA doing the same a while >> back, but with what we'll refer to as "limited result

[PHP] Printing Question

2008-01-26 Thread Peter Jackson
require landscape printing. So the question is how to replace this via php/whatever. (I did say it was a vague question) Oh and I'm aiming for a unix/windows outcome. any links welcome. TIA Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] Exception thrown without a stack frame

2008-01-25 Thread Peter Ford
Jochem Maas wrote: > Jochem Maas schreef: >> I'm getting exceptions thrown without a stackframe. I understand what >> this >> means but not how it can happen given the following: >> >> 1. *every* frontend script on the site is wrapped in a try/catch block >> 2. I have set an exception handler to du

Re: [PHP] regex

2008-01-21 Thread Peter Jackson
Jim Lucas wrote: Peter wrote: I am trying to convert ms access sql to postgresql using php. I have a sql statement in the form ;- $sql = SELECT DISTINCT [Table Name].[Column.Name], [Table Name 1].[Column Name 2] etc. what I want to end up with is $sql = SELECT DISTINCT

Re: [PHP] regex

2008-01-21 Thread Peter Jackson
Jim Lucas wrote: Peter wrote: I am trying to convert ms access sql to postgresql using php. I have a sql statement in the form ;- $sql = SELECT DISTINCT [Table Name].[Column.Name], [Table Name 1].[Column Name 2] etc. what I want to end up with is $sql = SELECT DISTINCT

Re: [PHP] regex

2008-01-21 Thread Peter
ou have got to do the conversion so far please? > > Regards > > Keith > > - > Websites: > http://www.karsites.net > http://www.php-debuggers.net > http://www.raised-from-the-dead.org.uk > > All email addres

[PHP] regex

2008-01-21 Thread Peter
. (Think the one I'm trying on is 2000+ characters. So its not a case of set number of words/numbers between [] it could be 2 or it could be 4 etc) Anyone workout what I am talking about and can help would be appreciated. Peter -- PHP General Mailing List (http://www.php.net/) To unsubs

[PHP] Re: Can't find .php3 files

2008-01-09 Thread Peter Ford
Jim wrote: > I'm sure this is a FAQ but I can't seem to come up with the right search > keys to dig it out. > I'm trying to help a friend migrate his application to php 5 from > another system. The problem seems to be that he references files > (require, include, etc) that have a .php3 extension,

Re: [PHP] Assign variable to a block of html code

2007-12-20 Thread Peter Ford
You could just swap all the double quotes in the HTML tags for single quotes - that would work in this instance... $myblokvar = " ... "; Or perhaps a HereDoc syntax: $myblokvar = << ... EndOfMyHTMLBlock; Then you don't need to worry about what quotes you use, and if you start putting stuff

<    1   2   3   4   5   6   7   8   9   10   >