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 PROTECTED] To: [EMAIL PROTECTED

Re: [PHP] Counting table fields having specific values

2003-02-27 Thread Tim Ward
= 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://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 Message - From

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 - From

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. INPUT TYPE=checkbox name=checkbox[?php echo($row[0])?] VALUE=YES then when processing ... foreach($_REQUEST[checkbox] as $checkbox) {... } Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: anders

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 [EMAIL PROTECTED] Sent

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

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 row problems I'm

Re: [PHP] nested queries/loops

2003-01-23 Thread Tim Ward
... 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 can see Tim Ward http://www.chessish.com

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 PROTECTED

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 form ../form tags around each submit/hidden pair. Tim

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: [PHP] Weird Errors

Re: [PHP] Error in variable when looping

2003-01-14 Thread Tim Ward
print form ...; printINPUT TYPE='submit' value='View details' Name='Details'; printinput type='hidden' name='SelectedItemNumber' value='{$row[Id]}'; print /form; 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

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 10:25 PM Subject: [PHP] dumb time question Ok

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

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: [PHP] checkboxes, radio

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 PROTECTED] Sent

Re: [PHP] Use of undefined constant error

2002-12-17 Thread Tim Ward
. 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 message. Tim Ward http://www.chessish.com mailto:[EMAIL

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, 2002 8:15 PM Subject

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 PROTECTED] To: Tim

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 Message

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). Tim Ward

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] How do I populate a select?

2002-12-10 Thread Tim Ward
- 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] How do I populate a select? How do I

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 - From: Phil Powell [EMAIL

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 hide URL variables

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 the text editor question

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, December 06, 2002 1:25

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

2002-12-06 Thread Tim Ward
not quite ... if the form elements are (e.g) input name='array[0]' ..., 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), etc. Tim Ward http

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

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

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

[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.com -Original Message- From: Mr

[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: No ouput until

[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 www.chessish.com -Original

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

[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

[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(tr); ... echo(input type='hidden' name='status[{$cust[id]}]' value='0'); echo(input type='checkbox' name='status[{$cust[id]}]');

[PHP] RE: redefining a function

2002-09-20 Thread Tim Ward
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 -- ...and then Tim Ward said... % % is using classes

[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: How to approach a new project?

2002-09-19 Thread Tim Ward
. 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 way to approach a new project, and would appreciate any

[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 www.chessish.com

[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 -- Is there any way to redefine or undefine

[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_VARS[] when the form is posted Tim Ward

[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 ... tdinput type=checkbox name=d_c_arr[?php echo($count++); ?]/td Tim Ward www.chessish.com -Original Message- From: Paul Maine [mailto:[EMAIL

[PHP] RE: array_unique multi-dimensional arrays

2002-08-20 Thread Tim Ward
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: array_unique multi-dimensional arrays I am trying

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

2002-08-20 Thread Tim Ward
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 It may just have been that I was not putting your sample code

[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'. Tim Ward St Ives

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

[PHP] RE: dir to array?

2002-08-01 Thread Tim Ward
= readdir($dir)) { if (($imgs != .) ($imgs != ..)) { $cnt[count($imgs)] = $cnt; is this typo in the original code? surely should be = $imgs; } else { print Cannot create array of files in directory!; } } closedir($dir); } Tim Ward www.chessish.com

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: Re: [PHP] String Question

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 Thnx a lot Martin and all, this worked. Anyway

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 Perry [SMTP:[EMAIL

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: 09 June 2002 18:29

[PHP] RE: simplicity with 2 queries..

2002-06-10 Thread Tim Ward
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 2002 04:35 To: php-general Subject: simplicity

[PHP] RE: your philosophy on php-design

2002-05-30 Thread Tim Ward
(); echo(/td/tr); echo(trtd colspan='3'); $this- Footer(); echo(/td/tr); echo(/table/body); } } you get the idea Tim Ward www.chessish.com http://www.chessish.com -- From: Wilbert Enserink [SMTP

[PHP] RE: Global variables

2002-05-30 Thread Tim Ward
What about storing them in database or (below root) flat files? Tim Ward www.chessish.com http://www.chessish.com -- From: serge gedeon [SMTP:[EMAIL PROTECTED]] Sent: 29 May 2002 14:35 To: [EMAIL PROTECTED] Subject: Global variables

[PHP] RE: Month Values in UNIX timestamps and workaround(Newbie)

2002-05-30 Thread Tim Ward
If you just want the number of seconds in each month then ... function SecondsInMonth($month, $year) { return mktime(0,0,0,$month + 1, 1, $year) - mktime(0,0,0,$month, 1, $year); } ... works, although you may need to play around with the is_dst parameter to fine tune it. Tim ward

[PHP] RE: odd class/session/db behaviour

2002-05-29 Thread Tim Ward
problem but it's something that tripped me up when I started doing OOP stuff in PHP. Tim Ward www.chessish.com http://www.chessish.com -- From: Nick Wilson [SMTP:[EMAIL PROTECTED]] Sent: 29 May 2002 09:51 To: php-general Subject: odd class/session/db

[PHP] RE: array_search in 2-d arrays

2002-05-15 Thread Tim Ward
there is no built in way to search down this tree. I think you'll need To walk the array and check the first element of each e.g. Foreach($layerDes as $count=$array) { if ($array[0] == $searchstring) { $key = $count; break; } } Tim Ward www.chessish.com http

[PHP] RE: An array of objects?

2002-05-14 Thread Tim Ward
$_SESSION[rooms][1] = array(room_name=Bob's Room, room_status=1) $_SESSION [rooms][2] = array(room_name=Jeff's Room, room_status=0) etc. then for a given room_id ... echo($_SESSION [$room_id][room_name]) and so on Tim Ward Internet Chess www.chessish.com http://www.chessish.com

[PHP] RE: textarea problem

2002-05-14 Thread Tim Ward
Are you POSTing or GETting the data? Tim Ward www.chessish.com http://www.chessish.com -- From: Enrique Vadillo [SMTP:[EMAIL PROTECTED]] Sent: 14 May 2002 01:33 To: [EMAIL PROTECTED] Subject: textarea problem Hi, I'm

RE: [PHP] problems with form/form

2002-05-10 Thread Tim Ward
I've only just picked up on this thread, but why not put each form inside a td element? i.e. table tr tdform ... /form/td tdform ... /form/td /tr /table apologies if I've misinterpreted the question Tim Ward www.chessish.com http

RE: [PHP] build array dinamicaly

2002-04-30 Thread Tim Ward
Be careful - I fell into this trap when I first started doing this sort of thing. This code will produce an extra element on your array with value logical false. You need to do ... While ($array = mysql_fetch_array($result)) $myarray[] = $array; ... to avoid this Tim Ward Internet Chess

[PHP] RE: Problem with array

2002-04-30 Thread Tim Ward
in this context. Is there any reason why you're not naming the checkboxes RG[1], RG[2], etc.? This would make everything much easier - you can then do ... Foreach ($HTTP_POST_VARS[RG] as $value) $RGs[] = $value Tim Ward Internet Chess www.chessish.com http://www.chessish.com

[PHP] RE: Array indices

2002-04-24 Thread Tim Ward
Why not just... Foreach (array_diff($array1, $array2) as $value) { $newarray[] = $value; } or am I missing something? Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: esivertsen [SMTP:[EMAIL PROTECTED]] Sent: 23 April 2002 13:09

[PHP] RE: how to get row by row from CSV file

2002-04-19 Thread Tim Ward
in php. Using fopen and while fgets may be more efficient, especially if you don't want the whole file If ($fhandle = fopen(yourfile.csv, r)) { while ($row = fgets($fhandle)) { ... // etc. } } Tim Ward Internet Chess www.chessish.com http://www.chessish.com

RE: [PHP] .inc over .php

2002-04-19 Thread Tim Ward
I've settled on .inc.php, .class.php, etc. that way you get the best of both worlds. Your files are identified as what they are and don't get sent out unparsed Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: Jason Wong [SMTP:[EMAIL PROTECTED

RE: [PHP] save html created by loop in variable

2002-04-18 Thread Tim Ward
of arrays can be really powerful for stuff like this. Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: Jason Dulberg [SMTP:[EMAIL PROTECTED]] Sent: 18 April 2002 05:27 To: [EMAIL PROTECTED] Subject: RE: [PHP] save html

[PHP] RE: simple question

2002-04-03 Thread Tim Ward
the form submits to (the action property of the form tag, which can be the same page). Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: Denis L. Menezes [SMTP:[EMAIL PROTECTED]] Sent: 02 April 2002 17:34 To: [EMAIL PROTECTED

RE: [PHP] check form - save arrays in hidden fields?

2002-03-26 Thread Tim Ward
Why in a scalar? Why not pass the array through, i.e. Foreach($test as $element) { echo(input type='hidden' name='test[]' value='$element'); } Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: Fabian Krumbholz - 2k web solutions [SMTP

[PHP] RE: Browser Detection without use of browsecap.ini file

2002-03-22 Thread Tim Ward
$HTTP_ENV_VARS[HTTP_USER_AGENT] contains this info if it's been sent Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: R'twick Niceorgaw [SMTP:[EMAIL PROTECTED]] Sent: 21 March 2002 17:06 To: [EMAIL PROTECTED] Subject

RE: [PHP] Re: Return the column names of MySQL table?

2002-03-20 Thread Tim Ward
) { echo $key : $val |; } echo(br); } } Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: Kevin Stone [SMTP:[EMAIL PROTECTED]] Sent: 19 March 2002 23:21 To: [EMAIL PROTECTED

RE: [PHP] OBJECT£ºWHAT'S THE RALATION BETWEEN A,B AND C?

2002-03-18 Thread Tim Ward
The line you've marked prints the value attribute of $a-b-a, which is a pointer to the base object ($a). You have just changed the value attribute of this to 11 and it prints 11 ... what's wrong? Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From

[PHP] RE: Invalid Argument ??? Not sure how to debug this

2002-03-18 Thread Tim Ward
Try ... If ($result = ...) { ... ... } else echo(mysql_error()); I always do querying like this anyway (without the error echo in live stuff obviously) Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: Daniel Negron/KBE [SMTP

RE: [PHP] Re: A stupid question...

2002-03-11 Thread Tim Ward
records but don't sort past the first letter then SELECT ..., LEFT(lastname, 1) AS lastname_first ... ORDER BY lastname_first or you might even be able to do ... ORDER BY LEFT(lastname, 1) you'll have to experiment with that one. Tim Ward Internet chess www.chessish.com http://www.chessish.com

RE: [PHP] Re: User accounts

2002-03-08 Thread Tim Ward
Surely an empty string is == false. In fact I'd be interested if anyone can come up with a situation where !$x doesn't return the same as empty($x) i.e. can anyone get a value of $x such that !$x !== empty($x) Tim Ward Internet Chess www.chessish.com http://www.chessish.com

RE: [PHP] Does anyone follow?

2002-03-05 Thread Tim Ward
./a); echo((. count[$ids] .) [); foreach ($ids as $id) echo($id); // need something a bit fancier here, but you get the idea echo(]br\n); } Tim Ward Internet chess www.chessish.com http://www.chessish.com -- From: jtjohnston [SMTP:[EMAIL PROTECTED

[PHP] RE: Sessions and switching between php and htm documents

2002-02-27 Thread Tim Ward
I haven't experienced this myself, but I'd have thought that if you're propagating the session via the URL rather than a cookie then it won't get added if the page isn't parsed. If it's not passed on just once it's lost. Tim Ward Internet chess www.chessish.com http://www.chessish.com

[PHP] RE: Help with showing tables in DB

2002-02-27 Thread Tim Ward
you want is something like Tables_in_dbname. Tim Ward www.chessish.com http://www.chessish.com -- From: Ron Clark [SMTP:[EMAIL PROTECTED]] Sent: 26 February 2002 21:02 To: [EMAIL PROTECTED] Subject: Help with showing tables in DB

[PHP] RE: str_replace and associative arrays

2002-02-26 Thread Tim Ward
the search and replace was performed on the string array. Tim Ward Internet chess www.chessish.com http://www.chessish.com -- From: Michael Crowl [SMTP:[EMAIL PROTECTED]] Sent: 25 February 2002 22:01 To: [EMAIL PROTECTED] Subject: str_replace

RE: [PHP] Re: php - assigning date variables

2002-02-26 Thread Tim Ward
. Tim Ward Internet chess www.chessish.com http://www.chessish.com -- From: Craig Westerman [SMTP:[EMAIL PROTECTED]] Sent: 25 February 2002 19:32 To: Lerp Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Re: php - assigning date variables

[PHP] RE: word wrapping again

2002-02-26 Thread Tim Ward
This is really an html issue. HTML will only text wrap (in a compliant browser) on white space. If you want a server side solution to solve this you'll need to break up long words with a space or line-break. Tim Ward Internet chess www.chessish.com http://www.chessish.com

RE: [PHP] overwriting PHP_SELF and PHP_AUTH_xxxx

2002-02-22 Thread Tim Ward
Forgive me if I'm treating pseudo as real but surely print trtd ... value='$cancel[$or]' ... /td; should be print trtd ... value='{$cancel[$or]}' ... /td; same goes for the array element in the sql statement Tim Ward Internet chess www.chessish.com http://www.chessish.com

[PHP] RE: timestamp confusion

2002-02-21 Thread Tim Ward
Time() returns unix timestamp (which is GMT), date() is interpreting that according to the local time zone. Tim Ward internet chess at www.chessish.com http://www.chessish.com -- From: Justin French [SMTP:[EMAIL PROTECTED]] Sent: 21 February 2002 03:21

[PHP] RE: novice question -- array_push($real[$i][$j],$s[$j]);????????

2002-02-20 Thread Tim Ward
. if you have $fred[0] = array(1,2,3); $fred[1] = array(4,5,6); array_push($fred[1], 7) will leave $fred[0] = array(1,2,3); $fred[1] = array(4,5,6,7); or array_push($fred[0], 7) will leave $fred[0] = array(1,2,3,7); $fred[1] = array(4,5,6); Tim Ward www.chessish.com http://www.chessish.com

RE: [PHP] What Do You Think?

2002-02-19 Thread Tim Ward
Timothy Taylor's and Sam Smith's are much better example of Yokshire beer. I know people who've found bottled Sam's all over the world Tim Ward www.chessish.com http://www.chessish.com -- From: Richard Crawford [SMTP:[EMAIL PROTECTED]] Sent: 15 February 2002

RE: [PHP] HTTP_POST_VARS problem

2002-02-08 Thread Tim Ward
Make the name of the select an array e.g. select name='selection[]' ... then ... foreach($HTTP_POST_VARS[selection] as $selection) Tim www.chessish.com http://www.chessish.com -- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: 08 February 2002 02:47

RE: [PHP] Limit 15 where Newest

2002-02-05 Thread Tim Ward
If (!$start) $start=0; $sql=select author, title, chapter from table order by date DESC limit $start, 15; ... and a link on the same page: echo(a href='samepage?start= . ($start + 15) . 'next/a); or something like that Tim

[PHP] RE: Initializing Array

2002-01-29 Thread Tim Ward
As far as using them is concerned they are already zero (as indeed are undefined elements). If you want force the type you'll have to step through the array. $pos[17][7][3] = 0; // will only set the value of that element, in PHP or C Tim www.chessish.com http://www.chessish.com

[PHP] RE: phpwiki save button

2002-01-24 Thread Tim Ward
What is it you actually want to do? Add the current date/time or a timestamp entered on the submitting form? See date() for the former. Once you've got your stamp in a format you want just add it to the front of the story before saving. Give us a bit more detail about what it is that isn't

[PHP] RE: One Line text boxes vs. Multiline text boxes

2002-01-24 Thread Tim Ward
Sounds to like you're not putting the value in quotes. i.e. input type=text value=fred you can get away with input type=text value=tom,dick and harry you can't. textarea's (what I assume you are referring to as multiline text boxes) are different as the value goes between the tabs and seems to be

[PHP] RE: phpwiki save button

2002-01-24 Thread Tim Ward
2002 15:01 To: Tim Ward; [EMAIL PROTECTED] Subject: Re: phpwiki save button On Thursday 24 January 2002 06:36 am, Tim Ward wrote: What is it you actually want to do? Add the current date/time or a timestamp entered on the submitting form? yes. That is exactly what I wish to do

RE: [PHP] RE: phpwiki save button

2002-01-24 Thread Tim Ward
if the table doesn't already have a field like that. Tim www.chessish.com -Original Message- From: Tim Bogart [SMTP:[EMAIL PROTECTED]] Sent: 24 January 2002 15:43 To: Tim Ward; [EMAIL PROTECTED] Subject: Re: [PHP] RE: phpwiki save button No, you're

RE: [PHP] Nobody know nothing about? Php login scripts using PHP4.01, Apache3.01 CGI on W2K

2002-01-22 Thread Tim Ward
Use html form for user input with text field for user name and password filed for password. Hold password encrypted using MySQL password() function and check login by SELECT * FROM users WHERE user='$user' AND pass=PASSWORD($password). If (mysql_num_rows($result)) login = true; Tim

[PHP] RE: file upload with story

2002-01-22 Thread Tim Ward
I found everything I needed to upload images here: http://www.php.net/manual/en/features.file-upload.php http://www.php.net/manual/en/features.file-upload.php Tim www.chessish.com http://www.chessish.com -- From: will hives [SMTP:[EMAIL PROTECTED]] Sent: 21

[PHP] RE: Printer funtions

2002-01-22 Thread Tim Ward
Why would you expect these functions to do anything on the client machine? These are for printers attached to the server. Tim www.chessish.com http://www.chessish.com -- From: James Mclean [SMTP:[EMAIL PROTECTED]] Sent: 21 January 2002 23:48 To:

RE: [PHP] How to call Calling Non-Existing function

2002-01-22 Thread Tim Ward
This generates a parse error if Draw_Table() doesn't exist rather than returning false, unless there's something in my set up that's different to yours. Tim www.chessish.com http://www.chessish.com -- From: val petruchek [SMTP:[EMAIL PROTECTED]] Sent: 21

RE: [PHP] RE: Printing structure and data of array

2002-01-22 Thread Tim Ward
); } echo(/li) } echo(/ul); } // end of fn ShowArray Tim www.chessish.com -Original Message- From: Sandeep Murphy [SMTP:[EMAIL PROTECTED]] Sent: 22 January 2002 12:01 To: 'Tim Ward'; PHP List Subject: RE: [PHP] RE: Printing structure

RE: [PHP] RE: Printing structure and data of array

2002-01-22 Thread Tim Ward
string; if this isn't what you're trying to do I apologise for misinterpreting the question 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

  1   2   3   >