[PHP] Re: input on sessions vs cookies

2007-02-24 Thread Fahad Pervaiz

#ORIGINAL##
i would like your input on session vs cookies regarding login data like
usernames/passwords ect...
END ORIGINAL


  - Main difference is that cookies are stored on the client machine and
  session is maintained on server machine.
  - Cookies can store information for longer period of time even if
  client leaves website whereas session is destroyed as soon as browser is
  closed
  - It is not adivsable to store passwords in cookies until unless you
  are using strong encryption algorithm
  - Session can also be hijacked by getting session id of an
  authenticated user
  - If you only want to use session or cookies use both. Store username
  in cookie so that when user visits your website later, you can prefill the
  username field. Store username in session for small period of time so that
  when user exits the session is destroyed
  - To ensure best security use database as well. Store IP, Session ID,
  username, login time. After every few minutes you can re authenticate the
  user against these parameters.

--
Regards
Fahad Pervaiz www.ecommerce-xperts.com
(Shopping Cart Applications, Framework
for Multilingual Web Sites, Web Designs)


Re: [PHP] input on sessions vs cookies

2007-02-24 Thread benifactor

as of right now, when the user logs in, i have a cookie storing username...
then on all of the pages i need data i have it query the database and using
the cookie data to retrieve user information.. is there a more secure way to
do this?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OT - FC6 as Web Server

2007-02-24 Thread Chris

I just got a plain FC6 server running. Anyone here who configured a FC6 for
several domains with mail, ftp, virtual domains etc?


I haven't done it with FC6 but have with previous versions of redhat as 
far back as 6.2 (I'm sure someone else will say they've done it for 
longer :P).


What does this have to do with php? I have absolutely no idea...

If you're having specific issues, try a more appropriate list.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] input on sessions vs cookies

2007-02-24 Thread tedd
i would like your input on session vs cookies regarding login data 
like usernames/passwords ect...



usernames/passwords ? Session yes, cookies no.

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] input on sessions vs cookies

2007-02-24 Thread Robert Cummings
On Sat, 2007-02-24 at 17:48 -0800, benifactor wrote:
> i would like your input on session vs cookies regarding login data like 
> usernames/passwords ect...

How are you differentiating sessions vs cookies? Sessions are often
implemented USING cookies. If you mean sessions using a session ID in
the URL, versus using cookies to save actual user info then you are
already confused. Cookies should use the same mechanism as a URL session
ID. That is to say, they should store a unique identifier that can be
used to lookup the user's actual information. In this way the data that
can be manipulated by the dark forces is limited to one value... namely
the unique identifier.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] input on sessions vs cookies

2007-02-24 Thread benifactor
i would like your input on session vs cookies regarding login data like 
usernames/passwords ect...

RE: [PHP] Include file path.. please help im newby

2007-02-24 Thread Peter Lauri
Include path and include() function is different things.

Include path: this is paths where PHP will look for files tried to be
included if it doesn't exist in script directory. If you do
include("afile.php") and afile.php doesn't exist in the same directory as
where your script that is calling the include is. Then it will first look in

.
/include
/usr/lib/php

Take a look here http://www.php.net/include to read more about the include
function in PHP.

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free


-Original Message-
From: StainOnRug [mailto:[EMAIL PROTECTED] 
Sent: Sunday, February 25, 2007 12:57 AM
To: php-general@lists.php.net
Subject: [PHP] Include file path.. please help im newby


Hello I am a beginner at PHP. I searched for my ? but couldn't pinpoint it..
My question is,  How do I upload include files onto my website include
directory. Im hosted through Yahoo, I am not running a server on my
computer. When I check out my PHP info it tells me the include dir is
include path .:/include:/usr/lib/php.. how do I acess this folder to put
files in it so that I can take advantage of the include functions on my PHP
scripts. Thank you sooo much!
-- 
View this message in context:
http://www.nabble.com/Include-file-path..-please-help-im-newby-tf3285344.htm
l#a9138696
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Include file path.. please help im newby

2007-02-24 Thread StainOnRug

Hello I am a beginner at PHP. I searched for my ? but couldn’t pinpoint it..
My question is,  How do I upload include files onto my website include
directory. Im hosted through Yahoo, I am not running a server on my
computer. When I check out my PHP info it tells me the include dir is
include path .:/include:/usr/lib/php.. how do I acess this folder to put
files in it so that I can take advantage of the include functions on my PHP
scripts. Thank you sooo much!
-- 
View this message in context: 
http://www.nabble.com/Include-file-path..-please-help-im-newby-tf3285344.html#a9138696
Sent from the PHP - General mailing list archive at Nabble.com.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Detailed PHP User SPL documentation?

2007-02-24 Thread Kevin Waterson
This one time, at band camp, Erik Franzén <[EMAIL PROTECTED]> wrote:
 
> I can only find http://www.php.net/~helly/php/ext/spl which is nice, but
> for better understanding how to use them I am looking for detailed
> information how to use them. More comprehensive documentation with
> examples...?
> 
> Does it exist?

http://phpro.org/tutorials/Introduction-to-SPL.html

Kevin

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Larry Garfield
What I don't understand is why you're getting kind in the first place at all.  
The form you're referring to, I presume, is this one (simplified HTML to 
avoid word wrapping in email):



Regionen suchen mit ...


 
Verband: Fussballverband Region Zrich (FVRZ)  



- Alle -
Gel�cht
Eingetragen
Gltig





From that, you shouldn't be submitting a kind variable either way.  All I can 
think of is the PHP_SELF submission, which would include the same GET query 
as you used to get to that page.  I don't recall off hand if PHP_SELF 
includes the full URI or not.  

Try this: 

print_r($_GET);
print_r($_POST);
print_r($_REQUEST);

Yes, you can end up with both a GET and a POST.  (I'm not sure if it's 
technically legal in the HTTP standard, but it can happen in practice, IIRC.)  
My best guess at the moment is that "kind" is ending up in the wrong one 
somehow.


On Saturday 24 February 2007 4:51 am, Otto Wyss wrote:
> On the page
>
> http://www.orpatec.ch/turniere/5erfussball/index.php?page=bvallist.php&kind
>=regions
>
>
> I have a form with method="post" and action=" ?>". While it works fine this way, as soon as I change the form to
> method="get" it looses the parameter "kind" when I change e.g. the
> second parameter from "-Alle-" to "Gültig". Has anybody an idea why it
> works with POST but not with GET?
>
> 
> ...
>   
>
> O. Wyss

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Detailed PHP User SPL documentation?

2007-02-24 Thread Erik Franzén
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

SPL have been aorund for a while now, and it is a great tool for a php
programmer. However, can anyone point me towards more detailed
php-documentation about how to use the SPL Classes?

I can only find http://www.php.net/~helly/php/ext/spl which is nice, but
for better understanding how to use them I am looking for detailed
information how to use them. More comprehensive documentation with
examples...?

Does it exist?

Thanks
/Erik
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (MingW32)

iQEVAwUBReCDFC7mbizvza/NAQKnkQf/QtYAMGJT6+7dambArxVg+ubCrQJOeo4d
PFTQkAlICqDikE3TfFzzMbiU1VgBJ/iQ3j6+/pE5chGlQP8AG/uMxx84gWR3KZ38
un4R2ne+joGcSOpGDFtH9D4+e0hAWvvhTBi3Oe+cnPk2xa/KiEOldjg2mJ/JmHqu
H0GIQ58d5BtTI1Oab2xL33gVeL7GH39x7Y3Q23juJvYHiTmYzWeGk9j3BOf7zbFO
K17AcA68MRabqqVk1MVWSAtfcB378cPI2qo8tfMk8Sg1rkJoMuInBYuQO6nqduUU
s9URkoGtyen1kxc8ugb0/gE7vOJ9+EYb15axLGSo2uZC7Rsvm0EtYg==
=Umrq
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Jürgen Wind



Dotan Cohen wrote:
> 
> On 24/02/07, Otto Wyss <[EMAIL PROTECTED]> wrote:
>> With method="post" just $kind works fine (register_global) yet I've also
>> tried any combination of $_GET['kind'] and $_POST['kind']. With
>> method="get" it doesn't work.
>>
>> O. Wyss
> 
> Try $_GET["kind"]
> 
> Dotan Cohen
> 
> http://lyricslist.com/lyrics/artist_albums/299/krauss_alison.html
> http://what-is-what.com/what_is/kernel.html
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
why should $_GET["kind"]  work better than $_GET['kind'] ?
-- 
View this message in context: 
http://www.nabble.com/GET-doesn%27t-work-as-POST-tf3283323.html#a9135932
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Jürgen Wind



Dotan Cohen wrote:
> 
> On 24/02/07, Pintér Tibor <[EMAIL PROTECTED]> wrote:
>> echo "";
>> print_r($_REQUEST);
>> echo ";
>>
>> and think...
>>
>> t
>>
> 
> Maybe you meant:
> 
>  echo "";
> print_r($_REQUEST);
> echo ";
> ?>
> 
> Dotan Cohen
> 
> http://lyricslist.com/lyrics/lyrics/137/12/aaliyah/age_ain_t_nothing_but_a_number.html
> http://what-is-what.com/what_is/website.html
> 
> 
did you check it ? I never heard of XMP before, but
 and  work equally well! 
>echo ";
will throw an error.
-- 
View this message in context: 
http://www.nabble.com/GET-doesn%27t-work-as-POST-tf3283323.html#a9135891
Sent from the PHP - General mailing list archive at Nabble.com.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New Menu Bar - Can people test it for me?

2007-02-24 Thread Seak, Teng-Fong

   Yup, that's nice.  As others had told you, it doesn't work in IE6.

   On the other hand, the first time your page is loaded (or when the 
download speed is low), and when the mouse pointer is on "General", it 
takes quite some time to draw the menu bar background.  And that gives 
the feeling that something's wrong ... until ten seconds later when 
everything is drawn out.  I've included an attached image that you could 
see, hope it's not filtered out by the mailing-list server.


   You know, you could load those background images first in your page 
using cache.

> On Wed, February 21, 2007 6:12 am, Scott Gunn wrote:
> > http://www.thebigspider.co.uk/test/menu.html



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dotan Cohen

On 24/02/07, Otto Wyss <[EMAIL PROTECTED]> wrote:

Pintér Tibor wrote:
> echo "";
> print_r($_REQUEST);
> echo ";
>
> and think...
>
After reload
Array
(
[page] => bvallist.php
[kind] => regions
...
)

After change in form with method="get"
Array
(
[state] => validated
...
)

After change in form with method="post"
Array
(
[page] => bvallist.php
[kind] => regions
[state] => validated
...
)

Yet I still have no idea why GET and POST are different.



It appears that the form is not sending the data. What is the entire
html of the form (inciuding javascript)?

Of course, this is not a php problem.

Dotan Cohen

http://what-is-what.com/what_is/yahoo.html
http://faq-google.com


Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Otto Wyss

Pintér Tibor wrote:

echo "";
print_r($_REQUEST);
echo ";

and think...


After reload
Array
(
   [page] => bvallist.php
   [kind] => regions
   ...
)

After change in form with method="get"
Array
(
   [state] => validated
   ...
)

After change in form with method="post"
Array
(
   [page] => bvallist.php
   [kind] => regions
   [state] => validated
   ...
)

Yet I still have no idea why GET and POST are different.

O. Wyss

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dotan Cohen

On 24/02/07, Pintér Tibor <[EMAIL PROTECTED]> wrote:

echo "";
print_r($_REQUEST);
echo ";

and think...

t



Maybe you meant:

";
print_r($_REQUEST);
echo ";
?>

Dotan Cohen

http://lyricslist.com/lyrics/lyrics/137/12/aaliyah/age_ain_t_nothing_but_a_number.html
http://what-is-what.com/what_is/website.html


Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Pintér Tibor

Otto Wyss írta:

Dotan Cohen wrote:

Try $_GET["kind"]


Tried, doesn't help.

O. Wyss


echo "";
print_r($_REQUEST);
echo ";

and think...

t

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Otto Wyss

Dotan Cohen wrote:

Try $_GET["kind"]


Tried, doesn't help.

O. Wyss

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to call image from mySql to php file

2007-02-24 Thread tedd

At 10:38 AM +0500 2/24/07, Fahad Pervaiz wrote:


There are two ways to store images in databases.

First is that you upload your images to a directory and store path to that
image in the database. In this case make sure that your field size is large
enough to store the complete path. You can use the following code to
retreive the image and display it.

$sno = $_REQUEST['sno'];

$query="SELECT logos FROM table WHERE sno = '$sno' limit 1";

-snip-

$sno = $_REQUEST['sno'];

$query="SELECT logos FROM table WHERE sno = '$sno' limit 1";

-snip-

you can make call to it from you abc.html as follows




--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
(Shopping Carts, Framwork for
Multilingual Web Sites, Web Designs)


Security -- we have a problem.

Never trust any data coming from outside your code.

Also, in that regard, you might want to rethink using $_REQUEST.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Check if link is on a page

2007-02-24 Thread tedd

At 11:49 AM + 2/24/07, Wikus Möller wrote:

Ok, thanks.

That should do it.
By the way, which letter should be used for what at the fopen like you
used an 'r'. Is there an online reference that lists this? Because I
couldn't find it at php.net

Thanks


Really?

Just enter "fopen" in the "search for" box at php.net and you'll find:

http://us3.php.net/manual/en/function.fopen.php

and in that page you'll find 'r' and more.

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dotan Cohen

On 24/02/07, Dave Goodchild <[EMAIL PROTECTED]> wrote:

Or just interpolate it like so:

print "Hello, {$_GET['kind']}!";


Nice, I didn't know that.

Dotan Cohen

http://lyricslist.com/
http://what-is-what.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Check if link is on a page

2007-02-24 Thread Wikus Möller

Ok, thanks.

That should do it.
By the way, which letter should be used for what at the fopen like you
used an 'r'. Is there an online reference that lists this? Because I
couldn't find it at php.net

Thanks

On 2/24/07, Dave Goodchild <[EMAIL PROTECTED]> wrote:

$web = fopen('http://google.com/index.php', 'r');
$contents = file_get_contents($web);
if (preg_match('/$link/', $contents))... you got it

simplified and no error checking but you get the idea.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dave Goodchild

On 2/24/07, Dotan Cohen <[EMAIL PROTECTED]> wrote:


Also, if you're using the variable in a print string, then you'll need
to exit the string, like so:

$print "Hello, $kind!";
would become:
$print "Hello, ".$_GET["kind"]."!";

Dotan Cohen

http://easyanswers.info
http://nirot.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Or just interpolate it like so:

print "Hello, {$_GET['kind']}!";








--
http://www.web-buddha.co.uk


Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dave Goodchild

On 2/24/07, Otto Wyss <[EMAIL PROTECTED]> wrote:


With method="post" just $kind works fine (register_global) yet I've also
tried any combination of $_GET['kind'] and $_POST['kind']. With
method="get" it doesn't work.

O. Wyss

Peter Lauri wrote:
> How are you fetching the GET and POST? With $_GET and $_POST?
>
> Best regards,
> Peter Lauri
>
> www.dwsasia.com - company web site
> www.lauri.se - personal web site
> www.carbonfree.org.uk - become Carbon Free
>
>
>
> -Original Message-
> From: Otto Wyss [mailto:[EMAIL PROTECTED]
> Sent: Saturday, February 24, 2007 12:51 PM
> To: php-general@lists.php.net
> Subject: [PHP] GET doesn't work as POST
>
> On the page
>
>
http://www.orpatec.ch/turniere/5erfussball/index.php?page=bvallist.php&kind=
> regions
>
>
> I have a form with method="post" and action=" ?>". While it works fine this way, as soon as I change the form to
> method="get" it looses the parameter "kind" when I change e.g. the
> second parameter from "-Alle-" to "Gültig". Has anybody an idea why it
> works with POST but not with GET?
>
> 
> ...
>   
>
> O. Wyss
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




...do you need to run urlencode() on the stirng you pass via GET?




--
http://www.web-buddha.co.uk


Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dotan Cohen

Also, if you're using the variable in a print string, then you'll need
to exit the string, like so:

$print "Hello, $kind!";
would become:
$print "Hello, ".$_GET["kind"]."!";

Dotan Cohen

http://easyanswers.info
http://nirot.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Check if link is on a page

2007-02-24 Thread Dave Goodchild

$web = fopen('http://google.com/index.php', 'r');
$contents = file_get_contents($web);
if (preg_match('/$link/', $contents))... you got it

simplified and no error checking but you get the idea.


Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Dotan Cohen

On 24/02/07, Otto Wyss <[EMAIL PROTECTED]> wrote:

With method="post" just $kind works fine (register_global) yet I've also
tried any combination of $_GET['kind'] and $_POST['kind']. With
method="get" it doesn't work.

O. Wyss


Try $_GET["kind"]

Dotan Cohen

http://lyricslist.com/lyrics/artist_albums/299/krauss_alison.html
http://what-is-what.com/what_is/kernel.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] IE6 session issues

2007-02-24 Thread Dave Goodchild

Hi all. I am running an online charity lottery and am having issues with IE6
and sessions.

To fix them, I added the following at the top of each file:

ini_set('session.name', 'tlc');
header("Cache-control: private");
session_start();

...ran a local test in IE6 worked fine, then noticed more blank entries
coming in. I am not using third-party cookies, the system is built on php
sessions, any more ideas?

--
http://www.web-buddha.co.uk


[PHP] Check if link is on a page

2007-02-24 Thread Wikus Möller

Hi.

I need some help with checking if a certain link is on a page (e.g.
check if http://yahoo.com is on http://google.com/index.php )

Please help me to get the web page and to perform a string match on
the web page.

Thanks
*Still learning*

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GET doesn't work as POST

2007-02-24 Thread Otto Wyss
With method="post" just $kind works fine (register_global) yet I've also 
tried any combination of $_GET['kind'] and $_POST['kind']. With 
method="get" it doesn't work.


O. Wyss

Peter Lauri wrote:

How are you fetching the GET and POST? With $_GET and $_POST?

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free



-Original Message-
From: Otto Wyss [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 24, 2007 12:51 PM

To: php-general@lists.php.net
Subject: [PHP] GET doesn't work as POST

On the page

http://www.orpatec.ch/turniere/5erfussball/index.php?page=bvallist.php&kind=
regions 



I have a form with method="post" and action="?>". While it works fine this way, as soon as I change the form to 
method="get" it looses the parameter "kind" when I change e.g. the 
second parameter from "-Alle-" to "Gültig". Has anybody an idea why it 
works with POST but not with GET?



...
  

O. Wyss



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: GET doesn't work as POST

2007-02-24 Thread Haydar TUNA
Hello,
if you send your complete code, I can help you.:)



-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net


"Otto Wyss" <[EMAIL PROTECTED]>, haber iletisinde sunlari 
yazdi:[EMAIL PROTECTED]
> On the page
>
> http://www.orpatec.ch/turniere/5erfussball/index.php?page=bvallist.php&kind=regions
>
> I have a form with method="post" and action=" ?>". While it works fine this way, as soon as I change the form to 
> method="get" it looses the parameter "kind" when I change e.g. the second 
> parameter from "-Alle-" to "Gültig". Has anybody an idea why it works with 
> POST but not with GET?
>
> 
> ...
>  
>
> O. Wyss 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] GET doesn't work as POST

2007-02-24 Thread Peter Lauri
How are you fetching the GET and POST? With $_GET and $_POST?

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free



-Original Message-
From: Otto Wyss [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 24, 2007 12:51 PM
To: php-general@lists.php.net
Subject: [PHP] GET doesn't work as POST

On the page

http://www.orpatec.ch/turniere/5erfussball/index.php?page=bvallist.php&kind=
regions 


I have a form with method="post" and action="". While it works fine this way, as soon as I change the form to 
method="get" it looses the parameter "kind" when I change e.g. the 
second parameter from "-Alle-" to "Gültig". Has anybody an idea why it 
works with POST but not with GET?


...
  

O. Wyss

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] GET doesn't work as POST

2007-02-24 Thread Otto Wyss

On the page

http://www.orpatec.ch/turniere/5erfussball/index.php?page=bvallist.php&kind=regions 



I have a form with method="post" and action="?>". While it works fine this way, as soon as I change the form to 
method="get" it looses the parameter "kind" when I change e.g. the 
second parameter from "-Alle-" to "Gültig". Has anybody an idea why it 
works with POST but not with GET?



...
 

O. Wyss

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] getting authentication information from apache

2007-02-24 Thread dave
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

try echo $PHP_AUTH_USER;

Ryan wrote:
> Richard,
> 
> I looked at phpinfo() as you said, same thing...
> 
> _SERVER["REMOTE_USER"]no value
> 
> You may be right, this may not be available, but I don't want to keep
> throwing a login screen in front of users for no apparent reason.
> 
> Thanks,
> Ryan
> 
> 
> 
> 
> On 2/23/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>> On Wed, February 21, 2007 1:01 pm, Ryan wrote:
>> > I'm new to php and I have am running php on apache. I already have
>> > ldap
>> > authentication set up in apache would rather not create a separate
>> > system
>> > for php. What would be ideal would be to get the current authenticated
>> > user
>> > from the apache environment. At this point I'm grabbing at straws, but
>> > so
>> > far I've tried
>> >
>> > $ret = apache_getenv("LDAP_USER");
>> > echo $ret;
>> > echo $_SERVER['REMOTE_USER'];
>> > echo $_SERVER['PHP_AUTH_DIGEST'];
>> > $ret = apache_getenv('PHP_AUTH_DIGEST');
>> >
>> > None of these work. Has anyone done this??
>>
>> If the answer you are seeking isn't available in:
>> 
>> run on the page where you are trying to do this, then you probably
>> can't get the answer you want.
>>
>> Running http://php.net/ldap to re-connect and re-authenticate will
>> probably be fairly cheap, since LDAP is supposed to be pretty dang
>> fast in the first place, and whatever caching is going on for the LDAP
>> or OS calls behind LDAP virtually guarantees that the data you want is
>> in RAM.
>>
>> -- 
>> Some people have a "gift" link here.
>> Know what I want?
>> I want you to buy a CD from some starving artist.
>> http://cdbaby.com/browse/from/lynch
>> Yeah, I get a buck. So?
>>
>>
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF4AgsGPhC6XW20oARAmruAJ9zpCz5q6mN6rwlRHkyXgtox9ZvWACgnrXa
TFy3y3YOWfFPaFctYAFbDFo=
=6tjM
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: How to call image from mySql to php file

2007-02-24 Thread Jim Lucas

benifactor wrote:
$query = mysql_query("SELECT logos FROM table WHERE sno = '$sno' limit 
1") or die(mysql_error());


while ($result = mysql_fetch_array($query)) {
   $sno = $result[logos];
}


logos = constant???

if not, you should have it quoted.

Otherwise you will get a PHP notice warning



?>



hope it helps
- Original Message - From: "Fahad Pervaiz" 
<[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>; 
Sent: Friday, February 23, 2007 9:38 PM
Subject: [PHP] Re: How to call image from mySql to php file



#ORIGINAL#
I have a field in database called "logos" which has one value
"images/logos/some_logo.jpg"

In my php I am trying to call it in my php file as image. With this code.

$sno = $_REQUEST['sno'];

$query="SELECT logos FROM table WHERE sno = '$sno'";

$result=mysql_query($query);
$num=mysql_numrows($result);

mysql_close();
$logos=mysql_result($result,$i,"logos");

echo "

 $logos 
";

?>

But getting errors. What is the way to call image in php file from the
database. I know that this is a very basic question but first time for 
me. I


ignored this in the begining but now its right infront of me.

Please advice.
#END ORIGINAL#

There are two ways to store images in databases.

First is that you upload your images to a directory and store path to 
that
image in the database. In this case make sure that your field size is 
large

enough to store the complete path. You can use the following code to
retreive the image and display it.

$sno = $_REQUEST['sno'];

$query="SELECT logos FROM table WHERE sno = '$sno' limit 1";

$result=mysql_query($query);
$num=mysql_numrows($result);

if ( ! $result )
   die("Unable to get records");

while($row= mysql_fetch_array( $result ))
{
$image= $row["sno"];
}

mysql_close();

echo "


";


The second method is a bit complicated. You store images in a binary 
field
of database and when you retrieve the image, you retrieve it via proxy 
file

e.g. image.php
the image.php outputs the image using header



you can make call to it from you abc.html as follows




--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
(Shopping Carts, Framwork for
Multilingual Web Sites, Web Designs)





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php