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
= 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
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
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
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
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
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
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
...
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
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
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
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
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
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
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
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
. 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
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
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
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
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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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]}]');
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
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
.
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
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
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
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
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
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
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
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
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
= 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
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
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
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
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
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
();
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
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
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
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
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
$_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
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
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
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
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
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
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
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
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
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
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
$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
)
{ 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
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
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
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
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
./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
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
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
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
.
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
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
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
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
. 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
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
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
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
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
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
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
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
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
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
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
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:
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
);
}
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
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 - 100 of 228 matches
Mail list logo