RE: [PHP] Easy Function Question?

2002-09-10 Thread Martin Towell
ld be null, "", or "foobar", it doesn't matter, $zip will = $var3 Martin -Original Message- From: Shane [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 11, 2002 10:22 AM To: Martin Towell; [EMAIL PROTECTED] Subject: RE: [PHP] Easy Function Question? Martin, so

RE: [PHP] frame

2002-09-11 Thread Martin Towell
this is more of an HTML question. You'll probably be wanting to look at and -Original Message- From: dinnie [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 12:59 PM To: Milist PHP Subject: [PHP] frame hi all, sorry for disturb all of u for a while... there's anyone can

RE: [PHP] XML Parser Question

2002-09-11 Thread Martin Towell
could you change the "<" to "<" or "%3C" or something similar? -Original Message- From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 1:59 PM To: [EMAIL PROTECTED] Subject: [PHP] XML Parser Question I've been reading the XML parser documention, and I'm no

RE: [PHP] Using HTTP Referer

2002-09-11 Thread Martin Towell
set a hidden form element to be the referring page url, then use that to redirect the user eg: then use: header("location: $myReferer"); remember, also, that $_SERVER['HTTP_REFERER'] is not always set, so you'll need to cater for that Martin -Original Message- From: Jiaqing Wang [mail

RE: [PHP] how can I return several query results per table row?

2002-09-11 Thread Martin Towell
basing my code on yours: $i = 0; $cols = 3; while (list($FirstName, $LastName) = mysql_fetch_row($result)) { if ($i % $cols == 0) echo ""; echo "$FirstName $LastName"; if ($i % $cols == $cols - 1) echo ""; $i++; } // clean up table... if

RE: [PHP] Query result to an array

2002-09-11 Thread Martin Towell
I'm not totally familiar with mySql, but if I remember correctly, you can get each row (one at a time) back as an (1D) array. All you need to do is append that array onto the end of your dataset array and, bob's your uncle, you have a 2D array full with your dataset HTH Martin -Original Mess

RE: [PHP] Query result to an array

2002-09-11 Thread Martin Towell
> > $result = mysql_query(...); > while( $t = mysql_fetch_row($result) ){ > $array[] = $t; > } > > No. I need a 2 dimensions arrays, each line of this array, is the result > of one row of the query and each cell of this row is a field from the > select. > > Example, the query return

RE: [PHP] frame

2002-09-11 Thread Martin Towell
it if use html but how bout command swf_setframe(void) or swf_getframe(void) ??? -Original Message----- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 11:02 AM To: '[EMAIL PROTECTED]'; Milist PHP Subject: RE: [PHP] frame this is more of an H

RE: [PHP] Re: Random numbers in a cronned script?

2002-09-13 Thread Martin Towell
if you seed it with unix time then you'll alway be seeding with something different in most cases, the random numbers that are generated will be random enough just my AU2c worth Martin -Original Message- From: lallous [mailto:[EMAIL PROTECTED]] Sent: Friday, September 13, 2002 6:51 PM To

RE: [PHP] Unserialize stopped working after php & db upgrade

2002-09-18 Thread Martin Towell
If you've seen a serialised variable a few times, you get to know how one is set up and how to interpret it. If you're using serialised variables, I'd suggest serialising a few simple ones and see what the output looks like so that you can see when things are going amiss. This is one way that I d

RE: [PHP] Installing php in windows 95

2002-09-24 Thread Martin Towell
I was running PHP on Win95 (for local stuff) and now Win98, using OmniHTTPd for the server. It works great. I've recently upgraded to XP Pro (I know - it's taken me ages, but what the heck) and it's still working great. -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]]

RE: [PHP] error notice - valid code

2002-09-30 Thread Martin Towell
This is what you're really after - quoting the index -Original Message- From: Pablo Oliva [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 01, 2002 1:03 PM To: [EMAIL PROTECTED] Subject: [PHP] error notice - valid code Notice: Use of undefined constant year - assumed 'year' in c:\ap

RE: [PHP] How to send POST info without a form?

2002-10-01 Thread Martin Towell
from the client end, you can't from the server end, you can use curl. HTH Martin -Original Message- From: Chris Nielsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 3:09 PM To: [EMAIL PROTECTED] Subject: [PHP] How to send POST info without a form? I have a single php fil

RE: [PHP] Inheritance Question

2002-10-08 Thread Martin Towell
If you need to use variables that are stored in the object, then use $this->jk(); If you're calling bar::do_something(); then $this wont be set, so you'll need to use foo::jk() instead. If you're calling jk() from an object, and you don't need to use any object attributes, then either way would

RE: [PHP] Decimal Places

2002-10-29 Thread Martin Towell
have a look at number_format() -Original Message- From: Andrew Wilson [mailto:will@;netwaynetworks.com.au] Sent: Wednesday, October 30, 2002 3:34 PM To: [EMAIL PROTECTED] Subject: [PHP] Decimal Places Hay guys, I have two variables ( integers ) that are being minused one from the other

RE: [PHP] number_format question

2002-10-31 Thread Martin Towell
what about str_replace(",", "", $str) before you pass the value to number_format()? -Original Message- From: [EMAIL PROTECTED] [mailto:ed@;home.homes2see.com] Sent: Friday, November 01, 2002 9:37 AM To: Jay Blanchard Cc: [EMAIL PROTECTED] Subject: RE: [PHP] number_format question Tried

RE: [PHP] function()

2002-11-05 Thread Martin Towell
FYI: 'global' is two way eg: will work. -Original Message- From: Justin French [mailto:justin@;indent.com.au] Sent: Wednesday, November 06, 2002 11:49 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] function() Doesn't 'global' only get variables from outside the function into it OP (

RE: [PHP] problem of javascript with dropdown list of array.

2002-11-05 Thread Martin Towell
you can refer to form elements by: document.forms["formname"].elements["elementname"] so you could use: document.forms["entryform"].elements["select02[]"] -Original Message- From: Mack [mailto:mplescano2000@;yahoo.com] Sent: Tuesday, November 05, 2002 12:30 AM To: [EMAIL PROTECTED] Subject

RE: [PHP] Code help

2002-11-06 Thread Martin Towell
CAUTION: It's not reliable you can use $HTTP_REFERER (or, I think's it's under $_SERVER, $_SERVER["HTTP_REFERER"]) -Original Message- From: William Holroyd [mailto:w.holroyd@;versity-cobalt.com] Sent: Thursday, November 07, 2002 12:42 PM To: [EMAIL PROTECTED] Subject: [PHP] Code help I

RE: [PHP] How to limit chars?

2002-11-07 Thread Martin Towell
use substr($str, 0, 1000) -Original Message- From: Håkan [mailto:hw2k@;barrysworld.com] Sent: Friday, November 08, 2002 12:53 PM To: [EMAIL PROTECTED] Subject: [PHP] How to limit chars? Let's say I have a text field in my mysql database, and a where I write whatever, and I want to limit

RE: [PHP] Graphics question

2002-11-07 Thread Martin Towell
sounds like a browser caching problem to me dunno if that helps though :/ -Original Message- From: Robbert van Andel [mailto:robbert@;vafam.com] Sent: Friday, November 08, 2002 2:30 PM To: [EMAIL PROTECTED] Subject: [PHP] Graphics question I have created a webpage that builds a table and

RE: [PHP] Weird behaviour with references to objects...

2002-11-07 Thread Martin Towell
I remember reading somewhere (can't remember where though, maybe the php.net web site??) that if you use $this in a constructor (or any methods the constuctor calls), then you should instantiate the object using &new otherwise you get a copy of the object that's just been created and not the actual

[PHP] Quick question

2002-11-07 Thread Martin Towell
what is the technical difference between using else if and elseif ?? Are they interpretted the same internally? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How To Delete All Files In A Directory

2002-11-12 Thread Martin Towell
you could break out into the shell and do rm $dir/*(rm -r $dir/* if there's directories too) (or del $dir/*.* for dos) or use opendir, readdir, closedir to read the directory's content and use unlink to delete the file(s) (if $dir is not hardcoded, I can see a security hole he

RE: [PHP] number format

2002-11-13 Thread Martin Towell
you've got it in the subject line http://www.php.net/manual/en/function.number-format.php -Original Message- From: Michael P. Carel [mailto:mikecarel@;teamglac.com] Sent: Thursday, November 14, 2002 9:11 AM To: [EMAIL PROTECTED] Subject: [PHP] number format Hi to all; Is there any php f

RE: [PHP] can a popup window get the page referer?

2002-11-13 Thread Martin Towell
> (B>Message-ID: <[EMAIL PROTECTED]> (B>References: <[EMAIL PROTECTED]> (B> (B>"Joseph Szobody" <[EMAIL PROTECTED]> wrote: (B>>Actually, it still won't work under Windows. (B>> Even on a pop-up window, you can right click, (B>> view properties, copy the page address, open (B>> a new browse

RE: [PHP] resolution

2002-06-04 Thread Martin Towell
I think this was asked recently by someone else You need to use javascript/vbscript to grab the dimensions then pass it to php php is server side and doesn't know anything about the client unless it's told about it HTH Martin -Original Message- From: Doron [mailto:[EMAIL PROTECTED]] Sent

RE: [PHP] Creating pop-up window and passing variable to it?

2002-06-04 Thread Martin Towell
function myopen() { window.open("foobar.html?var1=&var2="); } click for new window -Original Message- From: Igor Portnoy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:52 AM To: [EMAIL PROTECTED] Subject: [PHP] Creating pop-up window and passing

RE: RE: [PHP] Creating pop-up window and passing variable to it?

2002-06-04 Thread Martin Towell
quot; for "_blank" and get the same effect. HTH Jason Soza ----- Original Message - From: Martin Towell <[EMAIL PROTECTED]> Date: Tuesday, June 4, 2002 3:55 pm Subject: RE: [PHP] Creating pop-up window and passing variable to it? > > function myopen() > { >

RE: [PHP] Converting non latin characters

2002-06-04 Thread Martin Towell
'ð' is an accented 'o' - just like these are: 'ò', 'ó', 'ô', 'õ', 'ö' I've never seen an 'o' accented that why before, so I have no idea how you're meant to pronounce it. But going from "Tokyo" then I guess it's pronounced "oe" as in "toe" I dunno what function (built-in or otherwise) you can us

RE: [PHP] Automatic color coded HTML

2002-06-05 Thread Martin Towell
highlight_file() or something like that -Original Message- From: Jarrad Kabral [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 11:55 AM To: Php-General (E-mail) Subject: [PHP] Automatic color coded HTML Hi All, Is a command in PHP to format source code as color coded HTML?

RE: [PHP] Automatic color coded HTML

2002-06-05 Thread Martin Towell
ROTECTED]] > Sent: Wednesday, June 05, 2002 10:14 PM > To: Php-General (E-mail) > Subject: RE: [PHP] Automatic color coded HTML > > yeah that would be niceis it configurable at all? > > > > -Original Message----- > From: John Holmes [mailto:[EMAIL PROTECTED]]

RE: [PHP] Modifying the sort order of a query

2002-06-05 Thread Martin Towell
isn't this just a matter of doing order by country, whatever ?? -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 1:02 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Modifying the sort order of a query I still really don't u

RE: [PHP] carrying a query string

2002-06-05 Thread Martin Towell
try it and see if it doesn't work, try using base64_encode() and base64_decode() after all, you're not encrypting the string, just making sure the script handles it okay, ay? -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 3:21 PM To: php Su

RE: [PHP] return array

2002-06-06 Thread Martin Towell
that seems odd I've got a function that returns an array something like you had in your example. eg function blah() { return array("C"=>3,"D"=>9,"M"=>1); } $arr = blah(); then doing echo $arr["C"] output's 3 -Original Message- From: Jule Slootbeek [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP] Files

2002-06-06 Thread Martin Towell
if the file's not too long, you could use file() to read the file into memory, then loop through the array you get back and look for the line(s) you're after. if you don't want to read the entire file into memory, you can loop through the file with: $f = fopen($file, "r") or die("can't open file

RE: [PHP] URL / slash reduction

2002-06-10 Thread Martin Towell
There's probably a single reg.ex. you could use, but I'm too lazy to figure that one out. But try this instead (not tested though) $str = "http://www.tuned-belgium.com/user/?id=/junni"; $tmp = explode("?", $str); $tmp[1] = str_replace("/", "", $tmp[1]; $str = implode("?", $tmp); -Original M

RE: [PHP] URL / slash reduction

2002-06-10 Thread Martin Towell
it's because you've got single quotes inside single quotes... change $_GET['id'] to $_GET[id] -Original Message- From: X-power.be [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 10:04 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] URL / slash reduction the nickname 'junni' was an

RE: [PHP] Re: Arrays

2002-06-10 Thread Martin Towell
use ".=" instead of "=" $echo .= "". $name .""; (remember to initialise $echo = "" somewhere first just in case is contains something from elsewhere) -Original Message- From: Dan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 11:36 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: A

RE: [PHP] Adding zeros in front

2002-06-10 Thread Martin Towell
$num2 = sprintf("%4d", $num); the "d" might have to be something else, can't remember -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 1:20 PM To: César L. Aracena; PHP General List Subject: Re: [PHP] Adding zeros in front I think certain t

RE: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Martin Towell
if that's a direct copy of what you've got, then the parse error's probably to do with the "var" and not the "include_once" "var" is used only in classes... -Original Message- From: Henry [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 11:11 PM To: [EMAIL PROTECTED] Subject: Re:

RE: [PHP] GOTO command. Doest it exist?

2002-06-11 Thread Martin Towell
I've found that any language that supports "while", "do/while", "for" and "if/else" as well as functions/subroutines doesn't need "goto". IMO, you should be able to do code using just those basic elements (sequence, loops, conditions -> basic flowchart "commands") just my 2c worth -Original

RE: [PHP] GOTO command. Doest it exist?

2002-06-11 Thread Martin Towell
functions are evolved version of gosub/call - not goto w/ goto, there's no way of returning back to where you came from, unless you use another goto -Original Message- From: hugh danaher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 10:52 AM To: php Subject: Fw: [PHP] GOTO com

RE: [PHP] GOTO command. Doest it exist?

2002-06-11 Thread Martin Towell
FYI: c and c++ do have goto -Original Message- From: JSheble [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 3:29 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] GOTO command. Doest it exist? I sure hope I'm not going to stir up any trouble, but why exactly would you need a GOTO

RE: [PHP] Querying for MAX

2002-06-12 Thread Martin Towell
what's you're after is select max(id) from table -Original Message- From: David Freeman [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 9:36 AM To: 'PHP General List' Subject: RE: [PHP] Querying for MAX > What I'm trying to do here is not inside PHP nor MySQL books > I hav

RE: [PHP] Varible Varibles

2002-06-12 Thread Martin Towell
well, the first method is the same as saying $a = "foo"; $foo = "bar"; echo "$a $foo"; whereas the second method is appending "bar" to $a (thus making it "foobar") In first method, you get two variables, the second, just one -Original Message- From: Peter [mailto:[EMAIL PROTECTED]] Sent

RE: [PHP] Dynamic Arrays

2002-06-12 Thread Martin Towell
If you want to use an array for you form, then here's one method on you form page * * ... on you script page \n"; ?> I haven't tested it though. Maybe you could use array_diff() ??? -Original Message- From: Tom Ray [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 12:48 PM To

[PHP] converting C to PHP

2002-06-12 Thread Martin Towell
I'm converting some C functions to PHP and have come across this: int skipf(..., char *format) { /* ... */ cp = format; char *cp, *cp2; multiplier = strtol(cp, &cp2, 10); /* ... */ } How can I implement this line in PHP ? multiplier = strtol(cp, &cp2, 10); Oh, and an example of fo

RE: [PHP] beginner in PHP

2002-06-12 Thread Martin Towell
send the results of putting these two line just before your while loop print_r($mycart); print_r($catalog); -Original Message- From: Phillip Perry [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 1:31 PM To: Tom Rogers; Php Subject: RE: [PHP] beginner in PHP Thanks, but that did

RE: [PHP] beginner in PHP

2002-06-12 Thread Martin Towell
Ah! $catalog is a 2D array - any your if statement is expecting a 1D array... -Original Message- From: Phillip Perry [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 1:52 PM To: Tom Rogers; Php Subject: RE: [PHP] beginner in PHP I meant Martin :) sorry. -Original Message---

RE: [PHP] beginner in PHP

2002-06-12 Thread Martin Towell
here's the revised loop $cat_cnt = count($catalog); while (list($key,$value) = each($mycart)) { for ($j = 0; $j < $cat_cnt; $j++) if ($value == $catalog[$j]["itemcd"]) { echo $catalog[$j]["unitprice"]; break; } } -Original Mess

RE: [PHP] converting C to PHP

2002-06-12 Thread Martin Towell
rn, the entire string is valid.) Instead of a pointer - a position number would be okay (Actually, to get the number, I could just do "$cp-0" or "$cp*1" - gotta love variants) -Original Message- From: Daniel Tryba [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13,

RE: [PHP] beginner in PHP

2002-06-12 Thread Martin Towell
try this for chout() function chout(){ global $mycart, $cart_items; session_destroy(); -Original Message- From: Phillip Perry [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 2:18 PM To: Martin Towell; Tom Rogers; Php Subject: RE: [PHP] beginner

RE: [PHP] Re: converting C to PHP

2002-06-12 Thread Martin Towell
> -Original Message- > From: David Robley [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 13, 2002 3:25 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: converting C to PHP > > > In article <6416776FCC55D511BC4E0090274EFEF508A46F@EXCHANGE>, > [EMAIL PROTECTED] says... > > I'm convertin

RE: [PHP] question about ? :

2002-06-13 Thread Martin Towell
Lee - I would bracket anyway, just to make sure, and to make it clear to the coder what's happening Miguel - that's fine when using two operators that have different precedence, but all three operators are ?: -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Friday, J

RE: [PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Martin Towell
instead of using js to redirect, could you use header("location:"); ? -Original Message- From: Don [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:36 PM To: php Subject: [PHP] Can I set the value of variable depending on when the page is loaded? Hi, I have a an HTML page cont

RE: [PHP] Can I set the value of variable depending on when the page is loaded?

2002-06-13 Thread Martin Towell
To: Martin Towell; php Subject: Re: [PHP] Can I set the value of variable depending on when the page is loaded? Would that solve my probem with the BACK button? - Original Message ----- From: "Martin Towell" <[EMAIL PROTECTED]> To: "'Don'" <[EMAIL PROT

RE: [PHP] Re: Spam Bots/E-mail Addys

2002-06-13 Thread Martin Towell
It all depends on the traffic to the server. I agree that any checks should be done on the server anyway, just in case someone has js turned off. But to reduce the load on the server, you can use js to at least filter _some_ of the traffic. Also, using js to alert a user of an error is much quic

RE: [PHP] Different colors on lines

2002-06-13 Thread Martin Towell
have a seperate counter $query = mysql_query("select * from $tabell_4"); $number = mysql_numrows($query) ; $i = 0; $bgcolor[0] = "#FFE38E"; $bgcolor[1] = "#FF"; $Search = "Test"; $j = 0 while ($i < $number) { $Name = mysql_result($query_1,$i,"Name"); if (eregi ($Search, $Name)) { Echo '

RE: [PHP] Nested IF's (Is there a LIMIT ?)

2002-06-13 Thread Martin Towell
Bracketing looks good try pulling chunks of code out and gradually add it in to see where the problem lies eg (sorry for reformatting your code) html code in here, then html code in here, etc.. -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Fri

RE: [PHP] How do I hide download link ...

2002-06-18 Thread Martin Towell
Hi, if using the header command for attaching a file really prevents the user from seeing the actual download link, is it really all that important that the file is read from behind the document root if it is in a very hard to guess directory? "Martin Towell" <[EMAIL PROTECTED]> wrote in

RE: [PHP] How do I hide download link ...

2002-06-18 Thread Martin Towell
ansfer-Encoding: binary"); Header("File-Length: $fsize"); Header("Content-Disposition: attachment; filename=$fname"); echo $buff; -Original Message- From: Lazor, Ed [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 8:59 AM To: 'Martin Towell

RE: [PHP] URGENT

2002-06-18 Thread Martin Towell
you might need to place a space before WHERE -Original Message- From: Phil Reid [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 9:33 AM To: [EMAIL PROTECTED] Subject: [PHP] URGENT I am in urgent need of help! (AGAIN) Can anyone spot anything wrong with this query? $sql =

RE: [PHP] what kind of weird problem is this?

2002-06-18 Thread Martin Towell
Doing a search on php.net for T_CONSTANT_ENCAPSED_STRING comes up with this page: http://www.php.net/manual/en/tokens.php This then leads to: http://www.php.net/manual/en/language.types.string.php#language.types.string .syntax I have no idea how to interpret all this, but try changing mailto:[

RE: [PHP] How many copies

2002-06-20 Thread Martin Towell
For the first question: Will this work? In class A, you wont get anything when you use $this->bar if the class hasn't been instantiated. besides that fact, you'll should get the output of: settig:bar+foo if you call A::foo(); As for the second question: How many times A will be made answer: zero

RE: [PHP] Hex operations

2002-06-20 Thread Martin Towell
looks like it's trying to treat $cap1 as a decimal number, and not a hex number have a look at this: for ($cap = 0; $cap < 64; $cap++) { $cap1 = dechex($cap); $bit = ($cap1 | 0x01); echo "$cap - $cap1 - $bit\n"; } and you'll see what I mean... -Original Message- From: Frank S. Kic

RE: [PHP] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Martin Towell
what about doing a "select count(*) from table where username = 'foobar'" then, if ($cnt > 0) { /* display error */ } else { /* insert new username */ } -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 2:07 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [

RE: [PHP] Limiting text inputs by character count?

2002-06-23 Thread Martin Towell
a) maxlength="xx" b) use javascript (document.forms["frm_name"].elements["textarea"].value.length) (I think you need the ".value" bit) -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Limiting

RE: [PHP] Time Delay using phpscript

2002-06-23 Thread Martin Towell
maybe while(true) { echo "word"; flush(); sleep(1); } but I don't think that's exactly what you want, is it? -Original Message- From: Uma Shankari T. [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 1:14 PM To: PHP Subject: [PHP] Time Delay using phpscript Hello, Can an

RE: [PHP] rounding a number

2002-06-23 Thread Martin Towell
according to the pdf version of the manual I have, round() is what you need float round(float val[, int precision]) have another look that the man page -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 1:35 PM To: [EMAIL PROTECTED] Subject:

RE: [PHP] finding the highest primary key in a table

2002-06-24 Thread Martin Towell
$query = "SELECT max(id) FROM table"; -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 10:54 AM To: [EMAIL PROTECTED] Subject: [PHP] finding the highest primary key in a table I want to find the number of the highest primary key in a par

RE: [PHP] using variables in a function within a fuction

2002-06-24 Thread Martin Towell
or make it (argh) global -Original Message- From: Michael P. Carel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 3:14 PM To: php Subject: [PHP] using variables in a function within a fuction Hi to all, Have problem with this. Im want to use a variable in a function into anot

RE: [PHP] looping through numbers

2002-06-24 Thread Martin Towell
I think you mean for ($i = 200; $i <= 250; $i++) print "$i "; (: -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 5:05 PM To: Php-General Subject: RE: [PHP] looping through numbers for ($i = 200; $i <= 200; $i++) print "$i

RE: [PHP] closing a browser-window with php

2002-06-26 Thread Martin Towell
use javascript... php can't interact w/ the browser unless you go through js or vbs so you'd do something like this: -- MM Page -- Start -- -- MM Page -- End -- -- New Win -- Start -- win = window.open("real_url", "real_win", "width=xx,height=xx"); win.moveTo(x, y); window.close(); //

RE: [PHP] Display Records in Multiple Pages

2002-06-26 Thread Martin Towell
pass around a "page" number or a "start record" number. Use that to determine where to start (and therefore where to end) eg: page = 1.'. start record = (1-1)*25+1 => 1 eg: page = 3.'. start record = (3-1)*25+1 => 51 HTH Martin -Original Message- From: Aqua [mailto:[EMAIL PROT

RE: [PHP] Re: PHP and OOP

2002-06-27 Thread Martin Towell
I haven't got around to reading all the other replies yet, so this reply might already be covered... So I went to that url - and okay, according to the person writing that page, there's a ~3sec increase in the time it takes to execute - BUT - that's to do 1 million iterations, doesn't seem too mu

RE: [PHP] HTTP POST a file with CURL <----------PLEASE HELP!!!!!!

2002-06-27 Thread Martin Towell
The command line CURL has the -T option - might be worth looking to see if you can do the same in PHP, otherwise you might have to break out of PHP and use the system's CURL Martin -Original Message- From: SpamSucks86 [mailto:[EMAIL PROTECTED]] Sent: Friday, June 28, 2002 10:12 AM To: [E

RE: [PHP] Fast code to partially flatten an array based on several keys?

2002-06-27 Thread Martin Towell
this sort of merging would be easier to do when you create the array (unless you need the other format for something else?) -Original Message- From: Morgan Grubb [mailto:[EMAIL PROTECTED]] Sent: Friday, June 28, 2002 11:09 AM To: [EMAIL PROTECTED] Subject: [PHP] Fast code to partially fla

RE: [PHP] Fast code to partially flatten an array based on several keys?

2002-06-27 Thread Martin Towell
if ( $vehicles[$j]['dealer_id'] == $row['dealer_id'] && $vehicles[$j]['vehicle_id'] == $row['vehicle_id'] ) { $vehicles[$j][$row['company_id']] = $row['page_views']; $found = true;

RE: [PHP] How can I write in a loop??

2002-06-27 Thread Martin Towell
Is this a direct copy of what you've got? If so, line 11 shouldn't be there -Original Message- From: sunny AT wde [mailto:[EMAIL PROTECTED]] Sent: Friday, June 28, 2002 1:24 PM To: [EMAIL PROTECTED] Subject: [PHP] How can I write in a loop?? Hi all, would be very greatful if someone co

RE: [PHP] checking

2002-06-27 Thread Martin Towell
see if isset() works for you -Original Message- From: Leo [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 6:42 PM To: php.net Subject: [PHP] checking I have a form and I don't want to insert recording with blank value. I put: if ($lastname="") { $insert="no" } if ($insert="

RE: [PHP] Adding GD libraries after compile

2002-06-27 Thread Martin Towell
dl() is your friend here - well it works fine on the win version at least... :) -Original Message- From: PHPCoder [mailto:[EMAIL PROTECTED]] Sent: Friday, June 28, 2002 5:03 PM To: php-general Subject: [PHP] Adding GD libraries after compile Hi I have a working PHP build on my webserver

RE: [PHP] How to put these 2 IF statements into 1, with regex?

2002-06-30 Thread Martin Towell
try this if (preg_match("@siteUserList.cgi?group=site177&?@", $QUERY_STRING)) (I added a "?" after get "&") -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 11:29 AM To: [EMAIL PROTECTED] Subject: [PHP] How to put these 2 IF statements in

RE: [PHP] Fast code to partially flatten an array based on several keys?

2002-06-30 Thread Martin Towell
Sorting - are you sorting the array keys or the values ? If you're sorting the keys, maybe it would be better to have another array that holds a list of keys, sort that, and then use that as a "pointer" to the actual array. If you're sorting the values, then php has a good sort function (uses th

RE: [PHP] PHP with CSS

2002-06-30 Thread Martin Towell
if in-line styles aren't working (and you can see them when you do a "view source") then it's nothing to do with apache. (unless there's a header() command I don't know about that stops them from working...) Martin -Original Message- From: Bruce Karstedt [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP] PHP with CSS

2002-06-30 Thread Martin Towell
lesheet" instead of type="text/css") 2. is the style sheet file accessable from the web can't think of anything else that could be wrong -Original Message- From: Bruce Karstedt [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 3:17 PM To: 'Martin Towell'

RE: [PHP] emulating enable_trans_sid

2002-06-30 Thread Martin Towell
Justin > It's quite possible that the end solution will require a decent HTML parser > or state engine. Fun fun :) Do you have any JS that will have to be "altered" because of what you're trying to do. 'Cause if you have to write an HTML parser, you'd prob have to write a JS parser too :) More

RE: [PHP] Increment

2002-06-30 Thread Martin Towell
on the "next" link have some sort of counter that lets you know which record to display. If that counter isn't present, then display the first record HTH Martin -Original Message- From: Uma Shankari T. [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 4:52 PM To: PHP Subject: [PHP]

RE: [PHP] Updating (appending) a file

2002-07-01 Thread Martin Towell
if the php file is: mydomain.com/index.php and the data file is: mydomain.com/files/Names.txt then the relative path is not "\\files\\Names.txt" , it's "files\\Names.txt" HTH Martin -Original Message- From: Chris Earle [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 3:29 PM To:

RE: RE: [PHP] Updated (appending) a file

2002-07-01 Thread Martin Towell
maybe a permissions thing? do you get any errors back? if so, what error is it? try appending to a file in the same directory as index.php and see how that goes. -Original Message- From: Chris Earle [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 3:54 PM To: [EMAIL PROTECTED] Su

RE: RE: [PHP] Updated (appending) a file

2002-07-01 Thread Martin Towell
To: [EMAIL PROTECTED] Subject: Re: RE: [PHP] Updated (appending) a file The server has error reporting turned off (can I change this even though I'm not there?)... I cannot do it with the file in my base folder either. "Martin Towell" <[EMAIL PROTECTED]> wrote in message 6416776

RE: RE: [PHP] Updated (appending) a file

2002-07-01 Thread Martin Towell
(appending) a file Permission denied Yep. Crap. If I let PHP create the file (delete the files as they exist now), that will give it permission (because it will have made them), right? Thanks a lot for all the help. "Martin Towell" <[EMAIL PROTECTED]>

RE: [PHP] Passing more than one variable with alink

2002-07-01 Thread Martin Towell
the syntax is name1=val1&name2=val2&name3=val3 the separator is "&" -Original Message- From: Peter Goggin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 4:31 PM To: [EMAIL PROTECTED] Subject: [PHP] Passing more than one variable with alink I need to pass more than one variable

RE: [PHP] Programmer's Browser

2002-07-02 Thread Martin Towell
curl -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 4:08 PM To: [EMAIL PROTECTED] Subject: [PHP] Programmer's Browser Any recommendations for a GPL (read: free) "Programmer's Browser" which will allow me to surf "normally" but cache pages

RE: [PHP] Find all combinations of numbers

2002-07-02 Thread Martin Towell
The way I would tackle this is in several steps (and maybe combine them later?) Here goes - in pseudo code/point form 1. Find max 2. Find all array elements who's number in less than max 2a. create a temp array that holds these indexes 3. Do the ol' nPr (or is it nCr?) thingo on the temp array,

RE: [PHP] fsockopen question

2002-07-03 Thread Martin Towell
you can do more than one fsockopen(), but since php isn't multi-threaded - you'll still only be able to download one file at a time. -Original Message- From: Jose Arce [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 04, 2002 4:39 PM To: [EMAIL PROTECTED] Subject: [PHP] fsockopen question

RE: [PHP] fsockopen question

2002-07-03 Thread Martin Towell
n question So...i can do more than one fsockopen()...but is not multi-thread? i don't understand...i mean...if i can open more than one fsockopen...it is multithread, or in wich cases php open more than one fsockopen? thx :D >From: Martin Towell <[EMAIL PROTECTED]> >To: &#

RE: [PHP] fsockopen question

2002-07-03 Thread Martin Towell
($i < 100) { $sock = fsockopen($host, 80); fputs($sock, "GET /file".$i".html HTTP/1.0\r\n\r\n"); } isn't? >From: Martin Towell <[EMAIL PROTECTED]> >To: 'Jose Arce' <[EMAIL PROTECTED]>, [EMAIL PROTECTED] >Subject: RE: [PHP] fsockopen

RE: [PHP] Re: suppressing errors with "@"

2002-07-07 Thread Martin Towell
I use it in front of variables (never tried it on $GLOBALS, etc though) eg: (using register_globals = on thingo - hey don't blame me, it's the tech guys who have it on, and there's too much legacy code to turn it off :( - anyway) -Original Message- From: Scott Fletcher [mailto:[EMAI

RE: [PHP] ini_set() broken?

2002-07-07 Thread Martin Towell
On Sun, 7 Jul 2002, Miguel Cruz wrote: >> > if(ini_set("register_globals", "0")) >> echo "ini_set success"; >> else >> echo "ini_set failed"; >> ?> [snip] I haven't tried this code, but I assume you're trying to say that "ini_set failed" is displayed, but you're expecting the other output

<    1   2   3   4   5   6   7   8   >