[PHP] object method overloading

2002-12-03 Thread Javier Montserat
can you do method overloading in php as you can in java? Javier _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- PHP General Mailing List (http://www.php.net/) T

[PHP] Re: multiple file upload

2002-11-14 Thread Javier Montserat
here's a couple of the more tricky code snippets which should make it easy for folks to see how a multiple file upload select can work - the rest is basically a lot of interaction with the database - storing / retrieving the upload list. Its a bit tricky but worth it though - the users responci

[PHP] Re: multiple file upload

2002-11-14 Thread Javier Montserat
Is it posible to do multiple file upload without selecting each file manual in multiple form fields? Yes. I have recently implemented an upload mechanism based on hotmails add attachment mechanism. haven't got time for a detailed explanation but here is the basic idea - on your html page - /

[PHP] PHP download problem IE5 on mac

2002-11-14 Thread Javier Montserat
I'm using this code to various files for download via a http header - $filename = basename($filepath); header("Content-type: unknown/unknown"); header("Content-Disposition: attachment; filename=$filename"); readfile($filepath); works fine in most cases - the save dialogue appears. However - IE

[PHP] Re: Works in html, not when echoed in PHP

2002-11-13 Thread Javier Montserat
rather than using echo why not just do this - ?> onresize="window.location.reload(false)" topmargin="1" bottommargin="0" leftmargin="0" rightmargin="0"> ?> this way you don't have to worry about getting the quotes right... Hello, "Aaron Merrick" <[EMAIL PROTECTED]> wrote: Folks, Can'

RE: [PHP] left click downloads

2002-11-13 Thread Javier Montserat
ing 'magic bytes' of known file formats. hope this is useful to some of you... javier From: "David Russell" <[EMAIL PROTECTED]> To: "'Javier Montserat'" <[EMAIL PROTECTED]> Subject: RE: [PHP] left click downloads Date: Tue, 12 Nov 2002 13:46:58 +02

[PHP] left click downloads

2002-11-12 Thread Javier Montserat
I want to make it easier for people to download files from my website by having the download start when the visitor clicks a link (as opposed to right click / save target as). How can I achieve this with PHP? Do I include the file in a header() call ? Thanks, javier _

Re: [PHP] weird IE cookie problem

2002-10-14 Thread Javier Montserat
ahhh. a combination of incorrect timezone on my new laptop and the server time being slightly out was causing my head a lot of pain... thanks for the pointer, Jav >From: Marco Tabini <[EMAIL PROTECTED]> >To: Javier Montserat <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTE

[PHP] weird IE cookie problem

2002-10-14 Thread Javier Montserat
Hi I've successfully been using the following code to set cookies in IE / NS / Mozilla. I've just bought a new laptop and in IE 5.5 and 6 the cookies are not being set by my site. Other sites (msn etc) set cookies fine. I've installed Mozilla and this accepts cookies fine. WTF is wrong wit

[PHP] quotes in text strings

2002-10-02 Thread Javier Montserat
Hi Single quote's in strings entered via a text input field are subsequently appearing with what appears to be an escape character - comm\'ents how can i correct this? I've tried htmlspecialchars($string, ENT_QUOTES); and htmlentities($string, ENT_QUOTES); but these don't seem to work (maybe

[PHP] setting .htaccess authentication with PHP

2002-09-27 Thread Javier Montserat
Hello Everyone, I've developed a feature which allows clients to upload files to a dir on the server. I want to allow clients to email a url to the file as follows :- http://www.mysite.com/clientX/file01.jpg I want to setup challenge / response authentication on the client folder so that wh

[PHP] Re: formatting a filename

2002-09-05 Thread Javier Montserat
$filename = strtolower (eregi_replace ("[^A-Za-z0-9_.]", "_", $filename)); seems to be what I want. thanks to everyone for the help Javier _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General

[PHP] formatting a filename

2002-09-05 Thread Javier Montserat
i want to format the filename of an uploaded file as follows :- -- replace blankspace with "_" -- remove any illegal characters. Which string functions should I use to do this? Thanks, Javier _ Join the world’s largest e-mail

[PHP] Re: XML vs Everything Else

2002-09-04 Thread Javier Montserat
>Spend some time learning about xml and you won't regret it Could you (or anyone else on the list) recommend some good resources (Books / Websites) for learning XML and XSLT? Thanks, Javier _ MSN Photos is the easiest way to s

[PHP] re: Refering to an object from within an array variable in another class

2002-09-03 Thread Javier Montserat
I believe the following discussion from Web Application Development with PHP 4.0 (available online at http://safari.oreilly.com) may shed some light on your question... >> Whenever PHP encounters a statement for which write access to a variable is needed, it evaluates and calculates the data

[PHP] re: Refering to an object from within an array variable in another class

2002-09-03 Thread Javier Montserat
Hi, Syntax B doesnt seem to work exactly because as you say "it doesn't directly access the 'bars' variable..."; here... $reference_to_bar = $this->GetBar($id) ; it seems that a copy of the bar object is being created, which is a new object. This new bar object is not related to the bar obj

[PHP] Class operator :: Problem

2002-09-03 Thread Javier Montserat
i think because you assign a method to the variable rather than a data member you need to include parenthsis... a::test() >> I have problems to make a dynamic call, please help me returns: Fatal error: Call to undefined function: a::test() in /usr/local/share/version2.mypsi.de/index.

[PHP] greeting based on time

2002-09-03 Thread Javier Montserat
really simple one - does someone have a bit of code that will variously display 'good morning', 'good afternoon', 'good evening' based on the current time? good morning from london, Javier _ Send and receive Hotmail on your mob

[PHP] sorting array question

2002-09-03 Thread Javier Montserat
i have the following code which reads a list of files from a directory - $listcmd = "ls " .$dirPath; $temp = exec($listcmd, $listoffiles, $status); if($status == 0) { for ($i =0; $i < sizeof($listoffiles); $i++) { $this->fileName[$i] = $listoffiles[$i]; $this->sizeofFile[$i] = sprintf("%01.

[PHP] Re: how do I send information to a php page from a menu list

2002-09-02 Thread Javier Montserat
different approach using JavaScript... // drop down redirect function doRedirect(value) { if ((value != "") || (value != "0")) { self.location=value; } else { alert('Please Make a Selection'); return false; } } //--> < make a selection > Bueno, Javier

[PHP] Re: Cannot get data from form.

2002-08-29 Thread Javier Montserat
Turning off register globals and referencing variables through the new array syntax certainly gives a greater degree of control over the origin of data; ie: a variable referenced $_POST['foo'] has (most likely) been received as a result of http post and it's reasonably safe to assume $_COOKIE['

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
machine generated xml privacy statement, >then stability with regards >to cookies is not guaranteed. Do a search and read up about it. Check out >w3c's site. > >- Original Message - >From: "Javier Montserat" <[EMAIL PROTECTED]> >To: <[EMAIL PROTEC

[PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
I'm setting a session cookie with the following code - function setSessionCookie(){ $expires = time()+$this->session_expires; $issetCookie = setcookie("$this->cookiename", "$this->sess_id", "$expires", "/",

[PHP] oops - solved re: insert fails w/ postgres database

2002-08-22 Thread Javier Montserat
the filename field is of type 'oid' rather than 'character varying'... yep, inserting a string into an oid feild will make the db baarrrfff... Saludos Javier _ Chat with friends online, try MSN Messenger: http://messenger.msn.co

[PHP] insert query fails w/ postgres database

2002-08-22 Thread Javier Montserat
Hello PHP people... I'm trying to insert a filename (string) into a postgres database field but the insert query is failing - Warning: pg_exec() query failed: ERROR: oidin: error in "abc_abcde012_010_mpeg1.mpeg": can't parse "abc_abcde012_010_mpeg1.mpeg" in /usr/local/apache/htdocs/filename.ph

[PHP] exec / mkdir question

2002-08-12 Thread Javier Montserat
i'm using the following code to create a directory :- $temp = exec("mkdir $path"); it doesn't work... i've validated the $path var which is correct. i suspect it is a permissions issue. what should i look for to resolve this? thanks, javier __

Re: [PHP] control structure question

2002-07-23 Thread Javier Montserat
at to do in the even that a file need sto be removed > // from the database. >break; >} > >Basically, whatever the value of $action, that is what section of code will >execute. Hope that helps! > >Martin Clifford >Homepage: http://www.completesource.net >Develop

[PHP] control structure question

2002-07-23 Thread Javier Montserat
is there a more programmatically elegant way of saying... $isError = ""; function main() { doStep1(); if (!$isError) { doStep2(); } if (!$isError) { doStep3(); } // etc. etc. } function doStep1() { if ($something) { $isError = 1; } } f

[PHP] re: OO Programming - get practical

2002-07-23 Thread Javier Montserat
For a really good overview of the OO programming read "Thinking in Java" by Bruce Eckel. What you learn can then easily be applied to your coding practices in PHP. The author has made the book available for free from his site www.mindview.com _

[PHP] Login / Authentication Class

2002-07-23 Thread Javier Montserat
I've been developing a simple (protecting nuclear secrets it aint) login / authentication class library. This code is designed to - 1. check unname & password are completed 2. check uname & password contain only permitted chars (a-z,1-9) 3. match user against dbase user table 4. generate a uniq