Re: [PHP] days between two timestamps

2002-06-05 Thread Martin Clifford
Use substr() to extract the appropriate information, then format it and compare it. 20020603 is obviously June 3, 2002 and 20020605 is obviously June 5, 2002 which means there was 1 day (plus x hours) between the two. Hope to help! Martin >>> "Tyler Longren" <[EMAIL P

Re: [PHP] days between two timestamps

2002-06-05 Thread Martin Clifford
Well, I had the right idea... John is just more advance than me. :o) >>> "1LT John W. Holmes" <[EMAIL PROTECTED]> 06/05/02 11:09AM >>> Since those look like MySQL timestamps, I would suggest you do it in your query. SELECT TO_DAYS(column1) - TO_DAYS(column2) AS Difference FROM table Adapt to

Re: [PHP] Sessions question (-enable-trans-sid)

2002-06-05 Thread Martin Clifford
, you don't have to worry about cookies being on at all. Just some idle speculation, I've never tried to use both at the same time. Martin >>> "Jeff Field" <[EMAIL PROTECTED]> 06/05/02 12:56PM >>> Hi, I'm confused about one thing regarding sessio

Re: [PHP] php and javascript question

2002-06-05 Thread Martin Clifford
As far as I'm aware you can't create a javascript variable and use it within PHP on the same page. You can add that variable's value to a hidden form element to be passed to the next page, but I don't think so with the same page. martin >>> "kemu" <

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

AW: [PHP] Array questions...

2002-06-12 Thread Martin Lucas
hi leon, > > Hello, > > Assume I have the following array: > > $array = array ( > "apple" => "cherry", > "foo" => "bar", > "wom" => "bat" > ); > > How could I easy remove the key and the value of the key > "foo" from that > array? > unset ($array[foo]); > Also, what is the best

[PHP] Emptying a Single Array Value

2002-06-12 Thread Martin Clifford
Howdy, If someone out there could tell me how to get rid of a single key/index pair within an array, it would be great. I've tried both unset() and empty(), but both destroy the entire array. Please CC me directly, as I'm on the digest. Thanks in advance! Martin -- PHP Gener

Re: [PHP] Emptying a Single Array Value

2002-06-12 Thread Martin Clifford
st a short test script that misbehaves for you. $arr = array('foo','bar'); unset($arr[0]); print_r($arr); // only $arr[1] = 'bar' exists now See also: http://www.php.net/unset http://www.php.net/array_splice Regards, Philip Olson On Wed, 12 Jun

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
t back is the first number and the first letter after that number (which can be "L", "P", or "W"). So in the example I gave, I'll need to get back "12" and "L" What I settled on is: ereg("([0-9]*)([LPW])", $format, $bits); list(, $cnt, $skip) = $bits; But maybe there's a better way ?? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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
it works for me - to only problem is if you're transferring data from one page to the other via the form. You'll need some other why of doing it (sessions, cookies, use GET, other) -Original Message- From: Don [mailto:[EMAIL PROTECTED]] Sent: Friday, June 14, 2002 12:43 PM

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

AW: [PHP] PHP to Excel?

2002-06-18 Thread Martin Lucas
hi chad, on http://www.cnovak.com/ you'll find a php-class that generates native excel-files, even with cell formatings and other more or less useful things. greetings martin > -Ursprüngliche Nachricht- > Von: Chad Day [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 18

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

[PHP] Forum with php

2002-06-19 Thread Martin Thoma
Hello! I saw a lot of forums (or boards) which looks almost the same and they are done in php. Is there a free forum-software in php? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

[PHP] Setting Cookies in netscape and explorer?

2002-06-21 Thread Martin Johansson
line 9 Warning: Cannot add header information - headers already sent by (output started at c:\inetpub\wwwroot\devproc\beta\inside.php:4) in c:\inetpub\wwwroot\devproc\beta\inside.php on line 10 What is wrong! Please help me someone!!! /Martin --- Ditt utgående mail är virusfritt. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.371 / Virus Database: 206 - Release Date: 2002-06-13

[PHP] Re: Setting Cookies in netscape and explorer?

2002-06-21 Thread Martin Johansson
I tried your stuff but it didnt help me! Still works in explorer but when I tried it in netscape It says ERROR!!! in netscape if (isset($devProcTailorCookie)) { $tok = explode("|", $devProcTailorCookie); } else { echo "ERRROR!!!"; } I have global_variables turned on i

[PHP] Re: Setting Cookies in netscape and explorer?

2002-06-21 Thread Martin Johansson
Another thing! when I look in netscape/preferences/privacy&security/cookies/view Stored Cookies.. there is no cookie for my website.. isnt that strange? /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Setting Cookies in netscape and explorer?

2002-06-21 Thread Martin Johansson
()+10); But now it doesnt work in explorer. But I would be able to fix that. Thanks /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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:

[PHP] Insert with one button

2002-06-24 Thread Martin Kampherbeek
Hello, I'm making a predictions competitie for soccer. Now I've got a form with the matches for that weekend and some selectboxes with 1 to 9 for the goals. At the bottum of the form is a Submit button. What I want is to insert all the scores in my table predictions with just that one button.

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

[PHP] function echo ' '

2002-06-25 Thread Martin Johansson
Is there a way to express php variables inside an echo ' '. I want something like this to work: echo ''; I know I can write it like this: echo ''; But Its to hard to read the code like this. /Martin -- PHP General Mailing List (http://www.php.net

Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson
But the problem is that Im doin it inside a while loop. So I need to echo it. /mj "Niklas lampén" <[EMAIL PROTECTED]> skrev i meddelandet 025801c21c1d$55d16210$ba93c5c3@Niklas">news:025801c21c1d$55d16210$ba93c5c3@Niklas... Shorter version would be And this is not bad coding, it is actually fas

Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson
Thanks, that was new for me! /mj "Niklas lampén" <[EMAIL PROTECTED]> skrev i meddelandet 026b01c21c31$3bdab780$ba93c5c3@Niklas">news:026b01c21c31$3bdab780$ba93c5c3@Niklas... Not true. :) You can do it like this: (Ok, this is a for loop, but idea is the same) mailto:[EMAIL PROTECTED]] Sent: 25.

Re: [PHP] how to get names of files...

2002-06-25 Thread Martin Smetak
> (if there's a.gif in the folder then I want $first to be "a.gif", IF > there's also a "na.jpg" then I want then it should be $second .. if you > know what I mean) well, i think you don't want to have variable like $twentyfifth, $hundredandthirtyfirst etc... don't you rather use some array? but

Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson
Thanks all for your replies! For my code, this is the best way to view variables in echo functions It is nice and easy to read while going through a lot of code. /mj -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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 Me

RE: [PHP] Re: PHP and OOP

2002-06-27 Thread Martin Towell
oesn't seem too much of a difference to me. So that's just .03sec increase per iteration - I'm not too fussed about that. Compared to easier coding/reading/extensiblity/etc, it's a good trade off. Just my 2c worth Martin -Original Message- From: SP [mailto:[EMAIL

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

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
ow['page_views']; so you'd get something like (manually created result...): ( [645] => Array ( [35073] => Array ( [1] => 10 [0] => 6 ) ) ) -Original Message- From: Morgan G

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
sort function (uses the quick sort algorithm if I remember rightly) -Original Message- From: Morgan Grubb [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 1:16 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Fast code to partially flatten an array based on several keys? Martin, I said I&

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 [

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
ave to write a JS parser too :) More fun for ya! Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

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,

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

2002-07-01 Thread Martin Towell
ative path is not "\\files\\Names.txt" , it's -- "files\\Names.txt" -- -- HTH -- Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

[PHP] Regular Expression Problem

2002-07-02 Thread Martin Clifford
ght guess this is for a syntax highlighting function I am trying to write. Anyone have any ideas why it's not working? Please copy me directly, as I'm on the digest. Thanks! Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular Expression Problem

2002-07-02 Thread Martin Clifford
. $var, $$var or &$var to $var. Any ideas on how to do that? >>> [EMAIL PROTECTED] 07/02/02 01:50PM >>> On Wednesday 03 July 2002 01:40, Martin Clifford wrote: > Hey all! > > I'm trying to get this darn eregi_replace() to work, but it doesn't produce > any

RE: [PHP] Find all combinations of numbers

2002-07-02 Thread Martin Towell
temp array, then using that to refer the the actual array. HTH (and it's not too confusing) Martin -Original Message- From: Michael Benbow [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 4:07 PM To: [EMAIL PROTECTED] Subject: [PHP] Find all combinations of numbers

Re: [PHP] How do I split an alphabetical list (array) into A-Mand N-Z?

2002-07-03 Thread Martin Clifford
t way. HTH Martin >>> [EMAIL PROTECTED] 07/03/02 08:50AM >>> On Wednesday 03 July 2002 19:52, Daevid Vincent wrote: > Anyone have a function that will take an alphabetical list of names (in > an array already) and split it into two 'chunks' (arrays) A-M and

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Martin Clifford
Try stripslashes() before addslashes(), to ensure that it doesn't already contain slashes. HTH Martin >>> Jean-Christian Imbeault <[EMAIL PROTECTED]> 07/03/02 09:40AM >>> I am trying to make my PHP safe against malicious data user inputs. Reading up on t

Re: [PHP] V basic newbie problem

2002-07-03 Thread Martin Clifford
s, adding the values of field1 and field2 to the respective variables, then outputting table rows accordingly. HTH Martin >>> "Duncan Ellwood" <[EMAIL PROTECTED]> 07/03/02 10:43AM >>> I'm not sure if this is the right place for this but I'm just startin

[PHP] Another Regex Question (General)

2002-07-03 Thread Martin Clifford
][0-9] to do that? Elementry, my dear newbie. Hehe. Thanks all! Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Authentication

2002-07-03 Thread Martin Clifford
ed enough to do that, but past actions have proved that wrong. The magic line: session_start(). That's it. It holds ALL information about the session, and makes my life SO much eaiser. HTH Martin >>> "Peter" <[EMAIL PROTECTED]> 07/03/02 03:32PM >>> On my s

Re: [PHP] How to start hello program

2002-07-03 Thread Martin Clifford
What address are you using the run the program? Try using http://localhost/hello.php and see if that works. I don't use IIS, so I couldn't tell you anything relating to configuration. >>> Varsha Agarwal <[EMAIL PROTECTED]> 07/03/02 03:42PM >>> Hi, I am completely new to PHP and webserver thing

Re: [PHP] GET data in URL

2002-07-03 Thread Martin Clifford
PHP now comes with register_globals set to OFF by default, as far as I'm aware. You can access the variables using $_POST['variable'] and $_GET['variable'], or turn register_globals back ON. :o) Martin >>> "Jay" <[EMAIL PROTECTED]> 07/03/02 0

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] localhost - passing variables

2002-07-05 Thread Martin Clifford
If you're using one of the more recent releases of PHP4+, then register_globals is set to OFF by default in your php.ini file. Change this to ON or use $_GET['variable']/$_POST['variable'] to access the values. Martin >>> "Tony Tzankoff" &l

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

Re: [PHP] HTTPS vs. HTTP ?

2002-07-08 Thread Martin Clifford
shell? >>The more I think about this, the more I agree with people who just won't do eCommerce at all...<< Just the opposite for me. Time to go web-shoppin! Martin -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsu

<    1   2   3   4   5   6   7   8   9   10   >