php-windows Digest 11 Aug 2003 03:55:51 -0000 Issue 1864
Topics (messages 21100 through 21107):
How to preserve value ?
21100 by: Thomas Edward Lawrence
21101 by: Krishna Murali-A19032
21102 by: skate
21103 by: Thomas Edward Lawrence
Hack Q...
21104 by: jsWalter
21105 by: skate
Randomize mySQL result array
21106 by: H Marc Bower
21107 by: Ignatius Reilly
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I have three pages :
page1.php
<?
session_start() ;
session_register("value") ;
$value = 1
?>
page2.php
<?
session_start() ;
$value++ ;
?>
page3.php
<form method="POST" action="page1.php">
<?
session_start() ;
$value++ ;
?>
<input type="submit" value="Submit" name="B1">
</form>
I would like I can preserve value of $value now is 3 when I come back to
page1.php from page3.php , when I come back page1.php value of $value is now
set to 1, please help me , thanks
--- End Message ---
--- Begin Message ---
Check whether you are using PHP 3 or PHP 4
In PHP 4 you have to use $_SESSION["value"]
> -----Original Message-----
> From: Thomas Edward Lawrence [mailto:[EMAIL PROTECTED]
> Sent: Saturday, August 09, 2003 12:16 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] How to preserve value ?
>
>
> I have three pages :
>
> page1.php
> <?
> session_start() ;
> session_register("value") ;
> $value = 1
> ?>
>
> page2.php
> <?
> session_start() ;
> $value++ ;
> ?>
>
> page3.php
> <form method="POST" action="page1.php">
> <?
> session_start() ;
> $value++ ;
> ?>
> <input type="submit" value="Submit" name="B1">
> </form>
>
> I would like I can preserve value of $value now is 3 when I
> come back to
> page1.php from page3.php , when I come back page1.php value
> of $value is now
> set to 1, please help me , thanks
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
> >
> > I would like I can preserve value of $value now is 3 when I
> > come back to
> > page1.php from page3.php , when I come back page1.php value
> > of $value is now
> > set to 1, please help me , thanks
> >
> >
you also gonna have to add some extra scripting here, coz page1 is always
setting $value to 1, regardless of what sessions are going on...
try something like
if( !isset($value) )
$value = 1;
this way if the value is not set, then it'll make it 1, if it's already set
(through your sessions), it'll leave it alone...
this is providing your sessions are passing the value properly...
--- End Message ---
--- Begin Message ---
I have three pages :
page1.php
<?
session_start() ;
session_register("value") ;
$value = 1
?>
page2.php
<?
session_start() ;
$value++ ;
?>
page3.php
<form method="POST" action="page1.php">
<?
session_start() ;
$value++ ;
?>
<input type="submit" value="Submit" name="B1">
</form>
I would like I can preserve value of $value now is 3 when I come back to
page1.php from page3.php , when I come back page1.php value of $value is now
set to 1, please help me , thanks
--- End Message ---
--- Begin Message ---
Is someone trying to hack my computer?
"GET /scripts/..%255c%255c../winnt/system32/cmd.exe?/c+dir"
Any idea what this means?
walter
--- End Message ---
--- Begin Message ---
> Is someone trying to hack my computer?
>
> "GET /scripts/..%255c%255c../winnt/system32/cmd.exe?/c+dir"
>
> Any idea what this means?
>
there's a thousand and one tools that will run searches for regular
exploits. someone is trying to gain access to your computer, but unless you
have a /scripts/ directory, and possible exploitable code in there, it's not
an issue. your server will not be flagged up, as the exploit wasn't found.
if you got their IP's from the search, do a reverse look-up, and report this
info to whoever owns the IP range... checkout securityfocus.com for more
info on stuff like this...
--- End Message ---
--- Begin Message ---
This probably isn't strictly a PHP question, but I beg the indulgence of those who
know mySQL as well...
I have a result array grabbed from a mysql table. Is there a quick way to randomize
the order that the rows fall into the array instead of "as they are extracted from the
table" order?
Thank you,
Marc
-=-=-=-=-
No testimony is sufficient to establish a miracle unless the testimony be of such a
kind that its falsehood would be more miraculous than the fact which it endeavours to
establish. - David Hume
-=-=-=-=-
--- End Message ---
--- Begin Message ---
SELECT
...
ORDER BY RAND()
BTW there is a nice MySQL Windows mailing list.
hth
Ignatius
_________________________
----- Original Message -----
From: "H Marc Bower" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 10, 2003 11:46 PM
Subject: [PHP-WIN] Randomize mySQL result array
This probably isn't strictly a PHP question, but I beg the indulgence of
those who know mySQL as well...
I have a result array grabbed from a mysql table. Is there a quick way to
randomize the order that the rows fall into the array instead of "as they
are extracted from the table" order?
Thank you,
Marc
-=-=-=-=-
No testimony is sufficient to establish a miracle unless the testimony be of
such a kind that its falsehood would be more miraculous than the fact which
it endeavours to establish. - David Hume
-=-=-=-=-
--- End Message ---