[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

[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] 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; } }

Re: [PHP] control structure question

2002-07-23 Thread Javier Montserat
; } Basically, whatever the value of $action, that is what section of code will execute. Hope that helps! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Javier Montserat [EMAIL PROTECTED] 07/23/02 10:03AM is there a more

[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

[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.php

[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:

[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, /,

Re: [PHP] setcookie IE6 problem

2002-08-29 Thread Javier Montserat
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 PROTECTED] Sent: Thursday, August 29, 2002 1:39 PM Subject: [PHP] setcookie IE6 problem I'm setting a session cookie

[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

[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... script language=JavaScript // drop down redirect function doRedirect(value) { if ((value != ) || (value != 0)) { self.location=value; } else { alert('Please Make a Selection'); return false; } } //-- /script form select name=name

[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.2f,

[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

[PHP] Class operator :: Problem

2002-09-03 Thread Javier Montserat
? class a { function test() { echo Hallo; } } $testfunct = a::test(); $testfunct; ? 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 ? class a {

[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

[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: 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

[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: 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] 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

[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

[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

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 PROTECTED] Subject: Re: [PHP] weird IE

[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] left click downloads

2002-11-13 Thread Javier Montserat
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 +0200 Hi Javier, Nope, this is not a php thing at all. You could probably get it right

[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 - ? body onload=start();initialize();onoff('mainmenu',section,'on') 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

[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 on

[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] 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

[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/)