RE: [PHP] why i could not use DB.php?

2004-05-18 Thread Martin Towell
I had a similar error before before. I think php was thinking that the path was '.;d:\php\PEAR' and not two seperate paths (??) What's the include_path line in you php.ini look like? Could there be something to do with that? Martin David wrote: hi I want to use the DB.php to access

[PHP] PHP5 - instanceof

2004-05-12 Thread Martin Towell
I have been playing with PHP5 and am liking it more and more. But I have one question about instanceof If you have something like this: ? class A { } class B extends A { } $x = new B; if ($x instanceof B) echo B; if ($x instanceof A) echo A; ? This would echo BA. That's good, I understand

RE: [PHP] PHP5 - instanceof [SOLVED]

2004-05-12 Thread Martin Towell
strings to work with. I suppose you could search the text of the file for extends FooBar or something. cheers, Travis Martin Towell wrote: I have been playing with PHP5 and am liking it more and more. But I have one question about instanceof If you have something like

RE: [PHP] confused big time

2004-04-06 Thread Martin Towell
um...im not doing selects im doing inserts with variable names... i understand the idea with select but thats not the dealits an insert... i was hoping that wouldn't cause any confusion, but i guess it did. the thing to remember is that a query is a query. you know, parts is

RE: [PHP] Extracting Output from File...

2004-03-30 Thread Martin Towell
You should be able to use any of the file commands. eg. $contents = file(http://www.myserver.com/outputpage.php;); fopen(), etc should all work too. Martin -Original Message- From: Russell P Jones [mailto:[EMAIL PROTECTED] Sent: Wednesday, 31 March 2004 9:25 AM To: [EMAIL

RE: [PHP] Having trouble formatting width using printf() and defa ult spaces

2004-03-30 Thread Martin Towell
spaces in HTML are collapsed to a single space, that why you only see the numbers seperated by a single space. doesn't look like you can use printf() directly to use nbsp; as the space character, however, you can use sprintf() and str_replace() together to do the same effect. Try this: echo

RE: [PHP] Passing by conditional IF statement...why?

2004-03-22 Thread Martin Towell
Ryan Because you are actually getting a result, a result with no records... Might be better to use http://au2.php.net/manual/en/function.mysql-num-rows.php instead Martin -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 March 2004 11:37 AM To: [EMAIL

RE: [PHP] More php Questions about PHP 4.3.4 (cli)

2004-03-11 Thread Martin Towell
I don't think this is the problem... The problem is that oci* functions haven't been compiled. You probably have the ora_* functions though... I haven't compiled PHP myself so someone will have to tell you the right make options to use to compile oci support. HTH Martin -Original

RE: [PHP] Warning: Cannot modify header information - headers alr eady sent by (output sta

2004-03-09 Thread Martin Towell
It's exactly as the error says... You've echo'ed something out before the header statement. Move your database query and header() above all the echos and it should then work. Martin -Original Message- From: Mike Mapsnac [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 March 2004 12:42

RE: [PHP] Why is this happening

2004-03-08 Thread Martin Towell
have you got register_globals turned on or off? Martin -Original Message- From: Bryan Bateman [mailto:[EMAIL PROTECTED] Sent: Tuesday, 9 March 2004 12:25 PM To: [EMAIL PROTECTED] Subject: [PHP] Why is this happening This does not work: require('languages/' . $language . '/' .

RE: [PHP] Back Button produces Parse Error

2004-03-08 Thread Martin Towell
I haven't had anything like this happen to me, but maybe it's not line 52, maybe it's line 51 or 50 that's the problem... HTH Martin -Original Message- From: Jough P [mailto:[EMAIL PROTECTED] Sent: Tuesday, 9 March 2004 12:43 PM To: PHP Subject: [PHP] Back Button produces Parse

RE: [PHP] Link List

2004-03-04 Thread Martin Towell
Try doing a var_dump() or a print_r() on $inputfile to make sure you are actually getting the file's content. HTH Martin -Original Message- From: Lopez, Kaleb (GEAE, Foreign National, CIAT) [mailto:[EMAIL PROTECTED] Sent: Friday, 5 March 2004 12:23 PM To: Phpgen (E-mail) Subject:

RE: [PHP] convert a strtotime date into a text representation of the date

2004-03-03 Thread Martin Towell
hi. i found strtotime and it seems to work but not quite sure if i know how to use it right... here is my code: ?php $time= strtotime(third saturday january 2005); echo date(M/D/YY, $time); ? i wanted it to take the third saturday of next year (2005) and say do this: saturday

RE: [PHP] tmp_dir

2004-02-17 Thread Martin Towell
google is your friend http://www.onlamp.com/pub/a/php/2001/02/15/php_admin.html 5th bottom one.. Martin -Original Message- From: ajay [mailto:[EMAIL PROTECTED] Sent: Wednesday, 18 February 2004 4:20 PM To: [EMAIL PROTECTED] Subject: [PHP] tmp_dir hi! i suppose this is more

RE: [PHP] Algorithm....

2004-02-16 Thread Martin Towell
Hiya, Work out the start array position, keep incrementing by 1 until you find a yes From this you'll know the allowable end times. HTH Martin -Original Message- From: Bob Eldred [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 February 2004 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP]

RE: [PHP] form array

2004-02-11 Thread Martin Towell
Matthew, use $_POST/$_GET/$_REQUEST (depending on your form method) and foreach() eg: foreach($_POST['image'] as $key=$value) { echo $key - $valuebr\n; } Martin -Original Message- From: Matthew Oatham [mailto:[EMAIL PROTECTED] Sent: Thursday, 12 February 2004 11:29 AM

RE: Re[2]: [PHP] HELP: Nested include(...)'s take relative paths not intuitively

2004-02-10 Thread Martin Towell
Hello John, Tuesday, February 10, 2004, 8:20:50 PM, you wrote: JWH include($_CONF['path'] . '/test.php'); This is slightly off-topic, but related to the include() function. What is the given standard regarding when you should or shouldn't use braces on a function. For example:

RE: [PHP] SQL help

2004-02-10 Thread Martin Towell
You'll need to do a left/right outer join. as you didn't say which database you're using, I'll give this back to you to do some reading up on how to do it... HTH Martin -Original Message- From: Marc Greenstock [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 February 2004 1:53 PM To:

RE: [PHP] $PHP_SELF AND INFORMATION.

2004-02-04 Thread Martin Towell
http://au2.php.net/manual/en/function.basename.php Martin -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED] Sent: Thursday, 5 February 2004 11:57 AM To: [EMAIL PROTECTED] Subject: [PHP] $PHP_SELF AND INFORMATION. $_SERVER[PHP_SELF]; returns

RE: [PHP] multi dimension array sort help

2004-02-04 Thread Martin Towell
would usort() be better for this? Martin -Original Message- From: Justin French [mailto:[EMAIL PROTECTED] Sent: Thursday, 5 February 2004 3:33 PM To: php Subject: [PHP] multi dimension array sort help Hi, I've read and re-read array_multisort(), but still can't get a grip

RE: [PHP] VERY URGENT.....

2004-02-01 Thread Martin Towell
Ooo! Ooo! Me, Me! Can I be scammed this time? :/ -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Monday, 2 February 2004 7:02 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] VERY URGENT. GREAT! The last time I went for the millions, my turn is over...so whose

RE: [PHP] comparing dates

2004-02-01 Thread Martin Towell
Is it possible to pull that dates out as unix time stamps? Then all you need to do is subtract one from the other, convert the results to days/hours/minutes and Bob's your uncle. If not, then you'll need to do some string manipulation to get the string into a format that strtotime() understands

RE: [PHP] Help with files

2004-02-01 Thread Martin Towell
Instead of using r+, use w This will clear the file for you :) -Original Message- From: Mr. Austin [mailto:[EMAIL PROTECTED] Sent: Monday, 2 February 2004 1:51 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Help with files I'm not entirely sure why it is that you assume I did not

RE: [PHP] newbie issues with control structures HTML form

2004-01-22 Thread Martin Towell
Looking at the URL: guess.php?guessnumb=21guessnumb=tries=1 I notice that 'guessnumb' is in there twice. PHP will use the last one in that list I notice that in your form, you have two inputs with the same name input type=text name=guessnumb size=5 maxlength=3 / input type=hidden

RE: [PHP] Odd Code Error.

2004-01-21 Thread Martin Towell
[EMAIL PROTECTED] wrote: Ok i found something very interesting , i have a session var setup to check for a groupID which is an integer, if ($_SESSION['groupID']==1) { this was working, then when i changed it to if ($_SESSION['groupID']===1) { per recomendation, it does not now ! i

RE: [PHP] Odd Code Error.

2004-01-20 Thread Martin Towell
I've come across this recently too. I think what's happening is that PHP is converting NFH to an integer, which would be zero in this case. Thus zero == zero is true... Try doing type checking too: if ($EA === NFH) Martin I am so frustrated at the moment with coding. I had an odd

RE: [PHP] multi-table select?

2004-01-14 Thread Martin Towell
This is a basic table join: select * from teams, divisions where teams.divisionID = divisions.divisionID -Original Message- From: Kirk Babb [mailto:[EMAIL PROTECTED] Sent: Thursday, 15 January 2004 9:41 AM To: [EMAIL PROTECTED] Subject: [PHP] multi-table select? I'm looking

RE: [PHP] Re: Sorting data into columns vertically

2004-01-07 Thread Martin Towell
given: $num_cols and $num_items $num_with_extra = $num_items % $num_cols; $num_per_col = floor($num_items / $num_cols); the first $num_with_extra columns has $num_per_col+1 items in it and the rest have $num_per_col items in it (not tested in code, but looks okay in theory...)

RE: [PHP] Looping problem?

2004-01-06 Thread Martin Towell
This is probably more like what you need. I can't see why you'd need to loop through your results using two different methods (while and for) require 'database.php'; $t_02 = subnets; $sql_subs = mysql_query(SELECT * FROM $t_02,$db) or die(mysql_error()); $num = mysql_num_rows($sql_subs); for ($z

RE: [PHP] Why won't this form post session variables?

2003-12-21 Thread Martin Towell
I haven't used sessions before, but it doesn't look like the variables are being put into the session. If they're coming from a form, then they would appear in the $_POST or $HTTP_POST_VARS variables, not the $HTTP_SESSION_VARS variable. HTH Martin -Original Message- From: Dave G

RE: [PHP] $_POST[]

2003-12-18 Thread Martin Towell
It should have quotes, unless you have defined formReviewBy as a constant PHP's nice enough to interpret it as a string if using it as a constant fails, but you should still quote it anyway. Martin ?php if ($_POST[formReviewBy]==Cade Lloyd) { echo selected; } ? Should $_POST[formReviewBy]

RE: [PHP] Starting OOP

2003-12-15 Thread Martin Towell
I would rewrite your class slighly like this: 1. pass $ponum into the class during the constructor 2. since you're passing in $item into each function, no need to have it as an attribute class PurchaseOrder { //Variables var $ponum; //This will be a $_SESSION variable if that matters function

RE: [PHP] Constraint Violation when INSERT

2003-12-09 Thread Martin Towell
Hi all, I got the error Constraint Violation when I did an INSERT . Gone thru the code umpteen times but to no avail..Wondering where my error was??...Below is a snip of the block of code: ? $dsn = mysql://root:[EMAIL

RE: [PHP] Sort Array by date

2003-12-04 Thread Martin Towell
Hiya, I changed your date_file_sort() function so it echos a few things function date_file_sort($a, $b) { echo $a - $b - ; $a = strtotime($a); $b = strtotime($b); echo $a - $b - .date(d-M-Y, $a). - .date(d-M-Y, $b).\n; return strcmp($a, $b); } interesting results Here's

RE: [PHP] Variables scope question

2003-12-03 Thread Martin Towell
This doesn't sound right. It's doesn't behave like this for me. Can you supply an example? Martin -Original Message- From: Mike D [mailto:[EMAIL PROTECTED] Sent: Thursday, 4 December 2003 10:35 AM To: PHP General list Subject: [PHP] Variables scope question Hello, I have

RE: [PHP] Conditional anchor href value

2003-12-02 Thread Martin Towell
you might be able to put the id of the next/prev card as the value of the option and then use javascript to generate the url. the only reliance then would be that the browser as JS enabled, as the above should be possible with the most basic of JS HTH Martin -Original Message- From:

RE: [PHP] Where can i find error log

2003-11-20 Thread Martin Towell
look for this line in your php.ini file error_log = filename but that's only going to help if you have log_errors = On HTH Martin -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Friday, 21 November 2003 12:19 PM To: [EMAIL PROTECTED] Subject: [PHP] Where

RE: [PHP] HTML email problem

2003-11-19 Thread Martin Towell
When I send HTML emails, I don't base64 encode it, I just set the content-type to text/html. The mail clients that I've tested it with renders it correctly HTH Martin I m sendig out HTML email, using mimemail class which encodes the whole message to be sent in base64 and

RE: [PHP] ereg_replace help

2003-11-18 Thread Martin Towell
* Thus wrote Martin Towell ([EMAIL PROTECTED]): Hi All, I have an array of strings in the following format: abcd - rst abcd - uvw abcd - xyz foobar - rst blah - rst googol - uvw What I want to do is strip everything from the - bit of the string

[PHP] ereg_replace help

2003-11-17 Thread Martin Towell
Hi All, I have an array of strings in the following format: abcd - rst abcd - uvw abcd - xyz foobar - rst blah - rst googol - uvw What I want to do is strip everything from the - bit of the string to the end, _but_ only for the strings that don't

RE: [PHP] sorting files by date

2003-11-12 Thread Martin Towell
If the filename has anything to do with the date, then just sort it. MM is numeric and not alphabetic, right? I guess I should do some more testing -- didn't expect sort() would work on dates, but I'll happily go run some tests :) This only really works if your format's /MM/DD

RE: [PHP] How to adpated a javascrip with php...

2003-11-11 Thread Martin Towell
I have a Javascript that I like to use with PHP/MYSQL, But I don't know how to mix the two... SCRIPT LANGUAGE = JavaScript bName = navigator.appName; bVer = parseInt(navigator.appVersion); if ((bName == Netscape bVer = 3) || (bName == Microsoft Internet Explorer bVer

RE: [PHP] sorting files by date

2003-11-11 Thread Martin Towell
surely sort() would do the trick? Martin -Original Message- From: Justin French [mailto:[EMAIL PROTECTED] Sent: Wednesday, 12 November 2003 12:13 PM To: php Subject: [PHP] sorting files by date Hi, I have a dir of files saved in the following format: -MM-DD.mp4. I

RE: [PHP] Trouble sending an image's contents as output using hea der Content-Type...

2003-11-09 Thread Martin Towell
Maybe there's an error with _generateThumbnail() ? Do you know for certain that _generateThumbnail() works okay ? Martin -Original Message- Hi all: I have a page with a img tag: img src=/getthumbnail.php?fileid=12230983 The script getthumbnail.php searchs for a thumbnail of the

RE: [PHP] Ive lost a zero somewhere

2003-11-05 Thread Martin Towell
number_format or (s)printf -Original Message- From: Richard Cook [mailto:[EMAIL PROTECTED] Sent: Thursday, 6 November 2003 2:04 PM To: [EMAIL PROTECTED] Subject: [PHP] Ive lost a zero somewhere I have a problem with the following when i multiply for example 25 . 50 * 3 i get 76 . 5 how

RE: [PHP] drop menu last entry

2003-11-04 Thread Martin Towell
Hi Juan, I think some sort of look up file or database table based on the computer's IP address would probably be the easiest method. Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 5 November 2003 9:49 AM To: [EMAIL PROTECTED] Subject: [PHP]

RE: [PHP] text input truncated

2003-11-04 Thread Martin Towell
Put quotes around all the values, like: echo forminput type='test' size='25' value='$xyz'/form; Martin -Original Message- From: Jay Frumkin [mailto:[EMAIL PROTECTED] Sent: Wednesday, 5 November 2003 10:28 AM To: '[EMAIL PROTECTED]' Subject: [PHP] text input truncated Hi all, I am

RE: [PHP] Image resize with background.

2003-11-02 Thread Martin Towell
try the resize copy function (can't remember the exact name ATM) Set the destination's first colour to the desired background colour, then copy/resize the image to it. Martin -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Monday, 3 November 2003 12:36 PM To: [EMAIL

RE: [PHP] conditional within SELECT

2003-10-29 Thread Martin Towell
Try something like this: $sql = SELECT robeson_inv.manufacturer, robeson_inv.model,; $sql .= robeson_inv.specs, robeson_inv.qty, robeson_inv.ID; $sql .= FROM robeson_inv; $sql .= WHERE robeson_inv.manufacturer = 'vManufacturer'; if ($vKeywords) $sql .= AND MATCH (robeson_inv.specs) AGAINST

RE: [PHP] Shortening a String

2003-10-28 Thread Martin Towell
substr($str, 0, 200); or an (untested) ereg ereg((.{200}[^ ]*), $str, $bits); HTH Martin -Original Message- From: Jason Williard [mailto:[EMAIL PROTECTED] Sent: Wednesday, 29 October 2003 1:53 PM To: [EMAIL PROTECTED] Subject: [PHP] Shortening a String I would like to display part of

RE: [PHP] if and like together?

2003-10-26 Thread Martin Towell
strstr() and it's variants ereg() if you need more logic Martin -Original Message- From: Tim Thorburn [mailto:[EMAIL PROTECTED] Sent: Monday, 27 October 2003 12:13 PM To: [EMAIL PROTECTED] Subject: [PHP] if and like together? Hi, Is there an IF LIKE statement in PHP? I've got a

RE: [PHP] problem in 2 dimensional Array

2003-10-23 Thread Martin Towell
Dear Members i have 2 problems in 2 dimensional array 1. how to declare global 2 dimensional array in php 2. how to pass 2 dimensional array in function as an arrgument waiting for ur soon reply Khuram Noman 1. $myvar = array(); $myvar[0] = array(); $myvar[0][0] = myval;

RE: [PHP] PHP JavaScript

2003-10-22 Thread Martin Towell
Hi everybody! Have somebody any idea how I could do something like that? ? settype($phpScreenWidth, string); settype($phpScreenHeight, string); ? script language=javascript var phpScreenWidth, phpScreenHight;

RE: [PHP] Age from birthdate?

2003-10-22 Thread Martin Towell
* Thus wrote Ashley M. Kirchner ([EMAIL PROTECTED]): Curt Zirzow wrote: I do wonder what the rule for those born on Feb 29'th. Do they celebrate they're birthday before or after it on non leap years? Neither. They celebrate it on Feb 29th. So while we age every year,

RE: [PHP] Php and Fortune

2003-10-22 Thread Martin Towell
Chuck PUP Payne wrote: Hi, Is there a way I can get php to call the program fortune then print that a web page. Thanks. Payne echo 'pre'; passthru(fortune); echo '/pre'; Should do it. I use this for a nice little Server Status page that iterates through an array

RE: [PHP] Re: OFF-SHORE PHP /or Perl Developer + MySQL /or Post greSQL

2003-10-09 Thread Martin Towell
What?! Even sweatshop workers earn more than that! -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Friday, 10 October 2003 1:28 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: OFF-SHORE PHP /or Perl Developer + MySQL /or PostgreSQL Thought y'all might get a kick out of

RE: [PHP] Maybe a silly question

2003-10-09 Thread Martin Towell
It's used on objects. In the examples below, $test_url and $test_this are both properties of an object ($test) have a bit of a read of this: http://php.net/manual/en/language.oop.php HAND Martin -Original Message- From: Tom Ray [Lists] [mailto:[EMAIL PROTECTED] Sent: Friday, 10

RE: [PHP] do I need a database

2003-10-07 Thread Martin Towell
Hi Sudheer, Depends on what you want to do with the data afterwards. Maybe a flat file would be enough? Martin -Original Message- From: Sudheer Palaparambil [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 October 2003 2:50 PM To: [EMAIL PROTECTED] Subject: [PHP] do I need a database Hi,

RE: [PHP] ImageColorAllocate() Problem

2003-10-03 Thread Martin Towell
I think it might be because you're passing a string to the function instead of a hex value... try changing it to this and see if it works $color = ImageColorAllocate($im, hexdec($hex1), hexdec($hex2), hexdec($hex3)); HTH Martin -Original Message- From: Jed R. Brubaker [mailto:[EMAIL

RE: [PHP] FLOAT

2003-10-02 Thread Martin Towell
http://php.net/number_format -Original Message- From: Dale Hersh [mailto:[EMAIL PROTECTED] Sent: Friday, 3 October 2003 10:27 AM To: [EMAIL PROTECTED] Subject: [PHP] FLOAT Hi. I have a question regarding how to manipulate numbers in php. I am currently storing some values as type float

RE: [PHP] date brain teaser

2003-10-02 Thread Martin Towell
How about something similar, but look for the first Friday and then add seven days (or 604800 seconds) to get the date of the next Friday? -Original Message- From: J Morton [mailto:[EMAIL PROTECTED] Sent: Friday, 3 October 2003 11:20 AM To: Shew; [EMAIL PROTECTED] Subject: Re: [PHP] date

RE: [PHP] File question

2003-10-01 Thread Martin Towell
Try something like this (quick and dirty...) $file_array = file(list.txt); $myarray = explode(,, $file_array[0]); HTH Martin -Original Message- From: ketvin [mailto:[EMAIL PROTECTED] Sent: Wednesday, 1 October 2003 5:05 PM To: [EMAIL PROTECTED] Subject: [PHP] File question Dear

RE: [PHP] Show index.php instead of index.html

2003-10-01 Thread Martin Towell
Hi It depends on the web server you're using... Martin -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Thursday, 2 October 2003 12:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Show index.php instead of index.html Hi, I just deleted my index.html page because i want to

RE: [PHP] Initial Value for Input Box

2003-09-30 Thread Martin Towell
Hiya, Replace with quot; Martin -Original Message- From: Cristian Lavaque [mailto:[EMAIL PROTECTED] Sent: Tuesday, 30 September 2003 5:09 PM To: [PHP] Subject: Re: [PHP] Initial Value for Input Box Matt Palermo wrote: I have a form that a user can fill out. In the text input field

RE: [PHP] Q on Class, inhertance, ec... (a bit long)

2003-09-25 Thread Martin Towell
What about something like this? (actual code not tested, but concept has...) class FOO { function Fred() { echo Fred in FOO; } } class BAR { function Fred() { echo Fred in BAR; } } class BAZ { var $subclass; function BAZ($num) { if ($num == 1) $this-subclass = new FOO(); if

RE: [PHP] webhost --0T--

2003-09-17 Thread Martin Towell
[snip] /* HTH HAND */ Meant to ask you this before...whats HAND? [/snip] Looks like noone's replied to this question, it's: Have A Nice Day... HTH Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Strange error

2003-09-16 Thread Martin Towell
Hi Odd - I copy/paste the code below and run it against windows version of php4.0.6 and it's okay Maybe you've got a hidden char there somewhere? Martin -Original Message- From: Sid [mailto:[EMAIL PROTECTED] Sent: Wednesday, 17 September 2003 5:39 AM To: [EMAIL PROTECTED] Subject:

RE: [PHP] Control Structure problem

2003-09-16 Thread Martin Towell
are you thinking of default: ? -Original Message- From: Luke Skywalker [mailto:[EMAIL PROTECTED] Sent: Wednesday, 17 September 2003 10:51 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Control Structure problem yeah, i really like using cases they work well and especially if you want to do

RE: [PHP] Re: IS THIS A BUG?

2003-08-28 Thread Martin Towell
And also for class names $foo = bar; $blah = new $foo(); $blah would be a new instance of the class bar I've actually used the above, but it was a special case.. I wouldn't normally use it. -Original Message- From: DvDmanDT [mailto:[EMAIL PROTECTED] Sent: Thursday, 28 August 2003 8:58

RE: [PHP] PHP Interview questions

2003-08-27 Thread Martin Towell
Just to throw a spanner (where'd that come from, that wasn't part of the question) into the works... What is the state of the light bulb before the test? If it's on and it's connected to switch #1, then the logic below would result in switch #2 being displayed... (maybe.., I don't know how long

[PHP] mb_send_mail displays boundary marker

2003-08-26 Thread Martin Towell
, $headers)) This is the contents of $headers - START - X-Mailer: SEE-IT's PHP email_class (c)2001 Mime-Version: 1.0 Subject: Saturday Lotto - 2003-08-02 - $19m Sensitivity: normal Importance: normal X-Message-Flag: Reply-By: Expiry-Date: To: Martin Towell [EMAIL PROTECTED] From: Martin Towell

RE: [PHP] unexpected date results

2003-08-20 Thread Martin Towell
The reason for the difference is due to the timezone bit (or whatever it's called..) Note the +1000 in this line time = Thu, 21 Aug 2003 15:28:36 +1000 and the + in this line time = Thu, 21 Aug 2003 05:28:42 + so both are actually the same times (bar a few seconds..) But

RE: [PHP] window.open(hai.php?id=one);

2003-08-19 Thread Martin Towell
: Tuesday, 19 August 2003 4:14 PM To: Martin Towell; [EMAIL PROTECTED] Subject: Re: [PHP] window.open(hai.php?id=one); I have made the value hidden. How can I retrieve it in the next page in php. -murugesan - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'murugesan' [EMAIL

RE: [PHP] If you ever had a Vic20

2003-08-18 Thread Martin Towell
[snip] $found = 0; while ($mydata = mysql_fetch_object($news)) { if ($mydata-StudentId == $StudentId) {$found = 1; break;} } if ($found==1){do this}else{do that} [/snip] Why two if's? Isn't if the student is found in

RE: [PHP] window.open(hai.php?id=one);

2003-08-18 Thread Martin Towell
Hiya, 1. Turn off the address bar or 2. Create a form with hidden elements, with method=post open a window to a blank page, and name the window submit the form to the newly, named, window HTH Martin -Original Message- From: murugesan [mailto:[EMAIL PROTECTED] Sent:

RE: [PHP] If you ever had a Vic20

2003-08-15 Thread Martin Towell
What about (just a slight change...)? $found = 0; while ($mydata = mysql_fetch_object($news)) { if ($mydata-StudentId == $StudentId) {$found = 1; break;} } if ($found==1){do this}else{do that} at least this way you

RE: [PHP] Calling to a page without having to load it

2003-08-14 Thread Martin Towell
You could use a hidden image Or use an external javascript file that's really the php file HTH Martin -Original Message- From: Creative Solutions New Media [mailto:[EMAIL PROTECTED] Sent: Friday, 8 August 2003 1:51 PM To: [EMAIL PROTECTED] Subject: [PHP] Calling to a page without having

[PHP] error: cannot redeclare ()

2003-08-14 Thread Martin Towell
I'm getting the following error: PHP Fatal error: Cannot redeclare () (previously declared in /path/to/file/functions.inc:19) in /path/to/file/functions.inc on line 0 Anyone have any ideas how a no-name function could be generated? Line 19 contains: function

RE: [PHP] Still can't pass variable through url

2003-08-10 Thread Martin Towell
See if changing it to page.php?year=$yearmonth=$month works The separator between the page and the query string is ? The separator between each key/value pair is just -Original Message- From: Jack [mailto:[EMAIL PROTECTED] Sent: Friday, 8 August 2003 4:30 PM To: [EMAIL

RE: [PHP] Still can't pass variable through url

2003-08-08 Thread Martin Towell
:47 AM To: Martin Towell Cc: 'Jack'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Still can't pass variable through url actually, you might want to urlencode it. ok, so i doubt that you would need url encoding for $year and $month, but I'm sure you will playing with more

RE: [PHP] postmaster@hanmir.com

2003-08-08 Thread Martin Towell
Yep - I did with me previous email And I guess I'll get one with this email too :/ -Original Message- From: Joe Harman [mailto:[EMAIL PROTECTED] Sent: Thursday, 7 August 2003 4:43 PM To: [EMAIL PROTECTED] Subject: [PHP] [EMAIL PROTECTED] Hey is every one getting a returned message from

RE: [PHP] error: cannot redeclare ()

2003-08-07 Thread Martin Towell
thnx - I'll see if this help.. -Original Message- From: Joe Harman [mailto:[EMAIL PROTECTED] Sent: Thursday, 7 August 2003 4:38 PM To: 'Martin Towell'; [EMAIL PROTECTED] Subject: RE: [PHP] error: cannot redeclare () Hi Martin... I am guessing you have a nested function that is being

RE: [PHP] Strip Numbers

2003-07-30 Thread Martin Towell
You could use two substr()s or an ereg_replace() $result = substr($str, 0, 2) . substr($str, 5); or $result = ereg_replace(([0-9][0-9])990([0-9][0-9]), \\1\\2, $str); Both are not tested, but should work Martin -Original Message- From: Joe Harman [mailto:[EMAIL

RE: [PHP] do i need to output headers on parsed CSS files?

2003-07-23 Thread Martin Towell
If I remember correctly, it'd be header(Content-Type: text/css); HTH Martin -Original Message- From: Justin French [mailto:[EMAIL PROTECTED] Sent: Thursday, 24 July 2003 12:42 PM To: php Subject: [PHP] do i need to output headers on parsed CSS files? Hi all, I'm forcing my style

RE: [PHP] Object assignment

2003-07-08 Thread Martin Towell
Since I can't see the source for append_child(), I'll assume you're using the $key as the index?? If so, try changing it to just a numeric index, ie, 0, 1, 2, etc. HTH Martin -Original Message- From: Matt Grimm [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 July 2003 10:38 AM To: [EMAIL

RE: [PHP] how to force variables declaration??

2003-07-08 Thread Martin Towell
change your error reporting level to E_ALL You'll then get a warning|notice (can't remember which) -Original Message- From: mack paul [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 July 2003 11:10 AM To: [EMAIL PROTECTED] Subject: [PHP] how to force variables declaration?? hi to all. i

RE: [PHP] Calculating if number is multiple of another number

2003-07-02 Thread Martin Towell
($spacer % $number == 0) Martin -Original Message- From: jwulff [mailto:[EMAIL PROTECTED] Sent: Thursday, 3 July 2003 11:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Calculating if number is multiple of another number How would I calculate if a $number is a multiple of $spacer? -- PHP

[PHP] PHP5 classes

2003-07-02 Thread Martin Towell
I've just been playing around with PHP5 beta for windows to get used to the new way it does classes and constuctors, etc, and have found the following... I have a base class which has both a constructor and a destructor. I have a second class that extends the first. I then instantiate the second

RE: [PHP] Month name

2003-06-25 Thread Martin Towell
date(F, mktime(0, 0, 0, $mm, $dd, $)); http://au2.php.net/manual/en/function.date.php http://au2.php.net/manual/en/function.mktime.php -Original Message- From: cavagnaro [mailto:[EMAIL PROTECTED] Sent: Wednesday, 25 June 2003 4:31 PM To: [EMAIL PROTECTED] Subject: [PHP] Month name

RE: [PHP] pdf routine - good local / bad online

2003-06-25 Thread Martin Towell
Is the pdf module being loaded on the linux machine ? What is the error message (if any) that's displayed at the create handle bit ? Martin -Original Message- From: Floyd Baker [mailto:[EMAIL PROTECTED] Sent: Thursday, 26 June 2003 10:32 AM To: [EMAIL PROTECTED] Subject: [PHP] pdf

RE: [PHP] Converting Array

2003-06-25 Thread Martin Towell
what about (untested)? $example_data = array(); foreach ($blah_array as $key=$value) { $example_data[] = array($key, $value); } -Original Message- From: John Wulff [mailto:[EMAIL PROTECTED] Sent: Thursday, 26 June 2003 11:37 AM To: [EMAIL PROTECTED] Subject: [PHP] Converting Array

RE: [PHP] Can't pass query string from HTML to PHP

2003-06-20 Thread Martin Towell
check your php.ini file to see if you have register_globals set to on or off (probably off) You can either turn it on or use $_GET[name] -Original Message- From: Robby Ku [mailto:[EMAIL PROTECTED] Sent: Friday, 20 June 2003 4:06 PM To: [EMAIL PROTECTED] Subject: [PHP] Can't pass query

RE: [PHP] String containing PHP Code

2003-06-16 Thread Martin Towell
you can use exec() but be sure that the code you're executing is not malicious first -Original Message- From: Suhas Pharkute [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 June 2003 9:46 AM To: [EMAIL PROTECTED] Subject: [PHP] String containing PHP Code Hello, I have a php script

RE: [PHP] String containing PHP Code

2003-06-16 Thread Martin Towell
oops - yeah, not exec() as in my previous email - sorry about that :/ -Original Message- From: Steve Keller [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 June 2003 10:06 AM To: Suhas Pharkute; [EMAIL PROTECTED] Subject: Re: [PHP] String containing PHP Code At 6/16/2003 05:45 PM, Suhas

RE: [PHP] delete lines from text file

2003-06-05 Thread Martin Towell
I think you'll have to read the file manually (file() would prob be the best bet) and manually find/delete the line and then rewrite the file. Martin -Original Message- From: Matt Palermo [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 1:54 PM To: [EMAIL PROTECTED] Subject: [PHP]

RE: [PHP] using a for loop but it is not working how come

2003-06-05 Thread Martin Towell
try changing $numbers = array($numbers); to $numbers = explode(,, $numbers); HTH Martin -Original Message- From: Richard Kurth [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 2:42 PM To: [EMAIL PROTECTED] Subject: [PHP] using a for loop but it is not working how come

RE: [PHP] Why this script doesn't work?

2003-03-27 Thread Martin Towell
have you got register_globals turn on or off ? -Original Message- From: J. P. [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 5:26 AM To: [EMAIL PROTECTED] Subject: [PHP] Why this script doesn't work? I'm using Apache 2.0.44 with Win XP and PHP version 4.3.1! -- PHP General

RE: [PHP] sript doesn't work

2003-03-27 Thread Martin Towell
same question as before: have you got register_globals turn on or off ? -Original Message- From: J. P. [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 10:57 AM To: [EMAIL PROTECTED] Subject: [PHP] sript doesn't work Hello! I am using Apache 2.0.44 and WinXP. I have PHP 4.3.1.

RE: [PHP] date math question

2003-03-27 Thread Martin Towell
I think there's problems doing that when daylight savings starts/ends Just something to keep in mind... -Original Message- From: Leo Spalteholz [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 4:32 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] date math question On March 27, 2003

RE: [PHP] Zero Fill - Number Format

2003-03-20 Thread Martin Towell
oops, sorry - try this instead sprintf/printf(%07d, $num) -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 8:23 AM To: Martin Towell; Harry.de; [EMAIL PROTECTED] Subject: RE: [PHP] Zero Fill - Number Format wouldn't this just print empty spaces

  1   2   3   4   5   6   7   >