php-windows Digest 28 Nov 2003 08:21:38 -0000 Issue 2019
Topics (messages 22223 through 22237):
Code to splite page
22223 by: Lawrence
22225 by: Croskerry, Dan
22226 by: Ignatius Reilly
22227 by: Luis Moreira
Re: Redirection
22224 by: Donatas
i need help
22228 by: Hasan Barış Karayel
22229 by: Donatas
22230 by: Hasan Barış Karayel
22231 by: Donatas
22232 by: Hasan Barış Karayel
22233 by: Mike Brum
22234 by: Disko_kex
22235 by: Hasan Barış Karayel
Need help with session problem
22236 by: Alan Leff
22237 by: Eric COLINET
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 need the code to splite page , I have 50 products , I want splite 10
products per page , if anyone has that , please show me , thank you
--- End Message ---
--- Begin Message ---
Hi Lawrence,
I'm assuming you are pulling these products from a mysql db. If so you can
use the LIMIT clause.
$sql = "SELECT * FROM table LIMIT 1, 10"; //where these integers represent
row_count, OFFSET
Read more here http://www.mysql.com/doc/en/SELECT.html
You can substitute a variable for the row_count so that you can page back
and forth via get vars.
$sql = "SELECT * FROM table LIMIT ".$startat.", 10";
If you are pulling from MSSQL then there is no limit functionality and you
have to code the offset yourself. This is a pain and I don't have that chunk
of code on hand right now. Maybe someone else does...
Dan
-----Original Message-----
From: Lawrence [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 8:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Code to splite page
I need the code to splite page , I have 50 products , I want splite 10
products per page , if anyone has that , please show me , thank you
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
You may profitably investigate the PEAR HTML_Pager class.
http://pear.php.net/manual/en/package.html.pager.intro.php
Ignatius
_________________________
----- Original Message -----
From: "Lawrence" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 14:43
Subject: [PHP-WIN] Code to splite page
> I need the code to splite page , I have 50 products , I want splite 10
> products per page , if anyone has that , please show me , thank you
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Not sure I understand what you want.
It seems simple programming, though.
Be a little more specific...
Luis
----- Original Message -----
From: "Lawrence" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 1:43 PM
Subject: [PHP-WIN] Code to splite page
> I need the code to splite page , I have 50 products , I want splite 10
> products per page , if anyone has that , please show me , thank you
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Another solution would be to use output buffering.
read the manual on ob_start ();
Cheers,
Donny
Stuart wrote:
PETCOL wrote:
<header>
<script language="javascript1.2">
function browserRedirect()
{
var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
if(ns4) URLStr = "http://www.php.net";
else if(ns6) URLStr = "http://www.php.net";
else if(ie4) URLStr = "http://www.php.net";
else URLStr = "http://www.php.net";
location = URLStr;
}
</script>
</header>
In the
<body>
echo "<script language='javascript'>\n";
echo "browserRedirect()\n";
echo "</script>\n";
exit();
</body>
You might have a better cleaner suggestion?
If you're going to go this way (which as Rasmus pointed out is
generally very bad UI design) you might find the following a lot
cleaner...
<script language="javascript">
location.href = 'http://www.php.net/';
</script>
There is no reason to do any browser detection, especially if you
don't actually change anything based on what browser it thinks it is.
The best solution however would be to reorganise the script so it
decides whether to redirect before it outputs anything to the browser.
--- End Message ---
--- Begin Message ---
Hi
i am new in PHP...
i made very a simple code but it did not work properly...
this is my code:
<!-------------------------- index1.php"
-------------------------------------------->
<html>
<head><title>::WaterBike Team Istanbul - ITU::</title></head>
<body bgcolor = "black">
<font color = white>
<a href="index1.php?username=baris&password=bkarayel">Show my password</a>
<?php
echo("<br>Your username = ". $username."<br>");
echo("Your password = ". $password."<br>");
?>
</font>
</body>
</html>
when i click the link, i expect this output:
Show my password
Your username : baris
Your password : bkarayel
But the output is:
Show my password
Your usename :
Your password :
what is the problem?(note: my system is windows 98 - apache 2.0.48 - php
4.3.4)
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
--- End Message ---
--- Begin Message ---
It doesn't work coz you need to do it this way:
echo("<br>Your username = ". *$_GET ['username']*."<br>");
echo("Your password = ". *$_GET ['password']*."<br>");
you use $_GET ['']; superglobal array for values passed via link or form
where type is get or $_POST ['']; if you get info from a form via post
method.
Cheers,
Donny
Hasan Barış Karayel wrote:
Hi
i am new in PHP...
i made very a simple code but it did not work properly...
this is my code:
<!-------------------------- index1.php"
-------------------------------------------->
<html>
<head><title>::WaterBike Team Istanbul - ITU::</title></head>
<body bgcolor = "black">
<font color = white>
<a href="index1.php?username=baris&password=bkarayel">Show my
password</a>
<?php
echo("<br>Your username = ". $username."<br>");
echo("Your password = ". $password."<br>");
?>
</font>
</body>
</html>
when i click the link, i expect this output:
Show my password
Your username : baris
Your password : bkarayel
But the output is:
Show my password
Your usename :
Your password :
what is the problem?(note: my system is windows 98 - apache 2.0.48 -
php 4.3.4)
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
--- End Message ---
--- Begin Message ---
Hi,
i am new in PHP...
i made very a simple code but it did not work properly...
this is my code:
<!-------------------------- index1.php"
-------------------------------------------->
<html>
<head><title>::WaterBike Team Istanbul - ITU::</title></head>
<body bgcolor = "black">
<font color = white>
<a href="index2.php?username=baris&password=bkarayel">Show my password</a>
<?php
echo("<br>Your username = ". $username."<br>");
echo("Your password = ". $password."<br>");
?>
</font>
</body>
</html>
when i click the link, i expect this output:
Show my password
Your username : baris
Your password : bkarayel
But the output is:
Show my password
Your usename :
Your password :
what is the problem?(note: my system is windows 98 - apache 2.0.48 - php
4.3.4)
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
--- End Message ---
--- Begin Message ---
Disregard those stars... I guess this is a bug in my mail app or php-win
mailing list, it should have been bold instead.
Donatas wrote:
It doesn't work coz you need to do it this way:
echo("<br>Your username = ". *$_GET ['username']*."<br>");
echo("Your password = ". *$_GET ['password']*."<br>");
you use $_GET ['']; superglobal array for values passed via link or
form where type is get or $_POST ['']; if you get info from a form via
post method.
Cheers,
Donny
Hasan Barış Karayel wrote:
Hi
i am new in PHP...
i made very a simple code but it did not work properly...
this is my code:
<!-------------------------- index1.php"
-------------------------------------------->
<html>
<head><title>::WaterBike Team Istanbul - ITU::</title></head>
<body bgcolor = "black">
<font color = white>
<a href="index1.php?username=baris&password=bkarayel">Show my
password</a>
<?php
echo("<br>Your username = ". $username."<br>");
echo("Your password = ". $password."<br>");
?>
</font>
</body>
</html>
when i click the link, i expect this output:
Show my password
Your username : baris
Your password : bkarayel
But the output is:
Show my password
Your usename :
Your password :
what is the problem?(note: my system is windows 98 - apache 2.0.48 -
php 4.3.4)
--- End Message ---
--- Begin Message ---
Hi,
i am new in PHP...
i made very a simple code but it did not work properly...
this is my code:
<!-------------------------- index1.php"
-------------------------------------------->
<html>
<head><title>::WaterBike Team Istanbul - ITU::</title></head>
<body bgcolor = "black">
<font color = white>
<a href="index1.php?username=baris&password=bkarayel">Show my password</a>
<?php
echo("<br>Your username = ". $username."<br>");
echo("Your password = ". $password."<br>");
?>
</font>
</body>
</html>
when i click the link, i expect this output:
Show my password
Your username : baris
Your password : bkarayel
But the output is:
Show my password
Your usename :
Your password :
what is the problem?(note: my system is windows 98 - apache 2.0.48 - php
4.3.4)
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
--- End Message ---
--- Begin Message ---
Do you have register_globals on?
If not, try this:
<?php
echo "<br>Your username = " . $HTTP_GET_VARS['username'] . "<br>";
echo "Your password = " . $HTTP_GET_VARS['password'] . "<br>";
?>
Regards
Mike
-----Original Message-----
From: Hasan Barış Karayel [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2003 11:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] i need help
Hi
i am new in PHP...
i made very a simple code but it did not work properly...
this is my code:
<!-------------------------- index1.php"
-------------------------------------------->
<html>
<head><title>::WaterBike Team Istanbul - ITU::</title></head> <body bgcolor
= "black"> <font color = white> <a
href="index1.php?username=baris&password=bkarayel">Show my password</a>
<?php echo("<br>Your username = ". $username."<br>"); echo("Your password =
". $password."<br>"); ?> </font> </body> </html>
when i click the link, i expect this output:
Show my password
Your username : baris
Your password : bkarayel
But the output is:
Show my password
Your usename :
Your password :
what is the problem?(note: my system is windows 98 - apache 2.0.48 - php
4.3.4)
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Try use $HTTP_GET_VARS["password"] or $_GET["password"]
> -----Original Message-----
> From: Hasan Barış Karayel [mailto:[EMAIL PROTECTED]
> Sent: den 27 november 2003 17:26
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] i need help
>
> Hi
> i am new in PHP...
> i made very a simple code but it did not work properly...
> this is my code:
>
> <!-------------------------- index1.php"
> -------------------------------------------->
> <html>
> <head><title>::WaterBike Team Istanbul - ITU::</title></head>
> <body bgcolor = "black">
> <font color = white>
> <a href="index1.php?username=baris&password=bkarayel">Show my
password</a>
> <?php
> echo("<br>Your username = ". $username."<br>");
> echo("Your password = ". $password."<br>");
> ?>
> </font>
> </body>
> </html>
>
> when i click the link, i expect this output:
> Show my password
> Your username : baris
> Your password : bkarayel
>
> But the output is:
> Show my password
> Your usename :
> Your password :
>
> what is the problem?(note: my system is windows 98 - apache 2.0.48 -
php
> 4.3.4)
>
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
thanks...
it works...
From: Donatas <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] i need help
Date: Thu, 27 Nov 2003 18:28:26 +0200
It doesn't work coz you need to do it this way:
echo("<br>Your username = ". *$_GET ['username']*."<br>");
echo("Your password = ". *$_GET ['password']*."<br>");
you use $_GET ['']; superglobal array for values passed via link or form
where type is get or $_POST ['']; if you get info from a form via post
method.
Cheers,
Donny
Hasan Barış Karayel wrote:
Hi
i am new in PHP...
i made very a simple code but it did not work properly...
this is my code:
<!-------------------------- index1.php"
-------------------------------------------->
<html>
<head><title>::WaterBike Team Istanbul - ITU::</title></head>
<body bgcolor = "black">
<font color = white>
<a href="index1.php?username=baris&password=bkarayel">Show my password</a>
<?php
echo("<br>Your username = ". $username."<br>");
echo("Your password = ". $password."<br>");
?>
</font>
</body>
</html>
when i click the link, i expect this output:
Show my password
Your username : baris
Your password : bkarayel
But the output is:
Show my password
Your usename :
Your password :
what is the problem?(note: my system is windows 98 - apache 2.0.48 - php
4.3.4)
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail
--- End Message ---
--- Begin Message ---
I'm running php 4.2.3 and apache 1.3.27 on a Windows 2000 server. If the
server clock is say a week older than the client computers, the session
functions stop working.
Does anyone know what's going on here?
--- End Message ---
--- Begin Message ---
Hi,
I run into the same problem, it is not apache related but Internet explorer
related.
In fact cookies are not stored in relative but in absolute time and for
that they expire once setted.
For me an upgrade on the client ie was sufficient or at least setting the
date to the correct value ;)
Regards,
Eric
At 22:14 27/11/2003, Alan Leff wrote:
I'm running php 4.2.3 and apache 1.3.27 on a Windows 2000 server. If the
server clock is say a week older than the client computers, the session
functions stop working.
Does anyone know what's going on here?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---