php-general Digest 25 Feb 2007 01:48:36 -0000 Issue 4644

Topics (messages 249365 through 249381):

Re: Check if link is on a page
        249365 by: tedd

Re: How to call image from mySql to php file
        249366 by: tedd

Re: GET doesn't work as POST
        249367 by: Otto Wyss
        249368 by: Pintér Tibor
        249369 by: Dotan Cohen
        249370 by: Otto Wyss
        249371 by: Dotan Cohen
        249373 by: Jürgen Wind
        249374 by: Jürgen Wind
        249376 by: Larry Garfield

Re: New Menu Bar - Can people test it for me?
        249372 by: Seak, Teng-Fong

Detailed PHP User SPL documentation?
        249375 by: Erik Franzén
        249378 by: Kevin Waterson

OT - FC6 as Web Server
        249377 by: Peter Lauri

Include file path.. please help im newby
        249379 by: StainOnRug
        249380 by: Peter Lauri

input on sessions vs cookies
        249381 by: benifactor

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 ---
At 11:49 AM +0000 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

--- End Message ---
--- Begin Message ---
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
<div>
<img src="image.php?sno=<?=$_REQUEST['sno']?>" />
</div>

--
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

--- End Message ---
--- Begin Message ---
Dotan Cohen wrote:
Try $_GET["kind"]

Tried, doesn't help.

O. Wyss

--- End Message ---
--- Begin Message ---
Otto Wyss írta:
Dotan Cohen wrote:
Try $_GET["kind"]

Tried, doesn't help.

O. Wyss

echo "<XMP>";
print_r($_REQUEST);
echo "</XMP>;

and think...

t

--- End Message ---
--- Begin Message ---
On 24/02/07, Pintér Tibor <[EMAIL PROTECTED]> wrote:
echo "<XMP>";
print_r($_REQUEST);
echo "</XMP>;

and think...

t


Maybe you meant:

<?php
echo "<pre>";
print_r($_REQUEST);
echo "</pre>;
?>

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

--- End Message ---
--- Begin Message ---
Pintér Tibor wrote:
echo "<XMP>";
print_r($_REQUEST);
echo "</XMP>;

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

--- End Message ---
--- Begin Message ---
On 24/02/07, Otto Wyss <[EMAIL PROTECTED]> wrote:
Pintér Tibor wrote:
> echo "<XMP>";
> print_r($_REQUEST);
> echo "</XMP>;
>
> 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

--- End Message ---
--- Begin Message ---


Dotan Cohen wrote:
> 
> On 24/02/07, Pintér Tibor <[EMAIL PROTECTED]> wrote:
>> echo "<XMP>";
>> print_r($_REQUEST);
>> echo "</XMP>;
>>
>> and think...
>>
>> t
>>
> 
> Maybe you meant:
> 
> <?php
> echo "<pre>";
> print_r($_REQUEST);
> echo "</pre>;
> ?>
> 
> 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
<XMP> and <pre> work equally well! 
>echo "</pre>;
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.

--- End Message ---
--- Begin Message ---


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.

--- End Message ---
--- Begin Message ---
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):

<form name="find" action="" method="post" style="background-color:#EEEEEE">
<fieldset>
<legend>Regionen suchen mit ...</legend>

<select name="belongstoid" class="small" >
<option value=0 selected>&nbsp;</option>
<option value=1>Verband: Fussballverband Region Zrich (FVRZ)</option>          
</select>

<select name="state" class="mini" >
<option value=0 selected>- Alle -</option>
<option value=canceled>Gel�cht</option>
<option value=registered>Eingetragen</option>
<option value=validated>Gltig</option>
</select>

</fieldset>
</form>

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="<?PHP $_SERVER['PHP_SELF'];
> ?>". 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?
>
> <form action="<?PHP $_SERVER['PHP_SELF']; ?>" method="get">
> ...
>   <select name="state" onchange="this.form.submit()">
>
> 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

--- End Message ---
--- Begin Message ---
   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


--- End Message ---
--- Begin Message ---
-----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-----

--- End Message ---
--- Begin Message ---
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."

--- End Message ---
--- Begin Message ---
Hi,

 

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

 

I have been using Plesk systems for a while now, but I am tired of them
being very "static" in how I can add my own stuff. I tried to install cvs
using yum but it didn't allow me. And if I screw something up it is
difficult to recover. So now I want to have as simple system as possible.
Just mail, ftp, virtual domains etc and I will be fine.

 

Best regards,

Peter Lauri

 

 <http://www.dwsasia.com/> www.dwsasia.com - company web site

 <http://www.lauri.se/> www.lauri.se - personal web site

 <http://www.carbonfree.org.uk/> www.carbonfree.org.uk - become Carbon Free

 


--- End Message ---
--- Begin Message ---
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.

--- End Message ---
--- Begin Message ---
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: [email protected]
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

--- End Message ---
--- Begin Message ---
i would like your input on session vs cookies regarding login data like 
usernames/passwords ect...

--- End Message ---

Reply via email to