php-general Digest 4 Jun 2006 16:16:38 - Issue 4166
Topics (messages 237334 through 237347):
Re: Delete
237334 by: benifactor
237335 by: Rabin Vincent
237337 by: George Babichev
237338 by: Larry Garfield
237339 by: Rabin Vincent
237341 by:
Make each button a separate form, with the id as a hidden value. Like so:
div
form method='post'
pMy first entry/p
input type='hidden' name='id' value='1' /
input type='submit' value='Delete' /
/form
/div
div
form method='post'
pMy second entry/p
input type='hidden' name='id' value='2' /
input
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote:
Make each button a separate form, with the id as a hidden value. Like so:
div
form method='post'
pMy first entry/p
input type='hidden' name='id' value='1' /
input type='submit' value='Delete' /
/form
/div
[snip]
You may find it easier to
Hi,
I have a set of nodes. Each node has a parent and so the set can be thought
of as a tree. I want to show that tree somehow on a webpage, served by PHP.
I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an
output of DIVs or tablecells, showing the nodes and their
At 10:53 PM -0700 6/3/06, George Babichev wrote:
Thank you for the help guys, but the I guess I kinda have another question.
So I do assign an id to each blog post, and it is auto_increment, so in my
blog delete page, it would display all the blog title's and a delete button
nex to it. So lets say
At 2:07 PM +0200 6/4/06, Niels wrote:
Hi,
I have a set of nodes. Each node has a parent and so the set can be thought
of as a tree. I want to show that tree somehow on a webpage, served by PHP.
I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an
output of DIVs or
On Sunday 04 June 2006 14:58, tedd wrote:
At 2:07 PM +0200 6/4/06, Niels wrote:
Hi,
I have a set of nodes. Each node has a parent and so the set can be
thought of as a tree. I want to show that tree somehow on a webpage,
served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm
At 3:03 PM +0200 6/4/06, Niels wrote:
On Sunday 04 June 2006 14:58, tedd wrote:
At 2:07 PM +0200 6/4/06, Niels wrote:
Hi,
I have a set of nodes. Each node has a parent and so the set can be
thought of as a tree. I want to show that tree somehow on a webpage,
served by PHP. I cannot use
On Sunday 04 June 2006 15:30, tedd wrote:
[snip]
You can dynamically generate a table and place text (and/or color) the
cells that are nodes -- that would be my approach. You would need to know
the width and depth of the tree and then just fill in the cells that are
nodes.
hth's
tedd
2006/6/4, Niels [EMAIL PROTECTED]:
Hi,
I have a set of nodes. Each node has a parent and so the set can be
thought
of as a tree. I want to show that tree somehow on a webpage, served by
PHP.
I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an
output of DIVs or
You could do it by dynamically generating an image.
Mike
Niels wrote:
On Sunday 04 June 2006 15:30, tedd wrote:
[snip]
You can dynamically generate a table and place text (and/or color) the
cells that are nodes -- that would be my approach. You would need to know
the width and depth of
On Sunday 04 June 2006 18:37, Mike Bellerby wrote:
You could do it by dynamically generating an image.
Mike
[snip]
Yes. But how? I've settled for a simpler solution -- see my answer to Martin
Alterisio.
Thanks,
Niels
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hi!
On Sunday 04 June 2006 18:13, Martin Alterisio wrote:
[snip]
I had a similar problem that, although it was with a binary tree, it can
be used with your tree. PHP doesn't like too much the use of recursion,
but this time recursion is the way to go (if you want to keep the code
Well, if you're asking for some recommendation on how to show it, I
would suggest to use lists (either ordered -OL- or unordered -UL-
depends on you), or maybe even data-lists (DL), so you would get
+- parent 1
| +- child 1
| \- child 2
+- parent 2
\- sub-parent1
+-
2006/6/4, Niels [EMAIL PROTECTED]:
Hi!
On Sunday 04 June 2006 18:13, Martin Alterisio wrote:
[snip]
I had a similar problem that, although it was with a binary tree, it can
be used with your tree. PHP doesn't like too much the use of recursion,
but this time recursion is the way to go (if
At 3:38 PM +0200 6/4/06, Niels wrote:
On Sunday 04 June 2006 15:30, tedd wrote:
[snip]
You can dynamically generate a table and place text (and/or color) the
cells that are nodes -- that would be my approach. You would need to know
the width and depth of the tree and then just fill in the
Hi,
On Sunday 04 June 2006 19:02, Martin Alterisio wrote:
[snip]
Sorry, I can't show you the code. Anyway you don't seem to need it. One
recommendation, don't rely on global vars, look at this:
Quite right, I'd have gotten around to fixing that later.
Thank you for your answer, I appreciate
On Sunday 04 June 2006 03:11, Rabin Vincent wrote:
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote:
Make each button a separate form, with the id as a hidden value. Like
so:
div
form method='post'
pMy first entry/p
input type='hidden' name='id' value='1' /
input type='submit'
Hi,
On Sunday 04 June 2006 19:08, tedd wrote:
At 3:38 PM +0200 6/4/06, Niels wrote:
On Sunday 04 June 2006 15:30, tedd wrote:
[snip]
You can dynamically generate a table and place text (and/or color) the
cells that are nodes -- that would be my approach. You would need to
know the width
Yes, that checkbox idea is exactly what I was thinking about. Exept I have
no idea how my program would tell one checkbox from the other, and delete
the wrong thing...
On 6/4/06, tedd [EMAIL PROTECTED] wrote:
At 10:53 PM -0700 6/3/06, George Babichev wrote:
Thank you for the help guys, but the
Hi gang:
Here's your opportunity to pound me again for not knowing the basics of php.
I vaguely remember something like this being discussed a while back, but can't
find the reference.
In any event, if one uses --
for ($i=a; $iz; $i++)
{
echo($i);
}
-- it stops at y
But, if you use
At 10:30 AM -0700 6/4/06, George Babichev wrote:
Yes, that checkbox idea is exactly what I was thinking about. Exept I have no
idea how my program would tell one checkbox from the other, and delete the
wrong thing...
George:
You're going to have to play around with forms and find out how
At 7:26 PM +0200 6/4/06, Niels wrote:
If I were to make a real tree, I wouldn't use a table. It's too difficult
to manage IMO. I'd probably look for a generic graph algorithm somewhere,
and try some dhtml voodoo with flying DIVs.
Thanks again,
Niels
Niels:
The below link may not at first look
On Sunday 04 June 2006 19:49, tedd wrote:
At 7:26 PM +0200 6/4/06, Niels wrote:
If I were to make a real tree, I wouldn't use a table. It's too
difficult to manage IMO. I'd probably look for a generic graph algorithm
somewhere, and try some dhtml voodoo with flying DIVs.
Thanks again,
Niels
tedd wrote:
Hi gang:
Here's your opportunity to pound me again for not knowing the basics of php.
I vaguely remember something like this being discussed a while back, but can't
find the reference.
In any event, if one uses --
for ($i=a; $iz; $i++)
{
echo($i);
}
-- it stops at y
2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]:
tedd wrote:
Hi gang:
Here's your opportunity to pound me again for not knowing the basics of
php.
I vaguely remember something like this being discussed a while back, but
can't find the reference.
In any event, if one uses --
for ($i=a; $iz;
At 8:00 PM +0200 6/4/06, Niels wrote:
Using a combination of css and php will do what you want, I'm sure of it.
I want world peace...
Well, if we were all programming php, we wouldn't have any war, but we wouldn't
have any peace either. :-)
tedd
--
Martin Alterisio wrote:
2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]:
tedd wrote:
Hi gang:
Here's your opportunity to pound me again for not knowing the basics of
php.
I vaguely remember something like this being discussed a while back,
but
can't find the reference.
In any event, if one
On Sunday 04 June 2006 20:39, tedd wrote:
At 8:00 PM +0200 6/4/06, Niels wrote:
Using a combination of css and php will do what you want, I'm sure of
it.
I want world peace...
Well, if we were all programming php, we wouldn't have any war, but we
wouldn't have any peace either. :-)
2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]:
Martin Alterisio wrote:
2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]:
tedd wrote:
Hi gang:
Here's your opportunity to pound me again for not knowing the basics
of
php.
I vaguely remember something like this being discussed a while back,
At 11:08 AM -0700 6/4/06, Rasmus Lerdorf wrote:
tedd wrote:
But, if you use --
for ($i=a; $i=z; $i++)
{
echo($i);
}
-- it prints considerably more characters after z than what one would
normally expect -- why is that?
Just stopping at z would seem to make more sense, wouldn't it? After
At 8:59 PM +0200 6/4/06, Niels wrote:
On Sunday 04 June 2006 20:39, tedd wrote:
At 8:00 PM +0200 6/4/06, Niels wrote:
Using a combination of css and php will do what you want, I'm sure of
it.
I want world peace...
Well, if we were all programming php, we wouldn't have any war, but we
tedd wrote:
But, what brothers me about the routine, is that is DOES print z where it is supposed
to. In other words, the characters a-z are output before continuing with aa and so on. The
operation doesn't end with z.
Your condition for the loop to continue is $i=z.
When $i = y it will
Martin Alterisio wrote:
Still:
anything ++anything
should be true, or at least that's what they taught me on abstract data
types design, and I think they're right (at least this time)
In loosely typed languages that is not always true. Operators have to
guess at the type and try to do what
2006/6/4, Rasmus Lerdorf [EMAIL PROTECTED]:
Martin Alterisio wrote:
Still:
anything ++anything
should be true, or at least that's what they taught me on abstract data
types design, and I think they're right (at least this time)
In loosely typed languages that is not always true.
Martin Alterisio wrote:
I still don't see why this functionality should be a native operator of
the language.
It doesn't seem natural that ++ operator understands that the string
could be an enumeration of some kind. I believe that such things should
be left to the coder who knows what the
At 12:27 PM -0700 6/4/06, Rasmus Lerdorf wrote:
tedd wrote:
But, what brothers me about the routine, is that is DOES print z where it
is supposed to. In other words, the characters a-z are output before
continuing with aa and so on. The operation doesn't end with z.
Your condition for the loop
At 12:40 PM -0700 6/4/06, Rasmus Lerdorf wrote:
For example, this also works:
$filename = file1;
$filename++;
echo $filename;
You would get file2 from this. Think about the amount of code you would
need to write in C to make that work?
I would rather not. :-)
tedd
--
tedd wrote:
At 12:27 PM -0700 6/4/06, Rasmus Lerdorf wrote:
tedd wrote:
But, what brothers me about the routine, is that is DOES print z where it is supposed
to. In other words, the characters a-z are output before continuing with aa and so on. The
operation doesn't end with z.
Your
At 1:09 PM -0700 6/4/06, Rasmus Lerdorf wrote:
I agree with [1] and [2], but [3] is where we part company. You see, if you
are right, then aaa would also be less than z, but that doesn't appear so.
Of course it is.
php -r 'echo aaa z;'
1
You missed the point, why does --
for ($i=a; $i=z;
On Sun, 2006-06-04 at 16:45, tedd wrote:
At 1:09 PM -0700 6/4/06, Rasmus Lerdorf wrote:
I agree with [1] and [2], but [3] is where we part company. You see, if you
are right, then aaa would also be less than z, but that doesn't appear
so.
Of course it is.
php -r 'echo aaa z;'
1
On Sun, 2006-06-04 at 16:53, Robert Cummings wrote:
-- not continue past aaa? Clearly, if aaa is less than z then why
does the loop stop at yz?
Because right after 'yz' there is 'zz' and 'z' is neither less than nor
equal to 'zz'.
Err, that should say 'zz' is neither less than nor
On Sun, 2006-06-04 at 15:10, Martin Alterisio wrote:
Still:
anything ++anything
should be true, or at least that's what they taught me on abstract data
types design, and I think they're right (at least this time)
There's always limitations :)
int main( char *argv[], int argc )
{
int i
Hi,
Here is a simple script:
? // BEGIN OF A SCRIPT
/* #1 */ ini_set('session.gc_maxlifetime', '3');
/* #2 */ ini_set('session.gc_probability',1);
/* #3 */ ini_set('session.gc_divisor',1);
/* #4 */ sleep(5);
/* #5 */ session_start();
$sessvar = empty;
if (!isset($_SESSION['a_sess_string'])) { /*
On Sunday 04 June 2006 15:04, tedd wrote:
Yes, it is my contention that strings are numerical -- you don't store A
in memory, you store 0100 001, or ASCII DEC 65.
In a low-level language like C, that matters. One doesn't have strings, one
has numbers that happen to map to a symbol.
In PHP
clip
There will always be edge cases. Being able to
increment
strings is pretty handy when you need to create
sequences for unique file
and directory names.
For example, this also works:
$filename = file1;
$filename++;
echo $filename;
You would get file2 from this. Think about
At 4:53 PM -0400 6/4/06, Robert Cummings wrote:
On Sun, 2006-06-04 at 16:45, tedd wrote:
-- not continue past aaa? Clearly, if aaa is less than z then why
does the loop stop at yz?
Because right after 'yz' there is 'zz' and 'z' is neither less than nor
equal to 'zz'.
and
At 4:37 PM -0500
Eclipse - 3.1.2
Linux - 2.6.16-1.2111_FC4
PHP - 5.1.2, I built it.
DBG - 2.13.1, I tried the binary, then built it on my own
Apache - 2.0.55, I built it. PHP is running as a module but I've
configured Eclipse to use the standard PHP5 executable instead.
I wonder if anyone has
tedd wrote:
At 1:09 PM -0700 6/4/06, Rasmus Lerdorf wrote:
I agree with [1] and [2], but [3] is where we part company. You see, if you are right, then
aaa would also be less than z, but that doesn't appear so.
Of course it is.
php -r 'echo aaa z;'
1
You missed the point, why does --
for
Larry Garfield wrote:
On Sunday 04 June 2006 15:04, tedd wrote:
Yes, it is my contention that strings are numerical -- you don't store A
in memory, you store 0100 001, or ASCII DEC 65.
In a low-level language like C, that matters. One doesn't have strings, one
has numbers that happen to
Are you actually hitting this race condition in the real world? With a
decently long maxlifetime setting I can't really see this being a
realistic problem. Remember the timer is reset on every access.
-Rasmus
BNR - IT Department wrote:
Hi,
Here is a simple script:
? // BEGIN OF A SCRIPT
Hi Guys,
I know this may sound fundamental to some of you, but do you know any
way of explicitly flushing out stream buffers off to the socket using
fsockopen()/fputs() combos? Hope to hear from you soon.
Note: I'm not using http, and I'm connecting to some other arbitrary
port other than
Ok, here's my issue that I have.
Inside my database I have something that look's like this
idserveridcabinetidect...
-
1 server11
2 server21
3 server31
I am trying to
Just to clarify a little more, I want the output to do something like
this...
--
| Cabinet 1 |
--
Server 1
Server 2
Server 3
and so forth...
- Original Message -
From: Rob W. [EMAIL PROTECTED]
To:
Rob W. wrote:
Ok, here's my issue that I have.
Inside my database I have something that look's like this
idserveridcabinetidect...
-
1 server11
2 server21
3 server31
That worked. Thanks.
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Rob W. [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Sunday, June 04, 2006 10:59 PM
Subject: Re: [PHP] Displaying data a certian way.
Rob W. wrote:
Ok, here's my issue that I have.
Inside my
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote:
Only if delete.php is a confirmation page. Never ever ever have a delete
function that operates solely by GET.
Here's why: http://thedailywtf.com/forums/thread/66166.aspx
Yes, I've seen that one before. IMO the main problem there
is the
On Monday 05 June 2006 00:41, Rabin Vincent wrote:
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote:
Only if delete.php is a confirmation page. Never ever ever have a
delete function that operates solely by GET.
Here's why: http://thedailywtf.com/forums/thread/66166.aspx
Yes, I've
58 matches
Mail list logo