Re: [PHP] Can any one spot the Parse error Here

2001-07-02 Thread Andrew Halliday
Brace count mismatch. You are missing a '}'. God knows where it is...inconsistent spacing and code too lengthy. Functionise/objectise your code! AndrewH - Original Message - From: ReDucTor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 4:17 PM Subject: [PHP] Can any

[PHP] PHP Form (aka:Re: [PHP] Can any one spot the Parse error Here)

2001-07-02 Thread Andrew Halliday
Only typed it up in like 20 min, i normaly do that [code tidying] after :) hehe tisk tisk...the merits of design havent been hammered through you yet? you are lucky!!! But, this does raise an interesting issuegood PHP code structure/form. What do people consider good PHP form? Ive coded

Re: [PHP] PHP Form (aka:Re: [PHP] Can any one spot the Parse error Here)

2001-07-02 Thread Andrew Halliday
It's more of a pain if I have to remember what order the parameters go Yeah, good point. I can see that. What i have been doing is componentising the page into functions which are responsible for rendering a discrete section of that page...ie if a page consists of a title bar and a form and

Re: [PHP] upload on Win9x

2001-06-19 Thread Andrew Halliday
Have you set the content type of the form to be multipart MIME ? That screws me every time... AndrewH - Original Message - From: Christian Dechery [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 19, 2001 11:16 AM Subject: [PHP] upload on Win9x I can't get file uploads to

Re: [PHP] Pie Charts Bar Charts Line Charts...

2001-06-19 Thread Andrew Halliday
For basic bars, use tables with divs whose width is set to a percentage of the table cell size using the style attribute eg: table tr tdnumber of unemployed/td tddiv style=background-color: red; width:4.7%/div/td /tr /table For XY scatters, PHPs dynamic graphic producing capabilities are

Re: [PHP] Starting session

2001-06-19 Thread Andrew Halliday
Just make it so that a successful login process involves setting a session variable. In all pages that require a login, check that the session variable exists. In any other pages, just ignore it. Simple as that! Now just read the php documentation on how to do it ... (ie using the session_*

[PHP] Can PHP for Oracle randomly access rows in a result set?

2001-03-18 Thread Andrew Halliday
Can PHP for Oracle randomly access rows in a result set? I have read documentation for both Oracle functions (ora_*) and Oracle 8 functions (OCI_*) but cant seem to find a way to randomly access rows in a result set like you can with PostgreSQL or MySQL ... whats the story here?! Are we FORCED

Re: [PHP] Good Free PHP Editor?

2001-03-15 Thread Andrew Halliday
Hey guys and gals - i think i finally found my all and end all PHP editor - PHPEd - good stuff! AndrewH - Original Message - From: "John LYC" [EMAIL PROTECTED] To: "Andrew Halliday" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, March 12, 2001 5:54 PM Subject:

Re: [PHP] PHP saving forms on client side

2001-03-14 Thread Andrew Halliday
I dont know what you call 'feasable' but this would be the most efficient way of doing this: FORM NAME="coolform" METHOD=POST ACTION='reference to self' INPUT type="text" name="firstName" value="?=$firstName?"/INPUT INPUT type="text" name="lastName" value="?=$lastName?"/INPUT INPUT type="submit"

Re: [PHP] tutorials on good database design

2001-03-13 Thread Andrew Halliday
It should be just as simple as understanding the following terms and when they should be used: - entity - attribute - relationship - cardinality - first normal form - second normal form - third normal form - fourth normal form - boyce-codd normal form (BCNF) - fifth normal form (could ignore this

[PHP] Good Free PHP Editor?

2001-03-11 Thread Andrew Halliday
Does anyone know of a good PHP enabled editor that fits the following criteria:? (in order of importance) - Is free - Runs under Windows - Has colors (syntax highlighting) - Can edit multiple files (ie multi threaded) - Reports line numbers - Has good search replace functionality ??? Ive been

Re: [PHP] external data saving

2001-03-08 Thread Andrew Halliday
This could be done in one of several ways: - form : what you sound like you want to do seems prettey simple - why is it not doable with a form? - file upload : this seems more like what you are looking for ... use the commands in Chapter 19 (File Uploads) of the PHP manual The advantage with a

Re: [PHP] populate select box with contents of a file?

2001-03-07 Thread Andrew Halliday
Check out XVI. Directory functions and XX. Filesystem functions of the PHP manual. - Original Message - From: "Jerry Lake" [EMAIL PROTECTED] To: "Henrik Hansen" [EMAIL PROTECTED]; "php general" [EMAIL PROTECTED] Sent: Thursday, March 08, 2001 11:10 AM Subject: [PHP] populate select box

Re: [PHP] PHP PostgreSQL

2001-03-04 Thread Andrew Halliday
The following is an example demonstrating how to set up a foreign key constraint in PostgreSQL 7: CREATE SEQUENCE school_id_seq; CREATE TABLE school ( school_id INT NOT NULL PRIMARY KEY DEFAULT nextval('school_id_seq'), school_name VARCHAR(80) NOT NULL ); CREATE SEQUENCE student_id_seq;

[PHP] Why doesnt pass-by-value work?

2001-03-04 Thread Andrew Halliday
When I call this function: function getColumnName($col) { if ($col 0 $col pg_numfields($this-lastResultSet)) return pg_fieldname($this-lastResultSet,$col); else return null; } It returns null all the time ! The condition is NOT the problem ... Ive

Re: [PHP] Why doesnt pass-by-value work?

2001-03-04 Thread Andrew Halliday
Ahh - dont worry about this post ... :) AndrewH - Original Message - From: "Andrew Halliday" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 05, 2001 10:51 AM Subject: [PHP] Why doesnt pass-by-value work? When I call this function: function getColum

Re: [PHP] simple OO question

2001-03-04 Thread Andrew Halliday
yes you can do all of this but in no OO language so far have i seen the ability to access a variable inside a method...you would have to do this: class myclass { var $myvar; function setmyvar($newmyvar) { $this-myvar = $newmyvar; } } Then you could do this: $myclassObj = new

Re: [PHP] simple OO question

2001-03-04 Thread Andrew Halliday
an i put this in the constructor? john Andrew Halliday wrote: yes you can do all of this but in no OO language so far have i seen the ability to access a variable inside a method...you would have to do this: class myclass { var $myvar; function setmyvar($newmy

Re: [PHP] simple OO question

2001-03-04 Thread Andrew Halliday
Ahh damn - minor omission - add a '( )' after myclass constructor name :-) AndrewH - Original Message - From: "Andrew Halliday" [EMAIL PROTECTED] To: "John LYC" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, March 05, 2001 2:47 PM Subject: Re: [PHP] simple OO

[PHP] Loss of connection handle object

2001-03-01 Thread Andrew Halliday
Okay - Im writing an object to wrap a database. The key problem is this: - it declares a connection var as an object property - the open() function opens the connection to the database and stores the handle in $this-connection - the executeQuery() method complains about not having a

Re: [PHP] Loss of connection handle object

2001-03-01 Thread Andrew Halliday
- From: "Andrew Hill" [EMAIL PROTECTED] To: "Andrew Halliday" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, March 02, 2001 11:13 AM Subject: Re: [PHP] Loss of connection handle object Andrew, What is the open() function? B

Re: [PHP] Loss of connection handle object

2001-03-01 Thread Andrew Halliday
tgreSQL link resource in /var/wwwroot/php/PostgreSQLDataSource.php on line 67 Object ------ WHAT THE HELL IS GOING ON ?!?!?!?! AARGH! AndrewH - Original Message - From: "Simon Garner" [EMAIL PROTECTED] To: "Andrew Halliday" [EMAIL PROTECTED]; [EMAIL PROTEC

Re: [PHP] Loss of connection handle object

2001-03-01 Thread Andrew Halliday
apsulator doesnt work - it seems to lose $this-connection in PostgreSQLDataSource when its contained in AbstractDataSourceManager ! ... theres something screwball here - i mean - an object should be able to access its own properties in any scope at any time shouldnt it ? This is totally screwing me here .

Re: [PHP] Loss of connection handle object

2001-03-01 Thread Andrew Halliday
Ahh dont worry - figured it out!!! If anyone cares: In the encapsulating class i had two copies of the same variable and i was calling the local copy of open() not the object version ... AARGH - Original Message - From: "Andrew Halliday" [EMAIL PROTECTED] To: "Andr

[PHP] Loss of Connection hanle in object

2001-02-28 Thread Andrew Halliday
Okay - Im writing an object to wrap a database. The key problem is this: - it declares a connection var as an object property - the open() function opens the connection to the database and stores the handle in $this-connection - the executeQuery() method complains about not having a