Re: [PHP] A small problem with input feilds.

2002-12-05 Thread Tim Ward
only checked checkboxes are submitted therefore you have to number the form fields if you want to keep the relationship between the arrays - this should be easy enough if the form is generated by your code. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message

Re: [PHP] Output of MySQl sorted query to text or Word file.

2002-12-06 Thread Tim Ward
everything you need is here http://www.php.net/manual/en/ref.filesystem.php in particular fopen(), fputs(), fwrite(), etc. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, Decembe

Re: [PHP] More $_ array question...

2002-12-06 Thread Tim Ward
not quite ... if the form elements are (e.g) , etc. then you need $_POST["array"][0] to refer to the element (just like any other array of arrays in PHP). but you're right about count($_POST["array"]) ... and foreach ($_POST["array"] as $key=>$value),

Re: [PHP] Simple text editor for Windows?

2002-12-07 Thread Tim Ward
I like arachnophilia. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: John W. Holmes <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, December 07, 2002 4:11 PM Subject: [PHP] Simple text editor for Windows? > I know

Re: [PHP] fopen have a "setTimeout" feature?

2002-12-08 Thread Tim Ward
how about something like... $start = time(); $timeout = 60; // number of seconds to try while (!$file = fopen("...") && time() < $start + $timeout); if ($file) { // do stuff with file } Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message --

Re: [PHP] Hiding URL Variable

2002-12-08 Thread Tim Ward
store them in a session or cookie Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Stephen <[EMAIL PROTECTED]> To: PHP List <[EMAIL PROTECTED]> Sent: Sunday, December 08, 2002 8:10 PM Subject: [PHP] Hiding URL Variable > How can you hid

Re: [PHP] How do I populate a select?

2002-12-10 Thread Tim Ward
t the function names wrong - I use an abstraction layer these days Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Steve Jackson <[EMAIL PROTECTED]> To: PHP General <[EMAIL PROTECTED]> Sent: Tuesday, December 10, 2002 3:24 PM Subject: [PHP] H

Re: [PHP] Update query

2002-12-12 Thread Tim Ward
The best way would be to design the table so that it had an item_id field that was an auto-incremented integer and not updateable. It shouldn't be too late to add such a field, then it can be passed from the form as a hidden field (as I assume you're currently doing with $oldItemCode).

Re: [PHP] Returning multiple values from function

2002-12-12 Thread Tim Ward
you can always return an array of arrays ... return array($array1, $array2, ...); but in your case why not make the column names the array keys so the one array holds both column names and types. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Lisi

Re: [PHP] "Use of undefined constant" error

2002-12-17 Thread Tim Ward
f id and proceeds accordingly. Thats why you can get away with not using the quote marks (as long as there's no white space in the string). On a live site (and, I'd have thought, most default set-ups) you'd expect error reporting to be set all off and you'd never see the

Re: [PHP] key pairs

2002-12-17 Thread Tim Ward
mysql_insert_id(). 5. insert the data into the other table(s) with this order_id(). Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Ashley M. Kirchner <[EMAIL PROTECTED]> To: PHP-General List <[EMAIL PROTECTED]> Sent: Tuesday, December 17,

Re: [PHP] key pairs

2002-12-17 Thread Tim Ward
what do you mean by key pairs - I assumed you meant a key that could link the records in each table. If you've already done that then what's the problem? Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Ashley M. Kirchner <[EMAIL PROTEC

Re: [PHP] nested if in a for statement

2002-12-17 Thread Tim Ward
looks ok as long as you are really testing what you mean to. As you've written it if any of the variables are an empty string, zero, logical false or not set then the if statement will be true. what is $auth? Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Me

Re: [PHP] URL parsing

2002-12-18 Thread Tim Ward
you could use a combination of the string functions (strstr(), substr(), strpos()) or you could work out something with regular expressions. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Mako Shark <[EMAIL PROTECTED]> To: <[EMAIL PROTECT

Re: [PHP] checkboxes, radio buttons and $_POST['']

2003-01-09 Thread Tim Ward
isset($_POST["chk1"]) will only be true if the checkbox is checked. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: John-Erik Omland <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 6:25 PM Subject: [

Re: [PHP] dumb time question

2003-01-13 Thread Tim Ward
use the date() function, in this case date("i") and date("h") or date("H") Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Pag <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003

Re: [PHP] Error in variable when looping

2003-01-14 Thread Tim Ward
you're not differentiating between form elements on different rows. all the hidden elements have the same name and are in the same form so only the last one will be available as all the submit buttons are in the same form. you need to put ... tags around each submit/hidden pair. Tim Ward

Re: [PHP] Weird Errors

2003-01-14 Thread Tim Ward
surely you can post the part of the code that checks the e-mail is blank or not? Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Mike Bowers <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 14, 2003 12:04 AM Subject:

Re: [PHP] Error in variable when looping

2003-01-14 Thread Tim Ward
print ""; print""; print""; you'll then have as many forms as you have rows and which one is submitted will depend on which button is pressed. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Denis L. Menezes <[

Re: [PHP] ADV SQL Help Needed.

2003-01-21 Thread Tim Ward
off the top of my head SELECT risk_level, COUNT(risk_level) AS rl_count GROUP BY risk_level should do it, though I'd have to experiment with what's inside the COUNT(). Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: [-^-!-%- <[EMAIL P

Re: [PHP] nested queries/loops

2003-01-23 Thread Tim Ward
} } // then do ... foreach($partners as $services) {... foreach($services as $service) {... } } this may not be quite what you need but you get the general idea. looks like services as effectively a many to many link table, nothing wrong with that as far as I ca

Re: [PHP] Update row problems

2003-01-27 Thread Tim Ward
your query needs to be inside the foreach loop so that it runs for every item, at the moment it just runs after you've scanned through all the items so just does the last one. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Steve Jackson &l

Re: [PHP] Update row problems

2003-01-27 Thread Tim Ward
what version of PHP? try $HTTP_POST_VARS instead. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Steve Jackson <[EMAIL PROTECTED]> To: PHP General <[EMAIL PROTECTED]> Sent: Monday, January 27, 2003 1:14 PM Subject: RE: [PHP] Update

Re: [PHP] Sorting multidimensional arrays..

2003-01-30 Thread Tim Ward
if 'EXTENSION' is unique then you can make life a lot easier by making that the key of the root array (this is a heirarchy of arrays). Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Chad Day <[EMAIL PROTECTED]> To: php general <[EMA

Re: [PHP] processing form with unknown number of checkboxes, each with a unknown name.

2003-02-02 Thread Tim Ward
howabout making the checkboxes an array i.e. then when processing ... foreach($_REQUEST["checkbox"] as $checkbox) { ... } Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: anders thoresson <[EMAIL PROTECTED]> To: <[EMAIL PROTE

Re: [PHP] Help with classes (oop)

2003-02-03 Thread Tim Ward
the function with the same name as the class is the constructor and is called when the instance is created. So "$first = new first" runs first::first() without passing any parameters hence the warning. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message

Re: [PHP] form variable problem

2003-02-15 Thread Tim Ward
you need to use $_POST["userid"], etc. accessing the form elements by name directly is unsafe and doesn't work anyway with register_globals off, which is the default setting in your veresion of PHP. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Mess

Re: [PHP] Counting table fields having specific values

2003-02-27 Thread Tim Ward
the just the first row) if ($result = mysql_query("...")) {if ($array = mysql_fetch_array($result)) {... } } // for multiple return rows if ($result = mysql_query("...")) {while ($array = mysql_fetch_array($result)) {... } } Tim Ward http://w

Re: [PHP] PHP SQL Code

2003-03-02 Thread Tim Ward
I'd use ... WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(sUpdated) > 60*60*24*60 but I'm sure someone will come up with something more efficient. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Philip J. Newman <[EMAIL PROTECT

RE: [PHP] Re: Table formatting <-- PARTIALY SOLVED

2002-07-30 Thread Tim Ward
that? Tim Ward www.chessish.com > -Original Message- > From: César Aracena [mailto:[EMAIL PROTECTED]] > Sent: 29 July 2002 16:39 > To: 'Martin Towell'; [EMAIL PROTECTED] > Subject: RE: [PHP] Re: Table formatting <-- PARTIALY SOLVED > > &

[PHP] RE: dir to array?

2002-08-01 Thread Tim Ward
ir = opendir("/path/to/directory/"); > while($imgs = readdir($dir)) { >if (($imgs != ".") && ($imgs != "..")) { > $cnt[count($imgs)] = $cnt; is this typo in the original code? surely should be " = $imgs;" >} else { > print &q

RE: [PHP] String Question

2002-08-01 Thread Tim Ward
or ... while($new = substr($old, $i++ * $strlen, $strlen)) $array[] = $new; Tim Ward www.chessish.com > -Original Message- > From: Richard Baskett [mailto:[EMAIL PROTECTED]] > Sent: 31 July 2002 20:47 > To: Randy Johnson; PHP General > Subject: R

[PHP] RE: Destroy session variable when IE close

2002-08-15 Thread Tim Ward
yes but the variables are still held and would be available if you knew the session id. until the garbage collection clears it out the session variables are still there. the session doesn't die when the browser closes, just the browser's reference to it. Tim Ward Please re

[PHP] RE: sessions don't work

2002-08-16 Thread Tim Ward
why do you think the session isn't working? If there is a run time error in 'file' then an error would be reported and the output terminated. If you have error reporting off then you would expect to get eactly what you see. Sounds like a problem inside 'file'.

[PHP] RE: array_unique & multi-dimensional arrays

2002-08-20 Thread Tim Ward
ill prevent duplicate combinations of month and year (and, incidentally, allow you to sort on year and month very easily). Tim Ward www.chessish.com > -Original Message- > From: sasha [mailto:[EMAIL PROTECTED]] > Sent: 19 August 2002 19:10 > To: [EMAIL PROTECTED] > Subject:

[PHP] RE: RE: array_unique & multi-dimensional arrays

2002-08-20 Thread Tim Ward
een added to the array then it overwrites the existing one instead of adding a new element. Tim Ward > -Original Message- > From: sasha [mailto:[EMAIL PROTECTED]] > Sent: 20 August 2002 14:36 > To: Tim Ward > Subject: Re: RE: array_unique & multi-dimensional arrays >

[PHP] RE: PHP checkbox/hidden field question

2002-09-02 Thread Tim Ward
you need to define the key for checkbox arrays in order to distinguish them (as only the checked ones will be posted).. something like ... Tim Ward www.chessish.com > -Original Message- > From: Paul Maine [mailto:[EMAIL PROTECTED]] > Sent: 02 September 2002 00:56 >

[PHP] RE: Pass array in HTTP_POST_VARS question

2002-09-04 Thread Tim Ward
you just name the form elements as array elements, e.g. with explicit keys name='array[0]' name='array[1]' etc. or allowing php to assign the keys name='array[]' name='array[]' etc. then the array is an element of $HTTP_POST_

[PHP] RE: How to approach a new project?

2002-09-19 Thread Tim Ward
learn - not PHP. Tim Ward www.chessish.com > -Original Message- > From: Wm [mailto:[EMAIL PROTECTED]] > Sent: 18 September 2002 23:25 > To: [EMAIL PROTECTED] > Subject: How to approach a new project? > > > I'm trying to work out the best

[PHP] RE: use of mysql_free_result (was Re: [PHP] Efficiency)

2002-09-19 Thread Tim Ward
if your query is within a loop then it would probably help, e.g. for ($i = 1; $i <= 1000; $i++) { $result = mysql_query("..."); ... } in this case as $result is a resource identifier then reusing it doesn't release the original result. Tim Ward

[PHP] RE: redefining a function

2002-09-19 Thread Tim Ward
is using classes an option? Tim Ward www.chessish.com > -Original Message- > From: David T-G [mailto:[EMAIL PROTECTED]] > Sent: 19 September 2002 04:54 > To: PHP General list > Subject: redefining a function > > > Hi, all -- > > I

[PHP] RE: redefining a function

2002-09-20 Thread Tim Ward
eem to remember that that isn't always the case at first. Tim > -Original Message- > From: David T-G [mailto:[EMAIL PROTECTED]] > Sent: 19 September 2002 17:13 > To: PHP General list > Cc: Tim Ward > Subject: Re: redefining a function > > > Tim, et al --

[PHP] RE: PHP source code

2002-09-20 Thread Tim Ward
then keep this info in a config file off root and use a data abstraction class to connect. Tim www.chessish.com > -Original Message- > From: Oliver Witt [mailto:[EMAIL PROTECTED]] > Sent: 19 September 2002 19:15 > To: [EMAIL PROTECTED]; Stephan Seidt > Subject: Re: PHP source code > >

[PHP] RE: Update undefined List Values in DB

2002-09-23 Thread Tim Ward
make your checkboxes in the form an array with the index being the customer id. e.g. in the form ... foreach($customers as $cust) { echo(""); ... echo(""); echo(""); ... echo(""); } and when processing foreach($_POST["status"] as $custid=>status) {

[PHP] RE: Maybe a stupid question but can it be done?

2002-09-24 Thread Tim Ward
the ID field in the first table can be an auto-increment field and the second table needs to have an ID INT field that is not auto increment. Insert into the first table, use mysql_insert_id() (or whatever it is) to get the auto incremented value and then do your second insert using that value fo

[PHP] RE: PHP Form and Arrays help

2002-09-25 Thread Tim Ward
use a hidden input in front of each checkbox with the same name and the value '0' (as opposed to '1' for the checkbox). Tim www.chessish.com > -Original Message- > From: Tom Ray [mailto:[EMAIL PROTECTED]] > Sent: 24 September 2002 17:24 > To: [EMAIL PROTECTED] > Subject: PHP Form and Arr

[PHP] RE: local resource variables

2002-09-26 Thread Tim Ward
to test this try returning $result from the function e.g. function test() { $result = mysql_query("SELECT * FROM bigbigtable"); return $result; } echo(mysql_numrows(test())) remember $result holds a number that is a pointer to the result set resource, it isn't the actual result data set, if

[PHP] RE: Incrementing the value

2002-10-03 Thread Tim Ward
I think you mean ++$hid, otherwise the value is inserted before it is incremented, and why not change to $_GET["hid"] for future compatibility and just to make sure. Are there any scoping issues we don't know about, e.g. is this snippet within a function? Tim Ward w

[PHP] RE: No ouput until program end, why?

2002-10-04 Thread Tim Ward
does output buffering not work with command line PHP? http://www.php.net/manual/en/ref.outcontrol.php Tim Ward www.chessish.com > -Original Message- > From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] > Sent: 04 October 2002 05:59 > To: [EMAIL PROTECTED] > Subject:

[PHP] RE: newbie: php/mysql

2002-10-28 Thread Tim Ward
the best way to do password validation is using one way encryption (e.g. MySQL PASSWORD() function). That way you check the encrypted user entered password against the database ... " ... WHERE pass = PASSWORD('{$_POST["password"]}')" Tim Ward www.chessish

[PHP] RE: OOP-classes in PHP

2002-11-18 Thread Tim Ward
you can't access $overall->foo because you've never defined it you need: function load($class){ eval("\$this->$class = new $class;"); return true; } Tim > -Original Message- > From: Tularis [mailto:[EMAIL PROTECTED]] > Sent: 17 November 200

[PHP] RE: Problem with Class - incomplete object error

2002-11-18 Thread Tim Ward
you've included the class definition at the top of every page, right? and why don't you just use $_SESSION["cart"] directly instead of using $cart? that way you don't have to worry about scoping issues and continually passing $cart through to functions. Tim > -Original Message- > From: P

RE: [PHP] PHP function for listing number of columns in table

2002-06-10 Thread Tim Ward
Just off the top of my head wouldn't describe then mysql_num_rows() be a lot more efficient. Tim Ward www.chessish.com <http://www.chessish.com> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> -- From: John Holmes [SMTP:[EMAIL PROTECTED]] Sent:

[PHP] RE: simplicity with 2 queries..

2002-06-10 Thread Tim Ward
ure your code a bit if you want the desired result. Tim Ward www.chessish.com <http://www.chessish.com> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> -- From: Jule Slootbeek [SMTP:[EMAIL PROTECTED]] Sent: 10 June

RE: [PHP] beginner in PHP

2002-06-13 Thread Tim Ward
>From the symptoms it sounds like you're destroying the session okay but leaving the variables In the script. Are you sure you're unsetting them at the appropriate scope level. Tim Ward www.chessish.com <http://www.chessish.com> -- From: Phillip

RE: [PHP] beginner in PHP

2002-06-14 Thread Tim Ward
then destroy the session locally by unsetting that array. If I have a function that I want to change session variables at all I make it take the session in as a parameter and pass it back as the return value. Tim Ward > -Original Message- > From: Phillip Perry [SMTP:[EMAI

RE: [PHP] Profanity Filter

2001-01-22 Thread Tim Ward
I know someone who had her site rejected for registration with a major search engine because it included info about Tae Kwon Do in Scunthorpe ... you can only go so far with word checking Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of

[PHP] RE: DBase functions

2001-01-23 Thread Tim Ward
ful. Sorry not to answer your question very well. If you can get it to work please let me know how. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message-

[PHP] RE: url hide

2001-01-23 Thread Tim Ward
Surely you can't hide the url the browser requests. the best you can do is hide where that browser gets it's content from ... why not include()? Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdi

[PHP] RE: [php_mysql] Creative solution with XML,PHP,MYSQL

2001-02-19 Thread Tim Ward
s you would html. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: Tom Knight [mailto:[EMAIL PROTECTED]] > Sent: 19 February 2

[PHP] RE: Help?

2001-02-21 Thread Tim Ward
sort of testing should only be done after you've proved the program to satisfy the bean-counters. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Messag

[PHP] RE: Can you make a file empty?

2001-02-21 Thread Tim Ward
does this not already do it? according the manual "w" as the second parameters will "place the file pointer at the beginning of the file and truncate the file to zero length". Tim Ward Senior Systems Engineer Please refer to the following disclaimer in res

[PHP] RE: How to get information from

2001-02-22 Thread Tim Ward
use isset($action1) and isset($action2) to test each. the nice way to do it would be for them to have the same name but different values as you would do with alternative submit buttons, but I haven't ever needed to find out how to do that and doesn't seem to be quite that simple.

RE: [PHP] Tough one?

2001-02-22 Thread Tim Ward
key_list)."'"; ... I haven't tested the detail of this but the theory is sound, I'm fairly sure. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html

RE: [PHP] RE: Can you make a file empty?

2001-02-22 Thread Tim Ward
the manual implies that you don't need to write anything to the file to clear what's in it already, is this not the case? Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-discl

[PHP] RE: How to get information from

2001-02-22 Thread Tim Ward
he code that doesn't work: Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message- > From: Tim Ward > Sent: 22 February 2001

[PHP] RE: forms & functions

2001-02-27 Thread Tim Ward
essentially, no. PHP runs server side and the action of a form is generated client-side. To run a PHP function the page needs to be resubmitted. The code you have written will run the function before the page is submitted. try something like ... Tim Ward Senior Systems

[PHP] RE: while loop and modulus?

2001-02-28 Thread Tim Ward
tocount % 3) == 2) { echo "\n\n"; } $photocount++; } // this should add empty cells until the row is complete while ($photocount % 3) { echo(""); $photocount++; } echo "\n"; echo ""; Tim Ward > -Original Message-

[PHP] RE: Move a file from dir to another or delete file..?

2001-02-28 Thread Tim Ward
_______ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e

RE: [PHP] Running php code inside of a string within a php script..

2001-03-05 Thread Tim Ward
Writing the string to a file and then include()ing it would work. It does seem a bit heavy handed, but unless there's a string equivelant of include() this may actually be the best way. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of

[PHP] RE: function questions

2001-03-05 Thread Tim Ward
why are you using this construct instead of echo()? e.g. echo("Hey there " . foo::bar($baz) . " how are you doing?"); Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-

[PHP] RE: Function to compare an array with another array

2001-03-05 Thread Tim Ward
will return an array that is a copy of the first array with only those elements that are not in array2. If you only want the first one either just use the first one( foreach(){ ... break;}) or put a break in the if. Tim Ward Senior Systems Engineer Please refer to the following

RE: [PHP] help gurus: multi-dimensional array problem.

2001-03-05 Thread Tim Ward
uot;name"] . ""); }; } haven't tested this but the principal should be okay and do what you're after Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-

[PHP] RE: Value of if(isset(X)) problem

2001-03-07 Thread Tim Ward
I think you'll find that cmdFinish is only passed through if the form is submitted by pressing the button. Hitting return on any other field will submit the form without sending cmdFinish. It might be sfare to check if one of your text fields is set. Tim Ward Senior Sy

[PHP] RE: explode question

2001-03-08 Thread Tim Ward
imited string? Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: Rol [mailto:[EMAIL PROTECTED]] > Sent: 07 March 2001 19:09

RE: [PHP] RE: Value of if(isset(X)) problem

2001-03-08 Thread Tim Ward
I honestly can't remember when and where I found this happening, but since then I've decided not to rely on submit buttons being posted so I haven't seen them working or not working. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in

[PHP] RE: printing data using javascript with php

2001-03-12 Thread Tim Ward
er you like to do this sort of concatenation. > > where $dsc is set equal to an array element read in from a database in > the php code. Now I KNOW I have got things MAJORLY confused > here - but > the more I read the more wrapped up I seem to get so if there a way to >

[PHP] RE: Using selected fields

2001-03-12 Thread Tim Ward
// ... now you can do $sql_fields = mysql_fetch_array($result); $userlevel = $sql_fields["userlevel"]; } else { $authorised = false; $userlevel = 0; } Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect

RE: [PHP] replacing a line in a file

2001-03-14 Thread Tim Ward
the point is that you can't replace part of a flat file. you can append to the content or replace it all. if you want to replace part, you need to read it all, amend the relevant line and then replace it all. Tim Ward Senior Systems Engineer Please refer to the foll

[PHP] RE: [?] Call a function with a button/link click?

2001-03-14 Thread Tim Ward
php works server side. you cannot get user to run anything in php without resubmitting (posting or whatever) ... you need javascript if this is something you can do client-side, if not you'll have to live with some sort of resubmit. Tim Ward Senior Systems Engineer Please

[PHP] RE: I want this magic directory

2001-03-14 Thread Tim Ward
d username (which you can hold in a session) you can build urls, etc. using it e.g. echo("Next Page"). Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Origi

RE: [PHP] RE: Function to compare an array with another array

2001-03-15 Thread Tim Ward
return $answer; } ?> Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: Fang Li [mailto:[EMAIL PROTECTED]] > Sent: 15 March 200

[PHP] RE: dynamically change a variable name

2001-03-19 Thread Tim Ward
); for ($i = 1; $i < $max; $i++) { $dwg[$i] = $dwg[$i - 1]; ... } Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: Gar

[PHP] RE: Script to convert # of seconds to HH:mm

2001-03-20 Thread Tim Ward
if your input is a number of seconds why not just treat it as a unix timestamp so ... echo date("H:i:s", $num_seconds) ... will work. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.

[PHP] RE: Help with array creation

2001-03-20 Thread Tim Ward
they are already in one ... $HTTP_POST_VARS or $HTTP_GET_VARS Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: Chris Carbaugh [

[PHP] RE: checboxex and sessions

2001-03-20 Thread Tim Ward
around this. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: karakedi [mailto:[EMAIL PROTECTED]] > Sent: 20 March 2001 03:17 >

[PHP] RE: Dynamically build a form from mySQL table

2001-03-21 Thread Tim Ward
ng mysql. You may want to play around with analysing $field["type"] to get the right input attributes. There may be a slicker way, but I think this is pretty straight forward and the "SHOW COLUMNS" query isn't going to be slow. ... also this untested so please treat as pse

RE: [PHP] Is there such an array like $array[][]?

2001-04-18 Thread Tim Ward
vel2 as $level3) foreach($level3 as $value) echo($value); Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > ---

RE: [PHP] Is there such an array like $array[][]?

2001-04-25 Thread Tim Ward
(in_array("fred", $array)) echo "fred found"; // prints "fred found" Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Mes

[PHP] RE: getting rows from separate tables stacked in a single array ? (newbie, mysql)

2001-04-25 Thread Tim Ward
this method of sorting arrays by an element of the member arrays. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: [EMAIL PROTECTED] [mailt

[PHP] RE: Parsing HTML files from an external web server

2001-04-27 Thread Tim Ward
hope this is of some help. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: James Kneebone [mailto:[EMAIL PROTECTED]] > Sent:

[PHP] RE: Sizeof a multi-dimensional array??

2001-04-27 Thread Tim Ward
I haven't worked out why, yet. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: Chris Anderson [mailto:[EMAIL PROTECTED]] > S

[PHP] RE: Get the title from an HTML page

2001-04-30 Thread Tim Ward
$title = substr(stristr($filetext, ""), 7); $title = substr($title , 0, strpos($title , "")); Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html >

[PHP] RE: session array :-/

2001-05-02 Thread Tim Ward
every time you run mainpage.php, the array is being reinitialised. Lose the line "$myArray=array();". Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html >

[PHP] RE: split and array logic

2001-05-02 Thread Tim Ward
$stuff[$key]["browser"] = $dummy[2]; } foreach ($stuff as $element) { foreach($element as $field=>$value) echo("$field=>$value"); } ... should do it. if the strings are more complicated you'll need to look at stristr, substr, etc. Tim Ward

[PHP] RE: Sending information between pages???

2001-05-03 Thread Tim Ward
if you post or get the form $choice is there for php. this is how form submission works in php. try this: "); ?> aaa bbb ccc ddd wh Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.co

[PHP] RE: Searching for array keys

2001-05-04 Thread Tim Ward
if (isset($array["key"])) Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: Martin Skjöldebrand [mailto:[EMAIL PROTECTED]

[PHP] RE: Need help with Database and variables

2001-05-08 Thread Tim Ward
$result = mysql_query($db, "SELECT count(*) AS song_count FROM table_name"); if ($array = mysql_fetch_array($result)) $song_count = $array("song_count"); Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect o

RE: [PHP] Multi Dimensional Arrays?

2001-05-08 Thread Tim Ward
a recursive function to find the elements in a multi-dimensional array. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -Original Message- > From: [EMAIL

[PHP] RE: Classes and arrays

2001-05-09 Thread Tim Ward
when you reference a property of a class you don't need to say it's a variable, so use $this->item[] instead of $this->$items[$id] and it works okay. I haven't quite worked out why it went wrong in the way it did ... and that'll worry me until I do. Tim W

  1   2   3   >