php-general Digest 24 Feb 2007 12:29:38 -0000 Issue 4643
Topics (messages 249344 through 249364):
Re: New Menu Bar - Can people test it for me?
249344 by: Daevid Vincent
249345 by: Craige Leeder
Re: save email in original layout
249346 by: Richard Kurth
Re: How to call image from mySql to php file
249347 by: Fahad Pervaiz
249349 by: benifactor
249350 by: Jim Lucas
Information Portal
249348 by: Murtaza Chang
Re: getting authentication information from apache
249351 by: dave
GET doesn't work as POST
249352 by: Otto Wyss
249353 by: Peter Lauri
249354 by: Haydar TUNA
249355 by: Otto Wyss
249358 by: Dotan Cohen
249360 by: Dotan Cohen
249361 by: Dave Goodchild
249362 by: Dave Goodchild
249364 by: Dotan Cohen
Check if link is on a page
249356 by: Wikus Möller
249359 by: Dave Goodchild
249363 by: Wikus Möller
IE6 session issues
249357 by: Dave Goodchild
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 ---
Very nice - sorta.
It doesn't work for me in IE6, but does work in FF2.
> -----Original Message-----
> From: Richard Lynch [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 23, 2007 2:03 PM
> To: Scott Gunn
> Cc: [email protected]
> Subject: Re: [PHP] New Menu Bar - Can people test it for me?
>
> On Wed, February 21, 2007 6:12 am, Scott Gunn wrote:
> > http://www.thebigspider.co.uk/test/menu.html
> >
> > I'm going to write some php code which will build this menu from an
> > XML
> > file.
> >
> > Before I do, I want to know what sort of browser
> compatibility it has?
> > could
> > you guys test it and let me know if it worked ok and looked like the
> > preview
> > picture?
> >
> > If your on IE7 or Firefox2 and it works please don't email back as I
> > know
> > these work fine.
>
> http://browsercam.com/
>
> There are probably other similar solutions.
>
> PS I'll tell you for free, without even checking, that it probably
> doesn't work in lynx. :-)
>
> --
> 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?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I like it, but it's pretty image intensive.
- Craige
On 2/23/07, Daevid Vincent <[EMAIL PROTECTED]> wrote:
Very nice - sorta.
It doesn't work for me in IE6, but does work in FF2.
> -----Original Message-----
> From: Richard Lynch [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 23, 2007 2:03 PM
> To: Scott Gunn
> Cc: [email protected]
> Subject: Re: [PHP] New Menu Bar - Can people test it for me?
>
> On Wed, February 21, 2007 6:12 am, Scott Gunn wrote:
> > http://www.thebigspider.co.uk/test/menu.html
> >
> > I'm going to write some php code which will build this menu from an
> > XML
> > file.
> >
> > Before I do, I want to know what sort of browser
> compatibility it has?
> > could
> > you guys test it and let me know if it worked ok and looked like the
> > preview
> > picture?
> >
> > If your on IE7 or Firefox2 and it works please don't email back as I
> > know
> > these work fine.
>
> http://browsercam.com/
>
> There are probably other similar solutions.
>
> PS I'll tell you for free, without even checking, that it probably
> doesn't work in lynx. :-)
>
> --
> 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?
>
> --
> 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
--- End Message ---
--- Begin Message ---
-----Original Message-----
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: Friday, February 23, 2007 2:19 PM
To: Richard Kurth
Cc: [email protected]
Subject: Re: [PHP] save email in original layout
http://php.net/mysql_real_escape_string is the only thing you need to worry
about as far as MySQL is concerned.
Translating from Email newlines to HTML newlines to OS newlines is another
kettle of fish...
Email newlines are SUPPOSED to be \n, except that some ancient Windows MTAs
insisted on using \r\n and...
So I'm concerned to see the \r in the emails, as they shouldn't be there...
And, of course, if you display this to a browser, you would need something
like:
echo nl2br(htmlentities($email));
to give the appearance of line-breaks in HTML.
To send it back out as email, with a real MTA, you'll probably need to
replace the \r\n with \n, though the real MTA might even be smart enough to
do that, knowing that it came from a broken MTA in the first place.
Did I just confuse email headers (\n only) with the body (\r\n) again?
I do that all the time... Experimentation or reading RFCs will straighten
you out on this one, though you're always at the mercy of the MTAs involved,
which may or may not be doing it right...
You also might as well prepare now for the Outlook users who will insist on
using ASCII control characters for things like quote marks because they want
those curly quotes that DO NOT WORK for anybody other than MS users...
There's several solutions at http://str_replace for that one.
On Wed, February 21, 2007 12:11 am, Richard Kurth wrote:
> I need to save an email in a mysql database so that it retains it's
> original layout so the example below
>
> Hello ,
>
> Do you dream of a better life? Do you wish you had financial
> stability and freedom? Would you like to be your own boss?
>
> would look like this when the file is saved
>
> \r\n Hello ,\r\n\r\n\r\n Do you dream of a better life? Do you wish
> you had financial stability and freedom? Would you like to be your
> own boss?
>
> how do I insert all the line spaces like above
>
My problem is I have a JavaScript that will hold all the email templates on
the page that is displayed and when you select one it puts it in the
<textarea> so you can edit it and then send it out. When it appears in the
<textarea> it does not have all the /r/n in there anymore. The JavaScript
errors out if I just put <br> or spaces in it. That is the only reason I
need the /r/n in the file. Below is what the script looks like. The first
script works the second does not work. The only difference is the spaces I
put in the first email in the second example. I generate the last part of
this script from the database where the email templates are stored
THIS ONE WORKS
<form method="post" name="scriptform" action=sendfollowup.php>
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
function changescript() {
var t1="this is a test subject line";
var s1="This is a test message. This is a test message This is a test
message This is a test message This is a test message This is a test message
This is a test message This is a test message This is a test message This is
a test message This is a test message This is a test message This is a test
message This is a test message This is a test message This is a test message
This is a test message";
var t2="this is a test subject line";
var s2="\r\n This ,\r\n\r\n\r\n s a test message This is a test message? s
a test message This is a test message? s a test message This is a test
message? \r\ns a test message This is a test message";
switch(document.scriptform.scriptn.value)
{case '1' : MM_setTextOfTextfield('thescript','',s1);
MM_setTextOfTextfield('subject','',t1); break;
case '2' : MM_setTextOfTextfield('thescript','',s2);
MM_setTextOfTextfield('subject','',t2); break;
default : break; }
}
//-->
</script>
<p>
Choose Email Follow-up:
<select name="scriptn" onChange="changescript();">
<option value="0" selected>Select...</option>
<OPTION value="1">test1</OPTION>
<OPTION value="2">test2</OPTION>
</select>
<p>
<table cellpadding="5" cellspacing="1">
<tr>
<td>From:</td>
<td>
</td>
</tr>
<tr>
<td>To:</td>
<td>
</td>
</tr>
<tr>
<td>Subject:</td>
<td><input type="text" size="38" name="subject" value=""></td>
</tr>
<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" style="width:100%;">
<tr>
<td nowrap>Message:</td>
<td align=right width:100%;" nowrap>
</td>
</tr>
</table>
<textarea name="thescript" cols="101" rows="15"></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<center>
<input type=submit name=sendemail value="Send E-mail">
<input type=button name=close value="Cancel">
</center>
</td>
</tr>
</table>
</form>
THIS ONE DOES NOT WORK
<form method="post" name="scriptform" action=sendfollowup.php>
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
function changescript() {
var t1="this is a test subject line";
var s1="This is a test message.
This is a test message This is a test message This is a test message This
is a test message This is a test message This is a test message This is a
test message This is a test message This is a test message This is a test
message This is a test message This is a test message This is a test message
This is a test message This is a test message This is a test message";
var t2="this is a test subject line";
var s2="\r\n This ,\r\n\r\n\r\n s a test message This is a test message? s
a test message This is a test message? s a test message This is a test
message? \r\ns a test message This is a test message";
switch(document.scriptform.scriptn.value)
{case '1' : MM_setTextOfTextfield('thescript','',s1);
MM_setTextOfTextfield('subject','',t1); break;
case '2' : MM_setTextOfTextfield('thescript','',s2);
MM_setTextOfTextfield('subject','',t2); break;
default : break; }
}
//-->
</script>
<p>
Choose Email Follow-up:
<select name="scriptn" onChange="changescript();">
<option value="0" selected>Select...</option>
<OPTION value="1">test1</OPTION>
<OPTION value="2">test2</OPTION>
</select>
<p>
<table cellpadding="5" cellspacing="1">
<tr>
<td>From:</td>
<td>
</td>
</tr>
<tr>
<td>To:</td>
<td>
</td>
</tr>
<tr>
<td>Subject:</td>
<td><input type="text" size="38" name="subject" value=""></td>
</tr>
<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" style="width:100%;">
<tr>
<td nowrap>Message:</td>
<td align=right width:100%;" nowrap>
</td>
</tr>
</table>
<textarea name="thescript" cols="101" rows="15"></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<center>
<input type=submit name=sendemail value="Send E-mail">
<input type=button name=close value="Cancel">
</center>
</td>
</tr>
</table>
</form>
--- End Message ---
--- Begin Message ---
#####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 "
<div>
<p> $logos </p>
</div>";
?></div>
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 "
<div>
<img src='$logos' border='0'>
</div>";
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
<?
header('Content-type: image/jpeg');
$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 $logos;
?>
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)
--- End Message ---
--- Begin Message ---
$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];
}
?>
<img src="<?php echo($sno); ?>"></img>
hope it helps....
----- Original Message -----
From: "Fahad Pervaiz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[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 "
<div>
<p> $logos </p>
</div>";
?></div>
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 "
<div>
<img src='$logos' border='0'>
</div>";
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
<?
header('Content-type: image/jpeg');
$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 $logos;
?>
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)
--- End Message ---
--- Begin Message ---
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
?>
<img src="<?php echo($sno); ?>"></img>
hope it helps....
----- Original Message ----- From: "Fahad Pervaiz"
<[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[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 "
<div>
<p> $logos </p>
</div>";
?></div>
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 "
<div>
<img src='$logos' border='0'>
</div>";
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
<?
header('Content-type: image/jpeg');
$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 $logos;
?>
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)
--- End Message ---
--- Begin Message ---
Hi Everyone,
I am developing an Information Portal for my university, and I am looking a
good solid framework. can you provide me with links, currently I am a bit
confused and overwhelmed with lots of great stuff on net like drupal and
Ruby on Rails
If you could share your experience[if any on similar projects] I would be
really thankful.
--
Murtaza Chang
http://flickr.com/photos/blackstallion/
--- End Message ---
--- Begin Message ---
-----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:
>> <?php phpinfo();?>
>> 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-----
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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: [email protected]
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="<?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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
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="<?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
--- End Message ---
--- Begin Message ---
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: [email protected]
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="<?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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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: [email protected]
> 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="<?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
>
--
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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/
--- End Message ---
--- Begin Message ---
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*
--- End Message ---
--- Begin Message ---
$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.
--- End Message ---
--- Begin Message ---
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.
--- End Message ---
--- Begin Message ---
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
--- End Message ---