php-general Digest 5 Apr 2003 22:27:49 -0000 Issue 1981
Topics (messages 142502 through 142537):
unsubscribe [EMAIL PROTECTED]
142502 by: Chris Roumbanis
Re: Bug ?
142503 by: David Otton
Re: Finding the height of a JPG in pixels using PHP
142504 by: Andrew Brampton
If else.. display no picture..
142505 by: fkeessen.planet.nl
142507 by: John W. Holmes
142510 by: Rasmus Lerdorf
142522 by: BAROILLER Pierre-Emmanuel
error while quering from MSSQL server from a Linux box
142506 by: Dhaval
Force no Cache
142508 by: Davíð Örn Jóhannsson
142509 by: Rasmus Lerdorf
142511 by: John W. Holmes
142512 by: Rasmus Lerdorf
Uploading a file from a specific directory
142513 by: José RELLAND
142527 by: John W. Holmes
Re: Redirect
142514 by: Ron Rudman
Re: file upload
142515 by: Alexander Weber
Problems with fread()
142516 by: MCConniffe
Re: HTTP or HTTPS
142517 by: Alexander Weber
142518 by: Rasmus Lerdorf
142537 by: Alexander Weber
oci8
142519 by: Paul Dymecki
142530 by: Jim Lucas
142533 by: Paul Dymecki
mysl_connect question
142520 by: Info.Best-IT
142531 by: Jim Lucas
please help,newbie to sessions..
142521 by: Kelly Meeks
Re: newbie alternate row colours in dynamic table
142523 by: Bobby Rahman
142525 by: Chris Hayes
142526 by: Chris Hayes
142536 by: Bobby Rahman
RedHat
142524 by: John Taylor-Johnston
142528 by: Larry E. Ullman
142529 by: Scott St. John
142532 by: Pete James
Right Click
142534 by: Shantenese Williams
142535 by: Chris Hayes
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 ---
unsubscribe [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
On Sat, 5 Apr 2003 13:18:08 +0300, you wrote:
>David, thank you very much. I suspected smth. like this, but still, it is
>weird: PHP already has the "&" operator (?) for assigning by reference.
The reference operator
$b = &$a;
forces $b and $a to be references to the same variable now and forever,
but the assignment operator
$b = $a;
may make $b and $a reference the same variable, but will make deep
copies of them when their values diverge.
At least that is my understanding.
>And
>there is more: I noticed that if I use the "sort" function instead of
>"array_multisort", it works as expected.
>I still think there is a bug involved :(
Well... I hesitate to call it a bug because each function is working as
intended by its author. Idiosyncratic language design, maybe :)
--- End Message ---
--- Begin Message ---
You can use getimagesize on a jpg file to read its size, so either save the
jpg in MySQL to a file and then do a getImageSize, or before you place the
jpg in to the database read its size and store its dimensions with it in the
db.
Andrew
----- Original Message -----
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 05, 2003 10:46 AM
Subject: [PHP] Finding the height of a JPG in pixels using PHP
> I have JPG files stored as binary in a MySQL database. I am displaying
the
> JPGs on the screen and also want to know the height (in pixels) of the
JPG.
> Can PHP do this?
>
>
>
> Thanks!
>
>
--- End Message ---
--- Begin Message ---
Hi,
I'm trying to do the following.. When $stadpict is filled in it must display the
picture (only the path to the picture is stored in Mysql). But when the string
($stadpict) is empty then it must not display the picture (and also not display a box
with a red cross in it (can't display picture! ;>). The only thing i'm getting is an
error message...
Parse error: parse error, unexpected T_STRING, expecting ',' or ';'
Code;
<?
// includes
include("../conf/config.php");
// open database connection
$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
// select database
mysql_select_db($db) or die ("Unable to select database!");
$stedenid=$_GET['stedenid'];
// generate and execute query
$query2 = "SELECT stedenid, naamstad, stadomschrijvk, stadpict FROM steden WHERE
stedenid = $stedenid";
$result2 = mysql_query($query2) or die ("Error in query: $query2. " . mysql_error());
$row2 = mysql_fetch_object($result2);
if (mysql_num_rows($result2) > 0)
{
?>
<font class="bold"><? echo $row2->naamstad; ?> </font>
<br><br><? echo $row2->stadpict;
?>
</td>
</tr>
</table>
<table cellspacing="0" width="405" cellpadding="0" border="0">
<tr style="padding-top:10">
<td width="139" valign="top" style="padding-left:20">
<?
while($row->$stadpict > 0)
{
?>
<img src="../steden/images/<? echo $row->stadpict; ?>" border="0" width="108"
height="160" alt=""></td>
<?
}
?>
<td width="266" valign="top" style="padding-right:10;padding-left:10"><? echo
$row2->stadomschrijvk;
}
else
{
Echo Geen informatie beschikbaar;
}
?>
Thanks for helping me out!
Frank
--- End Message ---
--- Begin Message ---
> I'm trying to do the following.. When $stadpict is filled in it must
> display the picture (only the path to the picture is stored in Mysql).
But
> when the string ($stadpict) is empty then it must not display the
picture
> (and also not display a box with a red cross in it (can't display
picture!
> ;>). The only thing i'm getting is an error message...
>
> Parse error: parse error, unexpected T_STRING, expecting ',' or ';'
>
> Code;
> <?
> // includes
> include("../conf/config.php");
>
> // open database connection
> $connection = mysql_connect($host, $user, $pass) or die ("Unable to
> connect!");
>
> // select database
> mysql_select_db($db) or die ("Unable to select database!");
> $stedenid=$_GET['stedenid'];
>
> // generate and execute query
> $query2 = "SELECT stedenid, naamstad, stadomschrijvk, stadpict FROM
steden
> WHERE stedenid = $stedenid";
> $result2 = mysql_query($query2) or die ("Error in query: $query2. " .
> mysql_error());
> $row2 = mysql_fetch_object($result2);
> if (mysql_num_rows($result2) > 0)
> {
> ?>
>
> <font class="bold"><? echo $row2->naamstad; ?> </font>
> <br><br><? echo $row2->stadpict;
> ?>
>
> </td>
> </tr>
> </table>
> <table cellspacing="0" width="405" cellpadding="0" border="0">
> <tr style="padding-top:10">
> <td width="139" valign="top" style="padding-left:20">
> <?
>
> while($row->$stadpict > 0)
> {
> ?>
> <img src="../steden/images/<? echo $row->stadpict; ?>" border="0"
> width="108" height="160" alt=""></td>
> <?
> }
> ?>
> <td width="266" valign="top"
style="padding-right:10;padding-left:10"><?
> echo $row2->stadomschrijvk;
> }
> else
>
> {
> Echo Geen informatie beschikbaar;
What is this line supposed to do? You're missing some quotes around your
"string"...
Next time it would be more helpful if you posted the _exact_ error
message along with the relevant line mentioned in the message and 5 or
so lines before that one.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
I would help if you told us which line the error was on
On Sat, 5 Apr 2003 [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to do the following.. When $stadpict is filled in it must display the
> picture (only the path to the picture is stored in Mysql). But when the string
> ($stadpict) is empty then it must not display the picture (and also not display a
> box with a red cross in it (can't display picture! ;>). The only thing i'm getting
> is an error message...
>
> Parse error: parse error, unexpected T_STRING, expecting ',' or ';'
>
> Code;
> <?
> // includes
> include("../conf/config.php");
>
> // open database connection
> $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
>
> // select database
> mysql_select_db($db) or die ("Unable to select database!");
> $stedenid=$_GET['stedenid'];
>
> // generate and execute query
> $query2 = "SELECT stedenid, naamstad, stadomschrijvk, stadpict FROM steden WHERE
> stedenid = $stedenid";
> $result2 = mysql_query($query2) or die ("Error in query: $query2. " . mysql_error());
> $row2 = mysql_fetch_object($result2);
> if (mysql_num_rows($result2) > 0)
> {
> ?>
>
> <font class="bold"><? echo $row2->naamstad; ?> </font>
> <br><br><? echo $row2->stadpict;
> ?>
>
> </td>
> </tr>
> </table>
> <table cellspacing="0" width="405" cellpadding="0" border="0">
> <tr style="padding-top:10">
> <td width="139" valign="top" style="padding-left:20">
> <?
>
> while($row->$stadpict > 0)
> {
> ?>
> <img src="../steden/images/<? echo $row->stadpict; ?>" border="0" width="108"
> height="160" alt=""></td>
> <?
> }
> ?>
> <td width="266" valign="top" style="padding-right:10;padding-left:10"><? echo
> $row2->stadomschrijvk;
> }
> else
>
> {
> Echo Geen informatie beschikbaar;
> }
> ?>
>
>
> Thanks for helping me out!
>
> Frank
>
>
--- End Message ---
--- Begin Message ---
May be this line is wrong :
Echo Geen informatie beschikbaar;
may be use this instead...
echo 'Geen informatie beschikbaar';
no?
:)
regards.
<[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> Hi,
>
> I'm trying to do the following.. When $stadpict is filled in it must
display the picture (only the path to the picture is stored in Mysql). But
when the string ($stadpict) is empty then it must not display the picture
(and also not display a box with a red cross in it (can't display picture!
;>). The only thing i'm getting is an error message...
>
> Parse error: parse error, unexpected T_STRING, expecting ',' or ';'
>
> Code;
> <?
> // includes
> include("../conf/config.php");
>
> // open database connection
> $connection = mysql_connect($host, $user, $pass) or die ("Unable to
connect!");
>
> // select database
> mysql_select_db($db) or die ("Unable to select database!");
> $stedenid=$_GET['stedenid'];
>
> // generate and execute query
> $query2 = "SELECT stedenid, naamstad, stadomschrijvk, stadpict FROM steden
WHERE stedenid = $stedenid";
> $result2 = mysql_query($query2) or die ("Error in query: $query2. " .
mysql_error());
> $row2 = mysql_fetch_object($result2);
> if (mysql_num_rows($result2) > 0)
> {
> ?>
>
> <font class="bold"><? echo $row2->naamstad; ?> </font>
> <br><br><? echo $row2->stadpict;
> ?>
>
> </td>
> </tr>
> </table>
> <table cellspacing="0" width="405" cellpadding="0" border="0">
> <tr style="padding-top:10">
> <td width="139" valign="top" style="padding-left:20">
> <?
> while($row->$stadpict > 0)
> {
> ?>
> <img src="../steden/images/<? echo $row->stadpict; ?>" border="0"
width="108" height="160" alt=""></td>
> <?
> }
> ?>
> <td width="266" valign="top" style="padding-right:10;padding-left:10"><?
echo $row2->stadomschrijvk;
> }
> else
>
> {
> Echo Geen informatie beschikbaar;
> }
> ?>
>
>
> Thanks for helping me out!
>
> Frank
>
--- End Message ---
--- Begin Message ---
Hi All,
I m trying to build a drop down dynamically. I m quering fields from MSSQL
2000 Server. Now look wat is happning when i run my php from a Win2K PC and
from a Linux Box.
Linux Machine
ABIDA PARVEEN
AHMED HUSSAIN MOHD.HUSSAIN
AHMED HUSSAIN,MOHAMMED HUSSAIN
ANWAR USSAI
ARVINDER SINGHOHAMMED HUSSA
ASHA BHOSLEGHOHAMMED
ASHA BHOSLE ,GHULAM ALIUSSAN
ASHA BHOSLE,GHULAM ALIUSSAN
ASHOK KHOSLAHULAM ALI
ASHOK KHOSLA,SUMITA CHAKRABORTY SAME
BEGUM AKHTAR UMITA CHAKRA
BHUPINDER SINGHITA CHAKRAORT
BHUPINDER SINGH, MITHALEE SINGHSAME
BHUPINDER SINGH,MITALEEE SINGHSAME
C.H. ATMASINGH,MI
C.H.ATMASINGH,
CHHAYA GANGULI,IALEEE SI
CHITRA SINGHI,IALEE
CHITRA SINGH,JAGJIT SINGHSIGHSAME
DILRAAJ KAURJAGJIT SING
Win 2K Server
ABIDA PARVEEN
AHMED HUSSAIN MOHD.HUSSAIN
AHMED HUSSAIN,MOHAMMED HUSSAIN
ANWAR
ARVINDER SINGH
ASHA BHOSLE
ASHA BHOSLE ,GHULAM ALI
ASHA BHOSLE,GHULAM ALI
ASHOK KHOSLA
ASHOK KHOSLA,SUMITA CHAKRABORTY SAME
BEGUM AKHTAR
BHUPINDER SINGH
BHUPINDER SINGH, MITHALEE SINGH
BHUPINDER SINGH,MITALEE
C.H. ATMA
C.H.ATMA
CHHAYA GANGULI
CHITRA SINGH
CHITRA SINGH,JAGJIT SINGH
DILRAAJ KAUR
Values are getting cat after the original value. Can any one help in this.
I have tried using both sybase and mssql functions the results are the same.
Regards
Dhaval
--- End Message ---
--- Begin Message ---
Is there any way in php to disable the users cache so that every time
you reload you fetch the newest version of the site?
Regards, David
--- End Message ---
--- Begin Message ---
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header('Expires: Mon,26 Jul 1980 05:00:00 GMT');
On Sat, 5 Apr 2003, [iso-8859-1] Davíð Örn Jóhannsson wrote:
> Is there any way in php to disable the users cache so that every time
> you reload you fetch the newest version of the site?
>
>
> Regards, David
>
--- End Message ---
--- Begin Message ---
> header('Cache-Control: no-cache, must-revalidate');
> header('Pragma: no-cache');
> header('Expires: Mon,26 Jul 1980 05:00:00 GMT');
Kind of a follow on question to this. If you use a method like this on
public web pages, does anyone know if it'll affect how search engines
index your page? Will they ignore it because it's "expired"? Thanks.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
On Sat, 5 Apr 2003, John W. Holmes wrote:
> > header('Cache-Control: no-cache, must-revalidate');
> > header('Pragma: no-cache');
> > header('Expires: Mon,26 Jul 1980 05:00:00 GMT');
>
> Kind of a follow on question to this. If you use a method like this on
> public web pages, does anyone know if it'll affect how search engines
> index your page? Will they ignore it because it's "expired"? Thanks.
No, as far as I know at least google does not ignore cache-expired pages
like that. There is a No-Archive meta tag you can put in your page to
tell it not to archive, or of course, you can robots.txt it.
-Rasmus
--- End Message ---
--- Begin Message ---
With :
<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD="POST">
<...
Envoyez ce fichier : <INPUT NAME="userfile" TYPE="file">
<...
</FORM>
Is there a parameter wich indicates the directory
where the file must be uploaded ?
For example, from the root of my site.
Thank You
--- End Message ---
--- Begin Message ---
> With :
> <FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD="POST">
> <...
> Envoyez ce fichier : <INPUT NAME="userfile" TYPE="file">
> <...
> </FORM>
>
> Is there a parameter wich indicates the directory
> where the file must be uploaded ?
The file is uploaded to the directory specified in php.ini. You must
move/copy it from there before the script ends.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--- End Message ---
--- Begin Message ---
I believe you can also prevent the header error by using ob_start();
"Jean-Louis Letortorec" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> To work around that "headers already sent" problem, I use:
>
> if ($condition == true) { echo
> "<script>location.href=('http://...');</script>"; }
>
> That works great all the time (unless the javascript has been disabled at
> the browser side, but usually it's enabled).
>
>
> Jean-Louis
>
>
>
> At 15:55 3-4-2003, you wrote:
> >Hi,
> >
> >How would one redirect a user to a different page if a certain
> >condition was met?
> >
> >i.e.
> >
> >if($condition == true){
> > goTo newPage.php
> >}
>
> if ($condition == true)
> {
> Header("Location:
>
"http://www.sense.nl/index.php?module=ContentExpress&func=display&ceid=15");
> }
>
> take care that your script does not create any output before this,because
> then you will get an error (headers already sent)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Seems correct to me, try to upload the file with different browsers. Opera,
Netscape, M$. e.g. Rich Text could be: application/MSword, text/richtext,
and some other "nice" applications.... ;-)
Cheers,
Alex
"Anders Thoresson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Am I making any obvious mistakes here, in my upload script? I want to
> upload text-files only, they should end up in the directory from which the
> script is executed and be names __traningsmatcher.txt.
>
> HTML-form:
>
> <FORM ENCTYPE="multipart/form-data" METHOD=POST ACTION="store.php">
> <TABLE>
> <INPUT NAME="max_file_size" TYPE="hidden" VALUE="3000000">
> <TR>
> <TD>Fil: </TD>
> <TD><INPUT NAME="userfile" TYPE="file"></TD>
> </TR>
> <TR>
> <TD></TD>
> <TD><INPUT TYPE=submit VALUE=" skicka "></TD>
> </TR>
> </TABLE>
> </FORM>
>
>
> And php, on the recieving end:
> <?php
>
> // check and validate uploaded file
>
> if($_FILES['userfile'] == "none") {
> die("Problem: Ingen fil uppladdad.");
> }
>
>
> if($_FILES['userfile']['size'] == 0) {
> die("Problem: Filen är tom.");
> }
>
> if($_FILES['userfile']['type'] != "text/plain") {
> die("Problem: Filen är inte en textfil.");
> }
>
>
> if(!is_uploaded_file($_FILES['userfile']['tmp_name'])) {
> die("Problem: Filen är inte uppladdad");
> }
>
> $upfile = "__traningsmatcher.txt";
>
> if(!copy($_FILES['userfile']['tmp_name'], $upfile)) {
> die("Kunde inte spara filen");
> }
>
> echo("Filen är sparad!");
>
>
> ?>
>
> --
> anders thoresson
--- End Message ---
--- Begin Message ---
For some reason I can't seem to get fread() to work proeprly. Every time I
try to use it, my script simply exits with no output, errors, or logs of any
kind that I can find. It seems to work with fgets() just fine, but I need to
read in binary files. I'm currently running PHP 4.2.2 on Apache 2.0.40. I
have another server with a very similar configuration that works just fine
with the same scripts.
If anyone has any idea as to a possible solution to this problem please
e-mail me ([EMAIL PROTECTED]). I have already tried reinstalling Apache
AND PHP.
--- End Message ---
--- Begin Message ---
But SERVER PORT is not always 80 using HTTP (not HTTPS). So this way is not
really secure.
Alex
"Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> I usually just use $_SERVER['SERVER_PORT']
>
> -Rasmus
>
> On Sat, 5 Apr 2003, Alexander Weber wrote:
>
> > Unfortunally is not set. It's like the variable does not exist, because
when
> > I extract the varaible $_SERVER with foreach I don't get HTTPS as key,
only
> > SERVER_PROTOCOL.
> >
> > I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3.
> > register_globals OFF
> > safe:mode OFF
> >
> > stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31 Dec 2002
> >
> > If you need more info:
> >
> > ICQ 46858764.
> >
> > Thanx
> >
> > Alex
> >
> > "John W. Holmes" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > news:[EMAIL PROTECTED]
> > > > anybody knows how to find out the connection type (http or httpS)?
> > > Tried
> > > > out
> > > > $HTTP_SERVER_VARS.
> > >
> > > $_SERVER['HTTPS'] will be set if it's over HTTPS.
> > >
> > > ---John W. Holmes...
> > >
> > > PHP Architect - A monthly magazine for PHP Professionals. Get your
copy
> > > today. http://www.phparch.com/
> > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
--- End Message ---
--- Begin Message ---
Presumably you know the HTTPS port on your server. Anything not SSL is
going to be straight HTTP. The point here is that SSL happens a layer
below PHP. PHP doesn't care whether it is running over SSL or not. In
fact it has no idea what transport layer is below it. So your only way to
tell is to depend on whatever the web server tells you. Look at a
phpinfo() for both an SSL and a non-SSL request and see what the
differences are on your server. For me, checking SERVER_PORT has been the
most portable/reliable mechanism.
-Rasmus
On Sat, 5 Apr 2003, Alexander Weber wrote:
> But SERVER PORT is not always 80 using HTTP (not HTTPS). So this way is not
> really secure.
>
> Alex
>
> "Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> news:[EMAIL PROTECTED]
> > I usually just use $_SERVER['SERVER_PORT']
> >
> > -Rasmus
> >
> > On Sat, 5 Apr 2003, Alexander Weber wrote:
> >
> > > Unfortunally is not set. It's like the variable does not exist, because
> when
> > > I extract the varaible $_SERVER with foreach I don't get HTTPS as key,
> only
> > > SERVER_PROTOCOL.
> > >
> > > I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3.
> > > register_globals OFF
> > > safe:mode OFF
> > >
> > > stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31 Dec 2002
> > >
> > > If you need more info:
> > >
> > > ICQ 46858764.
> > >
> > > Thanx
> > >
> > > Alex
> > >
> > > "John W. Holmes" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > > news:[EMAIL PROTECTED]
> > > > > anybody knows how to find out the connection type (http or httpS)?
> > > > Tried
> > > > > out
> > > > > $HTTP_SERVER_VARS.
> > > >
> > > > $_SERVER['HTTPS'] will be set if it's over HTTPS.
> > > >
> > > > ---John W. Holmes...
> > > >
> > > > PHP Architect - A monthly magazine for PHP Professionals. Get your
> copy
> > > > today. http://www.phparch.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
>
--- End Message ---
--- Begin Message ---
So far so good, the next problem is now, that the port changes with every
new request. Tried this on my "personal" server an my hoster's one.
Perhaps there is another way? JScript, xml or anything other?
Thanx so far,
Alex
"Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Presumably you know the HTTPS port on your server. Anything not SSL is
> going to be straight HTTP. The point here is that SSL happens a layer
> below PHP. PHP doesn't care whether it is running over SSL or not. In
> fact it has no idea what transport layer is below it. So your only way to
> tell is to depend on whatever the web server tells you. Look at a
> phpinfo() for both an SSL and a non-SSL request and see what the
> differences are on your server. For me, checking SERVER_PORT has been the
> most portable/reliable mechanism.
>
> -Rasmus
>
>
>
> On Sat, 5 Apr 2003, Alexander Weber wrote:
>
> > But SERVER PORT is not always 80 using HTTP (not HTTPS). So this way is
not
> > really secure.
> >
> > Alex
> >
> > "Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > news:[EMAIL PROTECTED]
> > > I usually just use $_SERVER['SERVER_PORT']
> > >
> > > -Rasmus
> > >
> > > On Sat, 5 Apr 2003, Alexander Weber wrote:
> > >
> > > > Unfortunally is not set. It's like the variable does not exist,
because
> > when
> > > > I extract the varaible $_SERVER with foreach I don't get HTTPS as
key,
> > only
> > > > SERVER_PROTOCOL.
> > > >
> > > > I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3.
> > > > register_globals OFF
> > > > safe:mode OFF
> > > >
> > > > stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31 Dec
2002
> > > >
> > > > If you need more info:
> > > >
> > > > ICQ 46858764.
> > > >
> > > > Thanx
> > > >
> > > > Alex
> > > >
> > > > "John W. Holmes" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > > > news:[EMAIL PROTECTED]
> > > > > > anybody knows how to find out the connection type (http or
httpS)?
> > > > > Tried
> > > > > > out
> > > > > > $HTTP_SERVER_VARS.
> > > > >
> > > > > $_SERVER['HTTPS'] will be set if it's over HTTPS.
> > > > >
> > > > > ---John W. Holmes...
> > > > >
> > > > > PHP Architect - A monthly magazine for PHP Professionals. Get your
> > copy
> > > > > today. http://www.phparch.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
> >
--- End Message ---
--- Begin Message ---
Hello,
Sorry for cross posting but i thought i'd get a better response. I was
just wondering if anyone has gotten oci8 working successfully on windows?
I've been trying with not much luck.
thx,
Paul Dymecki
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--- End Message ---
--- Begin Message ---
Just after we had a long discussion about off topic questions. This one
doesn't even refer to a programming language problem.
Or am I missing someting?
Jim
----- Original Message -----
From: "Paul Dymecki" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 05, 2003 10:30 AM
Subject: [PHP] oci8
> Hello,
> Sorry for cross posting but i thought i'd get a better response. I
was
> just wondering if anyone has gotten oci8 working successfully on windows?
> I've been trying with not much luck.
> thx,
> Paul Dymecki
>
>
>
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Well i'm on php4.2.3 Apache and windows xp, and i'm trying to get oci8
working. If this isn't the correct list could you point me in the right
direction?
thx,
Paul
From: "Jim Lucas" <[EMAIL PROTECTED]>
To: "Paul Dymecki" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: Re: [PHP] oci8
Date: Sat, 5 Apr 2003 13:03:38 -0800
Just after we had a long discussion about off topic questions. This one
doesn't even refer to a programming language problem.
Or am I missing someting?
Jim
----- Original Message -----
From: "Paul Dymecki" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 05, 2003 10:30 AM
Subject: [PHP] oci8
> Hello,
> Sorry for cross posting but i thought i'd get a better response. I
was
> just wondering if anyone has gotten oci8 working successfully on
windows?
> I've been trying with not much luck.
> thx,
> Paul Dymecki
>
>
>
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
--- End Message ---
--- Begin Message ---
When I use myssql to connect to a db with anything besides root I get an
error that I cannot connect. I created a user that has access to one
databse called 'menu'. The user has SELECT, UPDATE, and DELETE permissions
for that database.
I can connect on the command line: mysql-u newuser -p. But no luck using
mysql_connect().
Anyone have this problem?
.T
--- End Message ---
--- Begin Message ---
did you reload mysql so it will have the new user?
Jim
----- Original Message -----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: "php mailing list list" <[EMAIL PROTECTED]>
Sent: Saturday, April 05, 2003 10:40 AM
Subject: [PHP] mysl_connect question
> When I use myssql to connect to a db with anything besides root I get an
> error that I cannot connect. I created a user that has access to one
> databse called 'menu'. The user has SELECT, UPDATE, and DELETE permissions
> for that database.
>
> I can connect on the command line: mysql-u newuser -p. But no luck using
> mysql_connect().
>
> Anyone have this problem?
>
>
> .T
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi all,
I've pulled my hair out on this, so I'm turning to the experts.
I'm trying to make a directory of a site password protected:
http://www.ivepulledmyhairout.com/protected
I'm getting there from:
http://www.ivepulledmyhairout.com
I've got a login.php page that gets a username and password from dear valued users
It then posts that info to checklogin.php:
I'm using an older version of php 4.03 (please don't ask).
checklogin code
-------------------------------------------
<?
session_start();
$connect=mysql_connect($bshostname,$bsusername,$bspassword);
$thedb=mysql_select_db($bsdatabase);
$thequery="select * from customer_acct_info where customer_password='$dealer_password'
";
$thequery.=" and customer_username='$dealer_username'";
//query database based on submitted form vars..
$theresults=mysql_query($thequery) or die (mysql_error());
$row_count=mysql_num_rows($theresults);
$dealer_info=mysql_fetch_assoc($theresults);
if ($row_count!=0)
{
session_register('wholesaler');
$HTTP_SESSION_VARS['wholesaler']=$dealer_info;
header("Location:protected/index.php");
}
else
{
header("Location:login.php");
}
?>
------------------------------------------
Once it goes to the protected directory, that directory's index page checks for the
existence of that session var, if it doesn't find it, it jumps you back to the login
screen.
index.php of protected directory:
<?
session_start();
header("Cache-control: private");
if (isset($HTTP_SESSION_VARS['wholesaler']))
{
require('manage/bsinclude.inc');
require('manage/bsmenus.inc');
include ($bstemplate);
}
else
{
header("Location:../index.php?catcont=login");
}
?>
No matter what I do, I can't get the session variable to survive the transition from
the checklogin.php page, to the index.php page of the protected directory!
On the checklogin.php page, instead of redirecting, i've tried
print_r($HTTP_SESSION_VARS) after setting the session I need, and it seems to be there
no problem.
If someone has been willing to read thru this tome, and can be of any help, I'd truly
appreciate it.
Other questions re: sessions:
If you have a page that looks like
<?
session_start();
include 'bla.php';
include 'bla2.php';
?>
and you need to check for the exisistence of session data on the included pages, do
you have to include session_start(); commands on the included pages?
Can you:
session_start();
$HTTP_SESSION_VARS['bla']="bla"
or do you have to
session_start();
session_register('bla');
$HTTP_SESSION_VARS['bla']="bla"
And:
Does using something header("Location:bla.php") screw up sessions somehow, even if you
start the destination page with session_start() ?
Kelly
--- End Message ---
--- Begin Message ---
Hiya I have a dynamic table and am trying to get the rows to be two
different alternate colours. well Ive looked at a couple of snippets of this
colour code and previous mails regarding this. Im having major troubles
intergrating any of these suggestions with my code. Can anyone suggest where
I am going wrong. Main problems are
1. where to put the loop for changing the colour (complicated due to the
loop retrieving data from db)i.e in the do loop....in the while loop?
2. Also how to echo my rows in the colours.(something like this I think)
print "<tr bgcolor='$trcolor'>"$db_fetch['bugid']; ?></td>;
e.g here is the code snippet for alternate coloured rows
$trcolor="#F0F8FF";
while ($myrow = mysql_fetch_array($result)){
$colorset=0;
if ($trcolor=='#F0F8FF'){
$trcolor='#B0C4DE';
$colorset=1;
}
if ($colorset==0){
if ($trcolor=='#B0C4DE'){
$trcolor='#F0F8FF';}
}
print "<tr bgcolor='$trcolor'>";
}
I have included my table file. Any suggestions would be great (even further
suggestions of code snippets I can look at)
thanx
here is my table.:
<?
require_once('db_api.php');
db_connect();
$querystring= "SELECT * FROM bug";
$db_result = mysql_query($querystring) or die(mysql_error());
$db_fetch = mysql_fetch_assoc($db_result);
$db_totalrows = mysql_num_rows($db_result);
//echo $db_totalrows;
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p> </p>
<table border="2" cellspacing="2" bgcolor="#FFFFFF">
<tr>
<td colspan="9" bgcolor="#9999FF"> </td>
</tr>
<tr>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">bugid</font></td>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">status</font></td>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">severity</font></td>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">summary</font></td>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">description</font></td>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">date_opened</font></td>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">estimation_completion</font></td>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">related_file</font></td>
<td bordercolor="#999999"><font size="-1" face="Verdana, Arial,
Helvetica, sans-serif">created_by</font></td>
</tr>
<? do { ?>
<td><? echo $db_fetch['bugid']; ?></td>
<td><? echo $db_fetch['status']; ?></td>
<td><? echo $db_fetch['severity']; ?></td>
<td><? echo $db_fetch['summary']; ?></td>
<td><? echo $db_fetch['description']; ?></td>
<td><? echo $db_fetch['date_opened']; ?></td>
<td><? echo $db_fetch['estimated_completion']; ?></td>
<td><? echo $db_fetch['related_file']; ?></td>
<td><? echo $db_fetch['created_by']; ?></td>
<tr>
<?
} while ($db_fetch = mysql_fetch_assoc($db_result));
?>
<td colspan="9" bgcolor="#9999FF"> </td>
</table>
<p> </p>
<p> </p>
</body>
</html>
<?
mysql_free_result($db_result);
?>
_________________________________________________________________
Overloaded with spam? With MSN 8, you can filter it out
http://join.msn.com/?page=features/junkmail&pgmarket=en-gb&XAPID=32&DI=1059
--- End Message ---
--- Begin Message ---
At 22:14 5-4-2003, you wrote:
Hiya I have a dynamic table and am trying to get the rows to be two
different alternate colours. well Ive looked at a couple of snippets of
this colour code and previous mails regarding this. Im having major
troubles intergrating any of these suggestions with my code. Can anyone
suggest where I am going wrong. Main problems are
1. where to put the loop for changing the colour (complicated due to the
loop retrieving data from db)i.e in the do loop....in the while loop?
Within the loop that prints the rows, whcih is usually a while loop. But
that depends on your preferences.
2. Also how to echo my rows in the colours.(something like this I think)
print "<tr bgcolor='$trcolor'>"$db_fetch['bugid']; ?></td>;
e.g here is the code snippet for alternate coloured rows
$trcolor="#F0F8FF";
while ($myrow = mysql_fetch_array($result)){
$colorset=0;
if ($trcolor=='#F0F8FF'){
$trcolor='#B0C4DE';
$colorset=1;
}
if ($colorset==0){
if ($trcolor=='#B0C4DE'){
$trcolor='#F0F8FF';}
}
print "<tr bgcolor='$trcolor'>";
}
I see that you are using a helping variable $colorset.
I have a problem reading your code in email, as i do not see hte indents
well, so i restructure it here with _ underscores to make the indents
survive the email program.
$trcolor="#F0F8FF"; //1
while ($myrow = mysql_fetch_array($result))
{
___$colorset=0;
___if ($trcolor=='#F0F8FF') //1
___{$trcolor='#B0C4DE'; //2
____$colorset=1;
___}
___if ($colorset==0)
___{ if ($trcolor=='#B0C4DE') //2
______{$trcolor='#F0F8FF'; //1
______}
___}
print "<tr bgcolor='$trcolor'>";
}
Lets walk through.
In the 1st walk,
1a) you enter with color#1 and colorset=0.
2b) the first 'if' then sets it to color#2 and colorset=1
3c) The second if sees that both conditions are true and set the color back
to color#1.
So the first row prints color1.
Ok. The code remembers the values, which are color#1 and colorset1.
In the next walkthrough,
2a) the colorset is set to 0 to start with.
At this moment you have the exact situation as with 1a).
do you see that? it would be much easier to see what is happening if you
would have only colorset toggling its value and just before printing,
decide what the color is as a result of the value of colorset.
Give it a try!
Basically:
$colorset=0;
while (....)
{ toggle collorset (toggle: if 1 then 0 and opposite)
if colorser=0 color=ffffff else color=aaaaa
print color.
}
Chris Hayes
--- End Message ---
--- Begin Message ---
sorry i see i made a bit too many ambiguous typing errors.
Hiya I have a dynamic table and am trying to get the rows to be two
different alternate colours. well Ive looked at a couple of snippets of
this colour code and previous mails regarding this. Im having major
troubles intergrating any of these suggestions with my code. Can anyone
suggest where I am going wrong. Main problems are
1. where to put the loop for changing the colour (complicated due to the
loop retrieving data from db)i.e in the do loop....in the while loop?
Within the loop that prints the rows, whcih is usually a while loop. But
that depends on your preferences.
2. Also how to echo my rows in the colours.(something like this I think)
print "<tr bgcolor='$trcolor'>"$db_fetch['bugid']; ?></td>;
e.g here is the code snippet for alternate coloured rows
$trcolor="#F0F8FF";
while ($myrow = mysql_fetch_array($result)){
$colorset=0;
if ($trcolor=='#F0F8FF'){
$trcolor='#B0C4DE';
$colorset=1;
}
if ($colorset==0){
if ($trcolor=='#B0C4DE'){
$trcolor='#F0F8FF';}
}
print "<tr bgcolor='$trcolor'>";
}
I see that you are using a helping variable $colorset.
I have a problem reading your code in email, as i do not see hte indents
well, so i restructure it here with _ underscores to make the indents
survive the email program.
$trcolor="#F0F8FF"; //color#1
while ($myrow = mysql_fetch_array($result))
{
___$colorset=0;
___if ($trcolor=='#F0F8FF') //color#1
___{$trcolor='#B0C4DE'; //color#2
____$colorset=1;
___}
___if ($colorset==0)
___{ if ($trcolor=='#B0C4DE') //color#2
______{$trcolor='#F0F8FF'; //color#1
______}
___}
print "<tr bgcolor='$trcolor'>";
}
Lets walk through.
In the 1st walk,
1a) you enter with $trcolor=#1 and colorset=0.
2b) the first 'if' then sets it to $trcolor=#2 and colorset=1
3c) The second if sees that both conditions are true and set the color back
to $trcolor=#1.
So the first row prints color1.
Ok. The code remembers the values, which are color#1 and colorset1.
In the next walkthrough,
2a) the colorset is set to 0 to start with.
At this moment you have the exact situation as with 1a). So the rest of the
code will lead inevitably to the same color.
Do you see that?
It would be much easier to see what is happening if you would have only
colorset toggling its value and just before printing, decide what the color
is as a result of the value of colorset. You are doing trest on the color
as well as the $colorset which is making the code very sensitive to errors,
as well as difficult to understand.
Give it a try!
Basically:
(pseudocode)
$colorset=0;
while (....)
{ toggle $colorset (toggle: if 1 then 0 and opposite)
if ($colorset==0) $trcolor="#ffffff";
else $trcolor="#aaaaa";
print $trcolor.
}
Chris Hayes
--- End Message ---
--- Begin Message ---
Hiya people
After a lot of soul searching, exploring the web and help from many people I
came up with this simple solution:
Thank you Chris for explaining the toggle $colorset. In the end I decided
this made life alot simplier.
(clearly the brackets have to be correctly aligned)
while( $row = mysql_fetch_array($db_result) )
{
echo("
<tr $c>
<td>" . $row['bugid'] . "</td>
</tr>
");
if ( !isset($c) )
{
$c = "bgcolor=#9999FF";
echo $c;
}
else
{
unset($c);
}
}
From: Chris Hayes <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [PHP] RE: newbie alternate row colours in dynamic table
Date: Sat, 05 Apr 2003 22:32:17 +0200
At 22:14 5-4-2003, you wrote:
Hiya I have a dynamic table and am trying to get the rows to be two
different alternate colours. well Ive looked at a couple of snippets of
this colour code and previous mails regarding this. Im having major
troubles intergrating any of these suggestions with my code. Can anyone
suggest where I am going wrong. Main problems are
1. where to put the loop for changing the colour (complicated due to the
loop retrieving data from db)i.e in the do loop....in the while loop?
Within the loop that prints the rows, whcih is usually a while loop. But
that depends on your preferences.
2. Also how to echo my rows in the colours.(something like this I think)
print "<tr bgcolor='$trcolor'>"$db_fetch['bugid']; ?></td>;
e.g here is the code snippet for alternate coloured rows
$trcolor="#F0F8FF";
while ($myrow = mysql_fetch_array($result)){
$colorset=0;
if ($trcolor=='#F0F8FF'){
$trcolor='#B0C4DE';
$colorset=1;
}
if ($colorset==0){
if ($trcolor=='#B0C4DE'){
$trcolor='#F0F8FF';}
}
print "<tr bgcolor='$trcolor'>";
}
I see that you are using a helping variable $colorset.
I have a problem reading your code in email, as i do not see hte indents
well, so i restructure it here with _ underscores to make the indents
survive the email program.
$trcolor="#F0F8FF"; //1
while ($myrow = mysql_fetch_array($result))
{
___$colorset=0;
___if ($trcolor=='#F0F8FF') //1
___{$trcolor='#B0C4DE'; //2
____$colorset=1;
___}
___if ($colorset==0)
___{ if ($trcolor=='#B0C4DE') //2
______{$trcolor='#F0F8FF'; //1
______}
___}
print "<tr bgcolor='$trcolor'>";
}
Lets walk through.
In the 1st walk,
1a) you enter with color#1 and colorset=0.
2b) the first 'if' then sets it to color#2 and colorset=1
3c) The second if sees that both conditions are true and set the color back
to color#1.
So the first row prints color1.
Ok. The code remembers the values, which are color#1 and colorset1.
In the next walkthrough,
2a) the colorset is set to 0 to start with.
At this moment you have the exact situation as with 1a).
do you see that? it would be much easier to see what is happening if you
would have only colorset toggling its value and just before printing,
decide what the color is as a result of the value of colorset.
Give it a try!
Basically:
$colorset=0;
while (....)
{ toggle collorset (toggle: if 1 then 0 and opposite)
if colorser=0 color=ffffff else color=aaaaa
print color.
}
Chris Hayes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Surf together with new Shared Browsing
http://join.msn.com/?page=features/browse&pgmarket=en-gb&XAPID=74&DI=1059
--- End Message ---
--- Begin Message ---
Where would I go on the redHat site to ask when they are going to upgrade to PHP 4.3
and MySQL 4.x (now in production). Our CS dept. won't install them for me until RedHat
bundles it. I'm using RH 7.3.
http://www.netcraft.com/?host=compcanlit.usherbrooke.ca&position=limited
Suggestions where to ask, to give them a nudge :) ?
--
John Taylor-Johnston
-----------------------------------------------------------------------------
"If it's not open-source, it's Murphy's Law."
Université de Sherbrooke:
http://compcanlit.ca/
--- End Message ---
--- Begin Message ---
Where would I go on the redHat site to ask when they are going to
upgrade to PHP 4.3 and MySQL 4.x (now in production). Our CS dept.
won't install them for me until RedHat bundles it. I'm using RH 7.3.
This question would probably be best directed towards:
1) The RedHat site
2) A RedHat newsgroup
3) A RedHat mailing list
4) A RedHat forum
5) A RedHat ______, not the PHP general mailing list (since your
question concerns RedHat packages).
I expect that a RedHat support would be much more qualified to answer
this question and your original one (when they'll upgrade).
Larry
--- End Message ---
--- Begin Message ---
John-
This would best be asked on a Red Hat list, but I can tell you that if you
are using Red Hat 7.3 I would not really count on getting them to release
PHP 4.3 as once a major Red Hat release is out they usually only provide
security updates - NOT feature updates.
Red Hat also modifies the version numbers to reflect the security updates
so if you have PHP 4.1 on Red Hat 7.3 it might be PHP 4.1.25 which is the
Red Hat number.
You can look around on www.rpmfind.net or www.freshrpms.net for an updated
PHP, but it may not be compatible with the Red Hat version you are
running.
In the future if you want to count on program feature updates you would be
best to install Apache, PHP and MySQL from source.
-Scott
On Sat, 5 Apr 2003, John Taylor-Johnston wrote:
> Where would I go on the redHat site to ask when they are going to upgrade to PHP 4.3
> and MySQL 4.x (now in production). Our CS dept. won't install them for me until
> RedHat bundles it. I'm using RH 7.3.
>
> http://www.netcraft.com/?host=compcanlit.usherbrooke.ca&position=limited
>
> Suggestions where to ask, to give them a nudge :) ?
--- End Message ---
--- Begin Message ---
John,
I'm not sure if you've noticed, but pretty much every question you've
asked on this list of late has received at least one comment about
finding the appropriate resource. If I were in your situation, I'd
start to see a theme.
The PHP General mailing list is for questions about development with
PHP, not about open source, licenses, distributions, or research papers.
If you develop with PHP and want to know why your code doesn't work,
then you're in the right venue. If you're researching options for a
paper, or wondering how to do something not directly related to PHP
coding, then you're not in the right venue.
The internet is a large place with lots of sources of information. I
would take a good look at what you're about to ask when you feel the
urge to post here. If you did that, you might see that it would be
better to contact the PHP group about their licenses, or RedHat about
their releases.
Pete.
Larry E. Ullman wrote:
Where would I go on the redHat site to ask when they are going to
upgrade to PHP 4.3 and MySQL 4.x (now in production). Our CS dept.
won't install them for me until RedHat bundles it. I'm using RH 7.3.
This question would probably be best directed towards:
1) The RedHat site
2) A RedHat newsgroup
3) A RedHat mailing list
4) A RedHat forum
5) A RedHat ______, not the PHP general mailing list (since your
question concerns RedHat packages).
I expect that a RedHat support would be much more qualified to answer
this question and your original one (when they'll upgrade).
Larry
--- End Message ---
--- Begin Message ---
Does anyone know if there is a function in PHP that allows you to
right-click on an item, and from there a drop down menu pops
up and you can go to another screen, preserving that value that was
clicked on?
If there is no function for right-clicking, then is there a way that
when you are selecting something, not on a form, but in a tree,
that you can get the value of what you clicked on into the PHP file?
Thanks
--- End Message ---
--- Begin Message ---
At 02:23 6-4-2003, you wrote:
Does anyone know if there is a function in PHP that allows you to
right-click on an item, and from there a drop down menu pops
up and you can go to another screen, preserving that value that was
clicked on?
If there is no function for right-clicking, then is there a way that
when you are selecting something, not on a form, but in a tree,
that you can get the value of what you clicked on into the PHP file?
Thanks
I think you are missing an essential thing about PHP: PHP is being executed
on the server. All PHP code you put on a page, is parsed on the server. It
arrives at the user without all PHP code but only with the result of it.
That means that if you want to have interaction with the user, you need to
create a page that in some way interacts with the user and then will send a
request for a next page to the server.
Yor options are, among others:
- put information in a link
- use a form in the page
- use javascript to juggle with information
For right-clicking you need to use javascript.
If you make a tree you could put information in the links that you put in
the tree, for example
* <a href="nextpage.php?location=0" >main node</a>
*-- <a href="nextpage.php?location=1" >child1</a>
* -- <a href="nextpage.php?location=11" >grandchild 1 of child 1</a>
*-- <a href="nextpage.php?location=2" >child2</a>
* -- <a href="nextpage.php?location=21" >grandchild 1 of child 2</a>
or whatever way and the in the nextpage.php look at $_GET['location']'
value to see what link was used.
--- End Message ---