[PHP] RE: notice:undefined variable

2002-06-04 Thread Michael Davey
OK - couple of things first: a) The PHP mailing list is for programmers of PHP looking for help making their own scripts - not for people who want support for implementing someone else's script. There is a link on the site where I found a copy of your script offering support, this is where you

[PHP] Re: notice:undefined variable

2002-06-04 Thread Michael Davey
Ooops, now I feel silly - sent this to the wrong list! Hangs head in shame! :-) Michael Davey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... OK - couple of things first: a) The PHP mailing list is for programmers of PHP looking for help making t

[PHP] Re: php and javascript question

2002-06-05 Thread Michael Davey
Not unless you pass the variable to the next page explicitly. You can do this by either encoding it into the URL of the next page: http://your.com/page.php?var=value or by putting the variable into an HTML form and submitting it. regards, Mikey Kemu [EMAIL PROTECTED] wrote in message [EMAIL

[PHP] Re: Finding out how a variable was registered

2002-06-05 Thread Michael Davey
Iff you asre using the latest version of PHP, use the $_GET/$_POST superglobals regards, Mikey Joe Pemberton [EMAIL PROTECTED] wrote in message 000f01c20cc1$1df6f320$9b6ee60c@c1195782a">news:000f01c20cc1$1df6f320$9b6ee60c@c1195782a... Is there a function call to figure out how a variable was

[PHP] Re: Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread Michael Davey
By reading the manual section relevant to your specific database... Igor Portnoy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I am passing a variable to the new page, when user clicks on the link. Something like that: a href=showimage.php?ID=38img

RE: [PHP] Re: Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread Michael Davey
at http://www.phpbuilder.com/columns/ if you need more help... Mikey BTW - reply to the list -Original Message- From: Igor Portnoy [mailto:[EMAIL PROTECTED]] Sent: 05 June 2002 19:59 To: Michael Davey Subject: RE: [PHP] Re: Passing variable to new page and pulling the rest of info

[PHP] Re: currency rounding issues

2002-06-05 Thread Michael Davey
I have found that the best way to work with currencies is to avoid using any type of floating point math. If you multiply your start amount by 100, then perform your calculations as integers and then divide by 100 again at the end, it should work out OK... (Heh, at least it has worked for me

[PHP] Re: Can't Connect to INFORMIX DB

2002-06-06 Thread Michael Davey
Remove the semi-c0lon from the following line in php.ini: ;extension=php_ifx.dll And then restart your web-server if your run PHP as a module... Mikey GastóN [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks for the answer.. But this is the story now..

Re: [PHP] Generating word documents based on fields in a browser

2002-07-11 Thread Michael Davey
? $word=new COM(word.application) or die(Cannot start MS Word); print Loaded word version ($word-Version)\n; $word-visible = 1 ; $word-Documents-Add(); $word-Selection-Typetext(This is a test); ? does anyone recognise this? Oh yes - this would be Word via COM - if you are having

[PHP] Re: MS SQL Server and ODBC

2002-07-11 Thread Michael Davey
I don't really know much about freetds so this could all be wrong, but... when you set-up a DSN on a server, the database is specified there - hope this helps. Mikey Tim Nields [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am attempting to connect to a MSSQL

Re: [PHP] MS SQL Server and ODBC

2002-07-11 Thread Michael Davey
Errr - doesn't that function apply to mySQL databases only? Mikey Adam Voigt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Check out the mssql_select_db function. Call it right after the connection open. Adam Voigt [EMAIL PROTECTED] On Thu, 2002-07-11 at

Re: [PHP] MS SQL Server and ODBC

2002-07-11 Thread Michael Davey
doh! Adam Voigt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I wouldn't have said it if it did. Notice that it's MSSQL_select_db not MYSQL_select_db. Adam Voigt [EMAIL PROTECTED] On Thu, 2002-07-11 at 10:03, Michael Davey wrote: Errr -

Re: [PHP] MS SQL Server and ODBC

2002-07-11 Thread Michael Davey
at 10:03, Michael Davey wrote: Errr - doesn't that function apply to mySQL databases only? Mikey Adam Voigt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Check out the mssql_select_db function. Call it right after the connection open. Adam

[PHP] Re: Table Making

2002-07-11 Thread Michael Davey
How about working out the length of the column (by dividing the number of rows by the number of cols you want), dump your results into an array and using the col length as an offset to pick through the resulting table? // $data is an array of results $rows = count ($data) $row_len = round

[PHP] Re: [PHP-WIN] More bzip woes! No file written...

2002-07-12 Thread Michael Davey
Use full path for every filename. I have now changed my code to do this, see below. Use ls -als to figure the permissions on each file. I am running this on a windows box for now, and although I have cygwin and can run ls and chmod, they don't seem to have any affect on the actual

[PHP] Was: [PHP-WIN] GD Freetype on W2K/Apache1.3.2/PHP4.2.0

2002-05-30 Thread Michael Davey
I know this is cross-posting, but I have no luck with finding a solution to this problem on PHP-WIN, and I have since tried running my code on a Linux server and have had the same problems... so here goes! -- Original Post -- Sorry if this has been posted a hundred times already - but I am

[PHP] Re: SQL question, getting error and not sure why

2002-05-30 Thread Michael Davey
insert into acteursenc (nuacteur,nomacteur) (select AA, BB from (select max(nuacteur)+1 AA from acteursenc), (select 'Michael Sweeney' BB from acteursenc)) produces an ORA-1: unique constraint error. The primary key is

[PHP] Re: SQL question, getting error and not sure why

2002-05-30 Thread Michael Davey
[EMAIL PROTECTED]... Maybe it does in Oracle - you should check your documentation though... BTW, please post your replies to the list rather than me personally :-) -Original Message- From: Michael Sweeney [mailto:[EMAIL PROTECTED]] Sent: 30 May 2002 15:58 To: Michael Dave

[PHP] Re: [PHP-WIN] GD Freetype on W2K/Apache1.3.2/PHP4.2.0

2002-05-30 Thread Michael Davey
Ignore this - I have managed to get them to work in Unix - now onto Windows... sigh! Michael Davey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I know this is cross-posting, but I have no luck with finding a solution to this problem on PHP-WIN, an

[PHP] Re: I want a script to run after a page already loads.

2002-05-30 Thread Michael Davey
It would be possible to flush the output of your page (i.e. your HTML) and then put the PHP code after this... however, the page wouldn't appear to be fully loaded until the script had finished processing... Mikey Phil Schwarzmann [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I

[PHP] Re: Posting to a form - When user hits BACK button all the data isgone

2002-05-30 Thread Michael Davey
The best way to do this is to register your form data as session variable when it is processed on the second page. Then add some scripting in the first page to check for these variables and pre-populate the form as necessary... Mikey Phil Schwarzmann [EMAIL PROTECTED] wrote in message

[PHP] Re: Help with example session class (second request)

2002-05-30 Thread Michael Davey
Not quite sure where you got this $login class instance from, but it appears to be from thin air. If you have a session class then you would need to instantiate it first with: $login = new XYZSessionClass(); // plus any constructor arguments However, I am a bit confused as you mention using

[PHP] Re: Help with example session class (second request)

2002-05-30 Thread Michael Davey
Oops - should have read down a lot further... Michael Davey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Not quite sure where you got this $login class instance from, but it appears to be from thin air. If you have a session class then you wo

Re: [PHP] Help with example session class (second request)

2002-05-30 Thread Michael Davey
As I said... Not quite sure where you got this $login class instance from, but it appears to be from thin air. If you have a session class then you would need to instantiate it first with: $login = new XYZSessionClass(); // plus any constructor arguments And to quote from the manual page you

Re: [PHP] Re: Help with a trivial session example.

2002-05-30 Thread Michael Davey
Hmm... I can't say that I have moved over to the new superglobals yet - I prefer register_globals cos I am lazy ;) But it does seem that there are two possible variables that you need to use - the one in your script ($HTTP_SESSION_VARS), but this is only for 4.0.6 or less, it is $_SESSION

Re: [PHP] Re: Help with a trivial session example.

2002-05-30 Thread Michael Davey
Given $myvar = 5; If you use session_register('myvar'); Then on another page, do you just access it via $myvar? That is exactly how it works - I also have session.auto_start turned on as well. And if that's the case, isn't it the same to set $HTTP_SESSION_VARS['myvar'] = $myvar; Or

[PHP] Re: Run php function with user click

2002-05-31 Thread Michael Davey
Not really, seeing as PHP is executed at the server and not on the client - you would need JavaScript for this. Mikey Dave Shacket [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I know how to have my php code run a function within itself. But is there a way

[PHP] Re: PHP can not connect to mysql

2002-05-31 Thread Michael Davey
Check permissions on '/var/lib/mysql/mysql.sock' I seem to remember having this problem in the past... Mikey Andy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I am runningn suse72 and there was a mysql installation with the rpm installed. so I

Re: [PHP] Re: PHP can not connect to mysql

2002-05-31 Thread Michael Davey
ROTECTED] -- -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: 31 May 2002 15:19 To: Michael Davey; [EMAIL PROTECTED] Subject: [PHP] Re: PHP can not connect to mysql That is the wron socket. I found out that my mysql version is running on socket /tmp/my

[PHP] Class variables and scope

2002-05-31 Thread Michael Davey
Can anyone here shed some light on this issue? I have a class which is responsible for it's own database access and (some of it) is initalised as below: ? class myClass { var $conn; var $sth; // etc... function myClass ($db) { $host = localhost; $user =

[PHP] Re: apache2filter.dll

2002-05-31 Thread Michael Davey
It is called php4apache2.dll Mikey Herman Pool [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I have downloaded PHP4.2.1 because I want to use it with apache 2.0.36 But there is no php/experimental/apache2filter.dll file in PHP4.2.1 Did I miss

Re: [PHP] Class variables and scope

2002-05-31 Thread Michael Davey
I am doing that - sorry, should have given you a bit more code... ? class myClass { var $conn; var $sth; // etc... function myClass ($db) { $host = localhost; $user = user_name; $password = password; $this-conn = mysql_connect ($host, $user,

[PHP] Re: gd project question

2002-05-31 Thread Michael Davey
I believe you will need to use sin and cos to do this... I experimented with drawing circles in javascript (sorry, it's not PHP but you can see the concept) and ended up with this: for (j = 0; j = 360; j += (360 / 10)) { // x1 y1 are offset values var s = x1

[PHP] bzip/zlib question

2002-05-31 Thread Michael Davey
I have been looking through the documentation for using Bzip2 or zlib compression and have a couple of questions for the group... 1.Which is best to use on terms of: resultant file size, availability of decompression clients ease of use? 2.Both bzip zlib documentation makes use of

[PHP] Re: Class/Objects

2002-05-31 Thread Michael Davey
I believe so - but why are you passing a the object a reference to itself? $bar-db_obj-run_some_code($bar); $bar-tpl_obj-do_this_for_me($bar); If you need to access parts of the object from within, use the $this- pointer. It works but was wondering if its 'legal' to use it like this -

[PHP] Re: Newbie question : PHP variables are not posted by this

2002-05-31 Thread Michael Davey
Can you send the code that is failing to the list - it will help in working out the problem... Mikey FréDéRick St-Hilaire [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It a BASIC question, With the following: FORM NAME='Job_Application'

[PHP] Re: diplaying the path

2002-05-31 Thread Michael Davey
$_SERVER['HTTP_REFERRER'] Kris Vose [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there a variable/function in php that will display the url location of the hyper-link that brought them to the current page. Thanks in advance. Kris Vose -- PHP General

Re: [PHP] bzip/zlib question

2002-05-31 Thread Michael Davey
So does anyone have any advice on adding files rather than strings? On Fri, 31 May 2002, Michael Davey wrote: I have been looking through the documentation for using Bzip2 or zlib compression and have a couple of questions for the group... 1. Which is best to use on terms of: resultant

[PHP] Re: Parsing file's

2002-05-31 Thread Michael Davey
You should normalise your data - have a field in the second csv that links to the first csv and then you can have as many rows as you want associated with the record in the first file. Mikey Scott [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a csv file

[PHP] Re: Variables - Using The Contents Of A Varibale Name Built Dynamically

2002-06-01 Thread Michael Davey
You could give the button the same name in each form - only the fields in between the form/form tags is actually submitted, then put a hidden field in the form that uniquely identifies the data being submitted. Just a thought... it is what I usually do... Mikey Jason Teagle [EMAIL PROTECTED]

[PHP] Possible to convert from Hex string to integer?

2002-06-01 Thread Michael Davey
Does anyone know of a function within PHP that will convert a hexadecimal string (without the leading 0x) into an integer? regards, Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Possible to convert from Hex string to integer?

2002-06-01 Thread Michael Davey
Which is so easy to find in the offline manual... Stuart Dallas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Saturday, June 1, 2002 at 6:29:59 PM, you wrote: Does anyone know of a function within PHP that will convert a hexadecimal string (without the

Re: [PHP] massive words

2002-06-02 Thread Michael Davey
Also, if you are really worried about placing too much load on the server, you could use JavaScript to check the form submission on the client side using the same technique... Mikey Bogdan Stancescu [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... First, you

[PHP] Re: Variables - Using The Contents Of A Varibale Name Built Dynamically

2002-06-02 Thread Michael Davey
Won't that treat all radio buttons on the page as one group, instead of being separate groups for each form? No - the form/form tags enclose the data that is being submitted - nothing outside of the tags will reach the script that handles the request. Mikey -- PHP General Mailing List

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Michael Davey
However... From the point of view of someone who has worked in a company where diesign is separated from development, it is much better to have separate files with HTML templates with special markers (in the library I use, it is HTML comments !--element_to_replace--) so that the two processes

Re: [PHP] 'Pure' php vs 'mixed' (html + php)

2002-06-02 Thread Michael Davey
Point well-made. I suppose doing it the mixed way might have repercussions later on if/when the site grows. Perhaps while the code is still fresh in my mid, it might be worth the effort to separate it. However, for a good part of the site, I've used CSS for appearance details, and

[PHP] php4win.com

2002-06-03 Thread Michael Davey
I originally posted this to the PHP-WIN list but there doesn't seem to be anyone there... maybe you guys can help? Does anyone know what has happened to the php4win.com web-site? I have been trying to get there now for the best part of a month and still get site errors. regards, Mikey --

Re: [PHP] Printing Large Blocks of Text

2002-06-04 Thread Michael Davey
print END Lots of text in a block END; Jason Wong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tuesday 04 June 2002 17:34, [EMAIL PROTECTED] wrote: What is the best way to print large blocks of text within a PHP function? echo(), print()? Perhaps you