[PHP] Making alternate rows of different colour

2003-01-17 Thread Denis L. Menezes

Hello friends.

I put the output of the database query in a table. It works fine. Now I have a need to 
make the alternate rows of a different color.

Can someone please help me with the code?

Thanks
Denis

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




[PHP] Re: Meta Refresh

2003-01-17 Thread roel
Try this:

$NewID = $ID + 1; (instead of the $NewID assignment you've got now...)


Edson Waite [EMAIL PROTECTED] schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi All,

 I am trying to make an automated tour as a section of my site, using the
 following.

 ?php
 $NewID = $colname_earlytour + 1;
 ?
 META HTTP-EQUIV=refresh CONTENT=15 URL=early-tour.php?ID= ?php echo
 $NewID;?

 This works great going from early-tour?ID=1 to early-tour?ID=2 but I can't
 get it to continue on to ID=3, ID=4 etc. It just keeps reloading the data
 from ID=2

 The data for each page is in a row identified by a unique ID# I just want
 the page to reload with the data from the next ID# after a givin time 15
 seconds.

 Thanks in advance for any ideas,
 Edson Waite III
 http://www.sportsvideooutlet.com







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




Re: [PHP] Making alternate rows of different colour

2003-01-17 Thread Rasmus Lerdorf
 I put the output of the database query in a table. It works fine. Now I have a need 
to make the alternate rows of a different color.
 
 Can someone please help me with the code?

   $cols = array('#ff','#00ff00');
   $i = 0;
   while(your_loop_to_output_each_row) {
  echo 'tr bgcolor='.$cols[$i%2].'td$row_data/td/tr';
   }

-Rasmus


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




Re: [PHP] global variables

2003-01-17 Thread Jason k Larson
In terms of security, or in my opinion, good and proper coding, it is 
best to have no global variables.  There is always a way to wrap 
variables that will be needed in local scopes.  However, this philosophy 
is harder to practice than it is to preach.  Code can get ugly when 
passing if you are not strong in your coding designing abilities.

Sometime it just becomes easier to attempt to keep as much out of the 
global scope as possible and suffer the idea of some of them being 
globally available.

That being said, if someone was to exploit a script that had global or 
local access to a variable storing database connection info, then the 
consequences could be drastic.  Similar situations are easly applicable 
as well, with any crucial data or passwords etc.

You should consider reading the section entitled,
Security: New Input Mechanism here: http://www.php.net/release_4_1_0.php

Regards,
Jason k Larson


Dara Dowd wrote:

Is it better to pass variables through functions or to simply 
declare them as global within the function's scope?
The variables in this particular case are things like MySQL database 
connections and tablenames.
Thanks,Dara




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




Re: [PHP] Passing Arrays Through Forms

2003-01-17 Thread Sancar Saran
On Thursday 16 January 2003 20:58, [EMAIL PROTECTED] wrote:
 Hello Everyone,

 I've attempted this many times, but have failed to understand it each time.
 I want to make it easier for myself to deal with passing variables through
 a form. So I thought, why not use a single array variable to do that. If I
 do such a thing, what steps do I need to take to ensure that the values in
 the array are intact just as the user entered it? How do I serialize array
 data from an initial form? Here's a simple example of what I might have:

 form method=post action=some_page.php
input type=text name=form_vars['firstname']/input
input type=text name=form_vars['lastname']/input
input type=text name=form_vars['address']/input
input type=text name=form_vars['city']/input
input type=text name=form_vars['state']/input
input type=text name=form_vars['zip']/input
 /form


 form method=post action=some_page.php
input type=text name=form_vars[firstname]/input
input type=text name=form_vars[lastname]/input
input type=text name=form_vars[address]/input
input type=text name=form_vars[city]/input
input type=text name=form_vars[state]/input
input type=text name=form_vars[zip]/input
 /form

some_page.php
?
$form_vars = $_POST[form_vars];

?





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




Re: [PHP] GD version 1.6.2 and resizing images...

2003-01-17 Thread Marco Alting
I've looked at netpbm and ImageMagick, but I can't make heads or tails from
it, I have to 'make' modules and stuff? My site is hosted on an Apache
server, Is there maybe a pre-baked version I can download and install?

Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 On Thursday 16 January 2003 17:43, Marco Alting wrote:
  My provider has GD version 1.6.2 running, and I'm trying to 
  dynamically resize uploaded JPEG images. But ofcourse that doesn't 
  work with that version. Does anyone have another solution to 
  automatically resize JPEG images upon upload?
 
 If you can install your own programs then you can use netpbm or 
 ImageMagick
 (or you can ask your host to do so).
 
 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 
 /*
 He who knows, does not speak.  He who speaks, does not know.
   -- Lao Tsu
 */
 

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




[PHP] Curl Linux Console String -- PHP Translation

2003-01-17 Thread Andrian Ivanov
Hi,

i have a curl string:

curl --casert CA.srt -E client.pem:huho8 -l https://...;

now, i've added all of the needed curl properties for the php
application(e.g. curl_setopt($connection,CURLOPT_PORT,9000) BUT i can't
find what's the name of the Curl CONSTANT matching the client's Public Key
file, if anybody can help me...

Regards, Andrian Ivanov





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




[PHP] Re: Security in included PHP files

2003-01-17 Thread Philippe Saladin

Jacob Copsey [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 This should work as long as you are only including your include files from
 scripts named index.php.

Yes, of course. I have only one *real* page beginning with html and ending
with /html, called index.php, and depending on the user navigation with a
menu, the required files are included.

Thanks Jacob.

Ph.



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




Re: [PHP] GD version 1.6.2 and resizing images...

2003-01-17 Thread Jason Wong
On Friday 17 January 2003 16:38, Marco Alting wrote:
 I've looked at netpbm and ImageMagick, but I can't make heads or tails from
 it, I have to 'make' modules and stuff? 

Can't you persuade your host to upgrade to a more recent version of GD -- 
1.6.2 is pretty ancient.

If they won't/can't upgrade then the least they can do is install 
netpbm/imagemagick so everyone can use it.

 My site is hosted on an Apache
 server, 

This isn't important ...

 Is there maybe a pre-baked version I can download and install?

..., you need to know the OS and architecture that your server is running then 
see if someone has produced a binary version.

If you're still here (ie none of the above worked for you) then it's time to 
get you hands dirty and do some configure; make; make install. This is 
beyond the scope of this list.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Law stands mute in the midst of arms.
-- Marcus Tullius Cicero
*/


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




Re[2]: [PHP] Re: Ever complained about lousy PHP programmers?

2003-01-17 Thread Tom Rogers
Hi,

Friday, January 17, 2003, 4:44:19 AM, you wrote:
PH Leon Mergen said:

 Now, first of all, why did you this:

 ?php echo(?xml version=\1.0\ encoding=\UTF-8\ ?); ?

 and not just:

 ?xml version=1.0 encoding=UTF-8 ?

PH Because short tags are evil ;-)  My provider has short tags enabled, so
PH there is no getting around this bit of ugliness.

 only that I personally prefer to call a print() statement for
 everything

PH Do you mean as opposed to echo?

PH If so, would you mind saying a few word as to why?

PH I read that echo is a language construct.  It seems like it would be
PH preferable to print() for this reason.  On top of that, it will take
PH multiple strings as input.  I think I will remove the parentheses, though.

PH -Peter
put it into single quotes and it is a bit tidier :)  and you don't need the semi
colon if you are ending php parsing.

?php echo '?xml version=1.0 encoding=UTF-8 ?'?

-- 
regards,
Tom


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




Re: [PHP] Display Dates in English o_O

2003-01-17 Thread Tom Rogers
Hi,

Friday, January 17, 2003, 11:16:53 AM, you wrote:
S I have a PHP driven site that as a time schedule. Since the site isn't exactly 
filled with very intellagent people who just LOVE to translate times and dates from a 
weird format (Such as the
S format used in MySQL), I'd like to take these from a MySQL table (the table's types 
are DATE and TIME) and translate the date to something like Thrusday, January 16th, 
2003 when the date strate
S from the table is 2003-01-16. Then with time, I'd like it to read something like 
8:00 PM when it reads straight from the table 20:00:00. Another feature I'd like 
to have it timezones but
S that's not the point of this message. If you don't mind, though, could you also 
tell me how to configure the times according the the timezone a user has chosen?

S Thanks,
S Stephen Craton
S http://www.melchior.us

S What's the point in appearance if your true love, doesn't care about it? -- 
http://www.melchior.us

What you could do is use javascript to get the clients local time, compare it
with the server time and get a difference. Then get all dates from mysql as a
unix timestamp, apply the difference then use date() to format it as you want
and it will always match the clients time on their computer...even if they have
it wrong :)

-- 
regards,
Tom


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




Re: [PHP] What's the PHP-equivalent of Perl's AUTOLOAD feature?

2003-01-17 Thread Chris Hayes
At 02:06 17-1-2003, you wrote:

I just read an interesting article in The Perl Journal (TPJ) about using
AUTOLOAD as a layer of abstraction for accessing database columns and I
would like to write something similar in PHP.  Is this possible?


If you mean some sort of database abstraction so one script would work on 
MySQL as well as Oracle; there is not such a thing within PHP itself. The 
google search term would 'database abstraction layer' and a popular one is 
ADODB (not to be confused with the other adoDB), at 
http://php.weblogs.com/ADODB.

If that's not what you mean please try to explain it again

Chris Hayes




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



Re: [PHP] Making alternate rows of different colour

2003-01-17 Thread Chris Hayes
At 09:05 17-1-2003, you wrote:

 I put the output of the database query in a table. It works fine. Now I 
have a need to make the alternate rows of a different color.

 Can someone please help me with the code?

   $cols = array('#ff','#00ff00');
   $i = 0;
   while(your_loop_to_output_each_row) {
  echo 'tr bgcolor='.$cols[$i%2].'td$row_data/td/tr';
   }
um, Rasmus, shouldn't this have a
$i++;
line in the while loop?


some other ways (there are many)

- shortest code, you need to use a 'for' loop or add a counter $i that is 
increased in every loop

for ($i=0; $i=10; $i++)
{  echo 'tr bgcolor='.(($i%2==0)?'red':'white').\td$i/td/tr;
}


- using a color toggle

$color_toggle=false;
for ($i=0;$i10;$i++)
{
echo('TR bgcolor='.(($color_toggle=!$color_toggle)?'#D8D1E7':'white')
}

Of ocurse you can put the color values in variabels like $color1 and 
$color2, and define them at the top of the file for easier configuring.






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



[PHP] Alternate row colours - what is wrong with this code?

2003-01-17 Thread Denis L. Menezes
Hello Guys,

I want alternating colours in the output table. Can someone tell me what is wrong with 
this code? I get the data but no alternating colours.

Quote :

 ?php
 $cols = array('#ff','#00ff00');
 $i = 0;
 while($row=mysql_fetch_array($result)){ 
  echo 'tr bgcolor='.$cols[$i++%2].'';
Print td width=\12%\ align=\center\ height=\6\ bgcolor=\#bf\font 
face=\Tahoma\ color=\#00\ ;
 Print   b font size=\2\ color=\ff\ $row[OrgName] /b/font;
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\ bgcolor=\#bf\font 
size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Country]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\ bgcolor=\#bf\font 
size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Date]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\ bgcolor=\#bf\font 
size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Number]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\ bgcolor=\#b7b700\font 
size=\2\ face=\Tahoma\ color=\#00\ ;
 Print form action=\fullmarks.php\ method=\post\;
PrintINPUT TYPE=\submit\ value=\View details\ Name=\Details\;
Printinput type=\hidden\ name=\SelectedItemNumber\ value= $row[Id];
 print /td;
 Print /form;
Print /tr;}
   }
 ?


Unquote.


Thanks
Denis


RE: [PHP] Alternate row colours - what is wrong with this code?

2003-01-17 Thread Clarkson, Nick

I think it's because you're setting the bgcolor=#bf for the TD tag, so
it's overriding using the TR tag bgcolor. The maths is OK, so if you remove
the td bgcolor bit it *should* (standard disclaimer) work.

Nick

-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
Sent: 17 January 2003 12:12
To: PHP general list
Subject: [PHP] Alternate row colours - what is wrong with this code?


Hello Guys,

I want alternating colours in the output table. Can someone tell me what is
wrong with this code? I get the data but no alternating colours.

Quote :

 ?php
 $cols = array('#ff','#00ff00');
 $i = 0;
 while($row=mysql_fetch_array($result)){ 
  echo 'tr bgcolor='.$cols[$i++%2].'';
Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#bf\font face=\Tahoma\ color=\#00\ ;
 Print   b font size=\2\ color=\ff\ $row[OrgName] /b/font;
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#bf\font size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Country]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#bf\font size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Date]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#bf\font size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Number]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#b7b700\font size=\2\ face=\Tahoma\ color=\#00\ ;
 Print form action=\fullmarks.php\ method=\post\;
PrintINPUT TYPE=\submit\ value=\View details\ Name=\Details\;
Printinput type=\hidden\ name=\SelectedItemNumber\ value=
$row[Id];
 print /td;
 Print /form;
Print /tr;}
   }
 ?


Unquote.


Thanks
Denis


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


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




Re: [PHP] Alternate row colours - what is wrong with this code?

2003-01-17 Thread Jason Wong
On Friday 17 January 2003 20:11, Denis L. Menezes wrote:
 Hello Guys,

 I want alternating colours in the output table. Can someone tell me what is
 wrong with this code? I get the data but no alternating colours.

 Quote :

  ?php
  $cols = array('#ff','#00ff00');
  $i = 0;
  while($row=mysql_fetch_array($result)){
   echo 'tr bgcolor='.$cols[$i++%2].'';

Look at the HTML source of the resulting page, if each tr bgcolor... is 
alternating then your code is working. Which means your HTML is dodgy ...

 Print td width=\12%\ align=\center\ height=\6\
 bgcolor=\#bf\font face=\Tahoma\ color=\#00\ ; Print  

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
There are no winners in life, only survivors.
*/


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




Re: [PHP] Alternate row colours - what is wrong with this code?

2003-01-17 Thread Chris Hayes
At 13:11 17-1-2003, you wrote:
 I want alternating colours in the output table. Can someone tell me what 
is wrong with this code? I get the data but no alternating colours.

It has to do with the $cols[$i++%2] part.

When I try to print $i++%2 the outcome varies between 1 and none.  Somehow 
the complete row is not show anymore.

The easiest way is to stop trying this approach and move to the tested 
versions i mailed to this list about an hour ago.


Further i would suggest to keep the form within the td/td bit and not 
overlap it.


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



RE: [PHP] Alternate row colours - what is wrong with this code?

2003-01-17 Thread Clarkson, Nick

I've just tested this stripped down (some colours changed) version of your
code and I get alternating rows no problem. On another point, without the
TABLE tags it won't work properly. I think your PHP works fine, it's your
HTML ;o)

Nick

?php
$cols = array('#ff','#00ff00');
print TABLE;
for ($i = 0; $i10;) {
print 'tr bgcolor='.$cols[$i++%2].'';
print td width=\12%\ align=\center\ height=\6\font face=\Tahoma\
size=\2\ color=\55\TEST/font ;
print nbsp;/td/tr;
}
print /TABLE;
?





-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
Sent: 17 January 2003 12:12
To: PHP general list
Subject: [PHP] Alternate row colours - what is wrong with this code?


Hello Guys,

I want alternating colours in the output table. Can someone tell me what is
wrong with this code? I get the data but no alternating colours.

Quote :

 ?php
 $cols = array('#ff','#00ff00');
 $i = 0;
 while($row=mysql_fetch_array($result)){ 
  echo 'tr bgcolor='.$cols[$i++%2].'';
Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#bf\font face=\Tahoma\ color=\#00\ ;
 Print   b font size=\2\ color=\ff\ $row[OrgName] /b/font;
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#bf\font size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Country]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#bf\font size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Date]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#bf\font size=\2\ face=\Tahoma\ color=\#00\ ;
 Print  $row[Number]; 
 print /font  nbsp;/td;
 Print td width=\12%\ align=\center\ height=\6\
bgcolor=\#b7b700\font size=\2\ face=\Tahoma\ color=\#00\ ;
 Print form action=\fullmarks.php\ method=\post\;
PrintINPUT TYPE=\submit\ value=\View details\ Name=\Details\;
Printinput type=\hidden\ name=\SelectedItemNumber\ value=
$row[Id];
 print /td;
 Print /form;
Print /tr;}
   }
 ?


Unquote.


Thanks
Denis


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


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




RE: [PHP] PDF

2003-01-17 Thread Larry Brown
According to pdflib their commercial version gives you the ability to edit
pdf files using the PDI library.  Have you looked at this?

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388

-Original Message-
From: Brian McGarvie [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 7:23 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] PDF

I'm looking to find out if PHP has the ability to do this...

OK I'm looking for a solution that could do the following.

We require to generate PDF files that can then be emailed or printed 
posted to clients.

I can create PDF Files from scratch using PDFLib.

What we will require to do though is, we presently have paper copies of
forms from various parties we deal with, our present Access-based system
simply prints on top of these, I am presently developing in PHP a system to
replace the Access database, we will want it to create these as PDF files
(we can get the printed forms in PDF format) based on supplied PDF files...
for example, generate a PDF for Customer X based on Supplier Z's PDF file.

Any solutions in PHP (open source, free, commercial etc etc.) would be very
much appreciated, or if we need to look at another Language to perform this
part of the solution (i.e. ASP).

The solution I'm developing is PHP, running on a Windows 2000 Server as we
require use of some windows-only software too. So if *cough* ASP is what's
needed to do the above then so be it :\ - really hope not though!!!

Thanks in advance!


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03



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




Re: [PHP] opening tex file

2003-01-17 Thread Jason Wong
On Friday 17 January 2003 20:59, Artur Bereniewicz wrote:

   how can I open text file and start reading in the middle of it?

AFAIK it's not possible to jump directly into the middle of a file and start 
reading.

You would have to read it line-by-line until you get to the part you're 
interested in.

If the file isn't large (say less than several MBs) then just read it all into 
an array using file() and process it from there.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
You definitely intend to start living sometime soon.
*/


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




RE: [PHP] Meta Refresh

2003-01-17 Thread Ford, Mike [LSS]
  On Friday 17 January 2003 11:25, Edson Waite wrote:
   Hi All,
  
   I am trying to make an automated tour as a section of my 
 site, using the
   following.
  
   ?php
   $NewID = $colname_earlytour + 1;
   ?
   META HTTP-EQUIV=refresh CONTENT=15 
 URL=early-tour.php?ID= ?php
 echo
   $NewID;?

This looks supect if it's a direct cut-and-paste from your script -- you've got a 
superfluous space between ?ID= and ? php echo which shouldn't be there and may affect 
the value of ID that your script sees.

(Also, although it won't affect your results, you really don't need those quotes in 
the echo -- why force PHP to interpret a string, extract the $NewID part, and then go 
fetch its value, when you could write ?php echo $NewID ? and let it just fetch the 
value straight off?  (In fact, come to that, why even bother with $NewID at all when 
you can write ?php echo $colname_earlytour + 1 ? and have done with it?))

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




RE: [PHP] x12 837

2003-01-17 Thread Edward Peloke
Thanks Cal,

I may be asking some questions!  I just have a blank script now so I have a
lot to do!

Eddie

-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:37 PM
To: Edward Peloke; Php-General@Lists. Php. Net
Subject: RE: [PHP] x12 837


yea, mine is all array based.  I pull the data from a FoxPro table via XML
(and jump through several hoops.)  Then I have a main loop that spins
through the data (which is ordered) and

* creates a new PO if the PO number has changes (PO Object)
* Create a PoLineItem for each line in the PO (POLineItemObject)
* repeat.

* PO's own POLineItems
* All PO's are owned by the X12_850 object.

Once everything is nicely sliced and diced into objects I call
X12_850-generateX12(). This spits out all the necessary headers and then
calls generateX12() on each PO. Each PO spits out all the necessary headers
and then calls generateX12() on each POLine Item.  Then it spits out the
necessary trailers and bumps control back up the line.

Once it's finished, I have a (honkin' big) string that represents the 850
document. Currently, I dump this out to a file for ftping but you could just
as easily use CURL to call a SOAP process somewhere if your X12 partner had
a brain. (mine does not, the company I was a consultant for in the medical
insurance industry did not either)

Anyhow, I'm happy to share what I know if you have questions.

HTH,
=C=

*
* Cal Evans
* Stay plugged into your audience.
* http://www.christianperformer.com
* http://www.calevans.com
*


-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 3:55 PM
To: Php-General@Lists. Php. Net
Subject: RE: [PHP] x12 837


Cal,

You used php for this?  I am pretty sure that an 850 is on our list of
things to do somewhere.

Eddie

-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 4:22 PM
To: Edward Peloke; Php-General@Lists. Php. Net
Subject: RE: [PHP] x12 837


I've created an 850 and a base class x12. It's not terribly hard. I did not
find much in the way of useful classes already built though.

=C=

*
* Cal Evans
* Stay plugged into your audience.
* http://www.christianperformer.com
*


-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 3:39 PM
To: Php-General@Lists. Php. Net
Subject: [PHP] x12 837


Ok, I know this is a longshot but does anyone on this list work in the
healthcare industry and have created an 837 with php?  I am thinking of
attempting to create one in php and didn't want to reinvent the wheel.

Thanks,
Eddie


--
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 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: session_destroy have strange effect....

2003-01-17 Thread Marek Kilimajer
This seems pretty dangerous to me. You should better explain your
problem, I didn't understand it.

Scott Fletcher wrote:


Oh never mind.  I found a work around to it.  I can use the passthru
command.  Like this...

--clip--
passthru(rm -f /tmp/sess_*)
--clip--

Scott Fletcher [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 

session_destroy() do work when I logged out of the website.  But if I'm
logged in and open a 2nd browser and try to log in.  This where the script
   

I
 

use to detect exisitng session and destroy it before generating a new one.
Problem is that session_destroy does not work on the 2nd browser...

So, my question is what is the workaround to using session_destroy() 
How do I unset it  Etc

I tried this one but it had no effect if I'm the 2nd user...

---

$_SESSION = array();
session_destroy();

---


   




 



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




Re: [PHP] opening tex file

2003-01-17 Thread Chris Hayes
At 14:05 17-1-2003, you wrote:

On Friday 17 January 2003 20:59, Artur Bereœniewicz wrote:

   how can I open text file and start reading in the middle of it?

AFAIK it's not possible to jump directly into the middle of a file and start
reading.

You would have to read it line-by-line until you get to the part you're
interested in.

If the file isn't large (say less than several MBs) then just read it all 
into
an array using file() and process it from there.

Well why not try something like this

?PHP
$filename=halffile.txt;

$fp=fopen($filename,r);
fseek($fp,$numpoint);

//jump to midfile
$middle_of_file=(filesize($filename))/2;
echo \n.$middle_of_file;
$precontent=fread($fp,$middle_of_file);

$content=fread($fp,filesize($filename));
fclose($fp);
echo nl2br($content);

exit();
?


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




Re: [PHP] getopt usage?

2003-01-17 Thread Jason Wong
On Thursday 16 January 2003 06:51, Eli Criffield wrote:
 I can't seem to find any examples of code using getopt() around. I'm
 thinking not many people use php for command line shell scripts.

 Here is what i came up with for getopt();

 ?
 $options = getopt(a:bc);

 reset($options);
 while(list($key, $value) = each($options)) {
 switch ($key) {
 case 'b':
 $B=1;
 break;
 case 'a':
 $A=$value;
 break;
 case 'c':
 $C=1;
 break;
 default:
 echo unknown option;
   // print usage or something
 break;
 }
 }
 ?

 The problem with this is it never hits default in the switch. If you give
 an argument that it doesn't know about it accepts it without doing anything
 and without an error, 

getopt() has already sanitised the arguments for you thus unknown 
options/switches do not make it into $options -- meaning you cannot test for 
them! Try print_r($options) and enter differing combinations of 
options/switches and see what you get.

 same thing if you don't give a value for an argument
 thats supposed to have one (like -a above).

That you have to test for yourself. In your example above if $A is empty then 
inform the user.

 Oh and --long arguments would
 be nice too.

Yes and I'll have fries with that as well please ;-)

 So why not use the Console/Getopt.php library you ask. Because i can't
 figure out how to parse the output array. I can figure out the first part

 ?
 require 'Console/Getopt.php';

 $optclass =  new Console_Getopt;
 $args = $optclass-readPHPArgv();
 array_shift($args);

 $shortoptions = a:bc;
 $longoptions = array(long, alsolong=, doublelong==);

 $options = $optclass-getopt( $args, $shortoptions, $longoptions);
 print_r($options);
 ?

 But that returns an array with more then one dimension and i have no idea
 how to loop though to set variables like i did with getopt().

Ok, here $options consists of 2 arrays, the first ($options[0]) is an array 
containing all the valid options. To read them you can use:

  foreach ($options[0] as $opt) {
echo Option::{$opt[0]}   Value::{$opt[1]}\n;
  }

 My questions are what is the preferred way to get command line options,
 is there a way to give errors 

Yes, you manually check for them!

 and take long arguments with getopt(),

Doesn't look it.

The second array ($options[1]) just contains the rest of your command line.

Using Console_Getopt if an unknown option/switch is given a PEAR_Error is 
raised thus you have to check/trap for that.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
San Francisco isn't what it used to be, and it never was.
-- Herb Caen
*/


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




[PHP] Re: Making alternate rows of different colour

2003-01-17 Thread rush
Denis L. Menezes [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I put the output of the database query in a table. It works fine. Now I
have a need to make the alternate rows of a different color.

 Can someone please help me with the code?

See one possible solution (with TemplateTamer) :

http://www.templatetamer.org/index.php?AlternatingListExample

rush
--
http://www.templatetamer.org/




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




Re: [PHP] fit window to image

2003-01-17 Thread Marek Kilimajer
You need to change directory permissions too

Ezequiel Sapoznik wrote:


ok, I try with

?php
$size = getimagesize (../images/1817.jpg);
echo $size;
?

to then use the x and y with a javascript code like:

window.open
('win_sizer.html','Photo','toolbar=yes,status=yes,scrollbars=yes,location=ye
s,menubar=yes,directories=yes,width=x,height=y')

But in the php part, I am receiving the following error:

Warning: getimagesize: Unable to open '../images/1817.jpg' for reading. in
/home/sites/site8/web/prueba.php on line 12

I'd like to add that I changed mode to 777 (UNIX)

Thank you for your help.

Ezequiel


Justin French [EMAIL PROTECTED] escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 

php can help, but remember, PHP only outputs HTML code to the browser...
   

it
 

can't actually resize the window, because that's a client-side thing like
javascript.

but you can find out the x and y of an image with
http://www.php.net/manual/en/function.getimagesize.php

Then use this information in a javascript which resizes the browser
   

window.
 

Of course for the javascripts, you'd need to ask a JS list, and remember
that not everyone has javascript, and not everyone enjoys the web
   

developer
 

resizing their windows and 'taking control' of their browsers :)


Justin


on 17/01/03 12:37 PM, Ezequiel Sapoznik ([EMAIL PROTECTED]) wrote:

   

Hi!

Is there anyway in php to fit the window to the size of an image?

Thanks!

Ezequiel


 




 



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




Re: [PHP] Meta Refresh

2003-01-17 Thread Marek Kilimajer
META HTTP-EQUIV=refresh CONTENT=15; URL=early-tour.php?ID=?php echo
$NewID;?


misplaced quote, missing semicomma, and redundant space

Edson Waite wrote:


Hi All,

I am trying to make an automated tour as a section of my site, using the
following.

?php
$NewID = $colname_earlytour + 1;
?
META HTTP-EQUIV=refresh CONTENT=15 URL=early-tour.php?ID= ?php echo
$NewID;?

This works great going from early-tour?ID=1 to early-tour?ID=2 but I can't
get it to continue on to ID=3, ID=4 etc. It just keeps reloading the data
from ID=2

The data for each page is in a row identified by a unique ID# I just want
the page to reload with the data from the next ID# after a givin time 15
seconds.

Thanks in advance for any ideas,
Edson Waite III
http://www.sportsvideooutlet.com





 



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




RE: [PHP] Re: Making alternate rows of different colour

2003-01-17 Thread Edward Peloke
I did this by defining two colors, and as I looped through the query, I
would just change it each time...

ex...

$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';

 }

Eddie

-Original Message-
From: rush [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 8:55 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Making alternate rows of different colour


Denis L. Menezes [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I put the output of the database query in a table. It works fine. Now I
have a need to make the alternate rows of a different color.

 Can someone please help me with the code?

See one possible solution (with TemplateTamer) :

http://www.templatetamer.org/index.php?AlternatingListExample

rush
--
http://www.templatetamer.org/




--
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] little Prob...

2003-01-17 Thread Manohar Ramjibhai Solanki
Sir
 I am using PHP4.2.2  with gd 1.6.2 But my web host has 
PHP4.2.3
 with gd2.0.0So I needed to ask U as How to upgrade 
PHP4.2.2
 to PHP4.2.3...Also same for gd1.6.2. to gd 2.0.0.
 Is there any step by step procedure for doing this if so 
Please
 mail me I'll be thankfull to U
 Waiting for response.
 Manohar





 NIIT supports World Computer Literacy Day on 2nd December.
 Enroll for NIIT SWIFT Jyoti till 2nd December for only Rs. 749
 and get free Indian Languages Office software worth Rs. 2500.
 For details contact your nearest NIIT centre, SWIFT Point
 or click here http://swift.rediff.com/


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



Re: [PHP] Changing page orientaion for printing

2003-01-17 Thread Marek Kilimajer
No, but you can use pdf

Stanislav Skrypnik wrote:


Hi everybody,
Is it possible using PHP change page orientation in browser so that when
user clicks
on Print button page automatically rotated to landscape orientation.
I've heard that it is possible to do with ActiveX but due to security reason
ActiveX might be disabled.
Thanks for any help in advance,
Stas.



 



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




php-general Digest 17 Jan 2003 14:10:35 -0000 Issue 1828

2003-01-17 Thread php-general-digest-help

php-general Digest 17 Jan 2003 14:10:35 - Issue 1828

Topics (messages 131956 through 132006):

Re: Display Dates in English o_O
131956 by: Rick Emery
131984 by: Tom Rogers

Re: fit window to image
131957 by: Justin French
131958 by: Ezequiel Sapoznik
132002 by: Marek Kilimajer

output sql
131959 by: Paul Marinas
131960 by: Timothy Hitchens \(HiTCHO\)

Create unike variables for each record
131961 by: Lars Espelid
131964 by: Lars Espelid
131966 by: Justin French
131969 by: Jason Sheets

Re: postfix instead of sendmail
131962 by: Timothy Hitchens \(HiTCHO\)

Meta Refresh
131963 by: Edson Waite
131967 by: Jason Wong
131968 by: Edson Waite
131970 by: Jason Wong
131975 by: roel
131996 by: Ford, Mike   [LSS]
132003 by: Marek Kilimajer

--with-mcal=/usr/local/mcal compilation issue
131965 by: Roger Thomas

Re: Php's future with Asp .NET?
131971 by: Tariq Murtaza

Changing page orientaion for printing
131972 by: Stanislav Skrypnik
132006 by: Marek Kilimajer

global variables
131973 by: Dara Dowd
131977 by: Jason k Larson

Making alternate rows of different colour
131974 by: Denis L. Menezes
131976 by: Rasmus Lerdorf
131986 by: Chris Hayes
132001 by: rush
132004 by: Edward Peloke

Re: Passing Arrays Through Forms
131978 by: Sancar Saran

Re: GD version 1.6.2 and resizing images...
131979 by: Marco Alting
131982 by: Jason Wong

Curl Linux Console String -- PHP Translation
131980 by: Andrian Ivanov

Re: Security in included PHP files
131981 by: Philippe Saladin

Re: Ever complained about lousy PHP programmers?
131983 by: Tom Rogers

Re: What's the PHP-equivalent of Perl's AUTOLOAD feature?
131985 by: Chris Hayes

Alternate row colours - what is wrong with this code?
131987 by: Denis L. Menezes
131988 by: Clarkson, Nick
131989 by: Jason Wong
131991 by: Chris Hayes
131992 by: Clarkson, Nick

PDF
131990 by: Brian McGarvie
131993 by: Larry Brown

opening tex file
131994 by: Artur Bereœniewicz
131995 by: Jason Wong
131999 by: Chris Hayes

Re: x12 837
131997 by: Edward Peloke

Re: session_destroy have strange effect
131998 by: Marek Kilimajer

Re: getopt usage?
132000 by: Jason Wong

little Prob...
132005 by: Manohar Ramjibhai Solanki

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]


--

---BeginMessage---
look at mysql's DATE_FORMAT()   Let mysql do it for you, instead of PHP
- Original Message -
From: Stephen
To: PHP List
Sent: Thursday, January 16, 2003 7:16 PM
Subject: [PHP] Display Dates in English o_O


I have a PHP driven site that as a time schedule. Since the site isn't exactly filled 
with very
intellagent people who just LOVE to translate times and dates from a weird format 
(Such as the
format used in MySQL), I'd like to take these from a MySQL table (the table's types 
are DATE and
TIME) and translate the date to something like Thrusday, January 16th, 2003 when the 
date strate
from the table is 2003-01-16. Then with time, I'd like it to read something like 
8:00 PM when it
reads straight from the table 20:00:00. Another feature I'd like to have it 
timezones but that's
not the point of this message. If you don't mind, though, could you also tell me how 
to configure
the times according the the timezone a user has chosen?

Thanks,
Stephen Craton
http://www.melchior.us

What's the point in appearance if your true love, doesn't care about it? -- 
http://www.melchior.us



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


---End Message---
---BeginMessage---
Hi,

Friday, January 17, 2003, 11:16:53 AM, you wrote:
S I have a PHP driven site that as a time schedule. Since the site isn't exactly 
filled with very intellagent people who just LOVE to translate times and dates from a 
weird format (Such as the
S format used in MySQL), I'd like to take these from a MySQL table (the table's types 
are DATE and TIME) and translate the date to something like Thrusday, January 16th, 
2003 when the date strate
S from the table is 2003-01-16. Then with time, I'd like it to read something like 
8:00 PM when it reads straight from the table 20:00:00. Another feature I'd like 
to have it timezones but
S that's not the point of this message. If you don't mind, though, could you also 
tell me how to configure the times according the the timezone a user has chosen?

S Thanks,
S Stephen Craton
S http://www.melchior.us

S What's the 

Re: [PHP] global variables

2003-01-17 Thread Marek Kilimajer
For this use globals, it would be painfull to pass everything. But you 
can also use some class that would keep track of such things.

Dara Dowd wrote:

Is it better to pass variables through functions or to simply declare them as global within the function's scope?
The variables in this particular case are things like MySQL database connections and tablenames.
Thanks,Dara
 



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




Re: [PHP] Making alternate rows of different colour

2003-01-17 Thread Marek Kilimajer
while($row=mysql...) {
   $color=($color=='red' ? 'blue' : 'red');
   echo ...
}

Denis L. Menezes wrote:


Hello friends.

I put the output of the database query in a table. It works fine. Now I have a need to make the alternate rows of a different color.

Can someone please help me with the code?

Thanks
Denis

 



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




[PHP] PHP and SQL

2003-01-17 Thread Kelvin Poon

Hi all,

My company had just ordered a SQL 2000 Server.  I need to make a webpage 
that collects data from the Server's database.  I guess I need to use PHP 
with SQL.  My question is what is the difference between SQL and mySQL?  I 
brought a book that teaches you how to use PHP with MymySQL, I am just 
wondering if this book will give me a good enough idea of how to do my job, 
since I know a little bit of SQL already.  Please advise, thanks.

Kelvin



_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


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



Re: [PHP] PHP and SQL

2003-01-17 Thread Adam Voigt




SQL Server 2000 has a book's online sort of thing, it's a help manual that is installed

while your installing the SQL Server client (Enterprise Manager) or server, it's been

invaluable in figuring out functions specific to MSSQL. I highly recommend just using

that.



On Fri, 2003-01-17 at 09:19, Kelvin Poon wrote:

Hi all,



My company had just ordered a SQL 2000 Server.  I need to make a webpage 

that collects data from the Server's database.  I guess I need to use PHP 

with SQL.  My question is what is the difference between SQL and mySQL?  I 

brought a book that teaches you how to use PHP with MymySQL, I am just 

wondering if this book will give me a good enough idea of how to do my job, 

since I know a little bit of SQL already.  Please advise, thanks.



Kelvin







_

MSN 8 with e-mail virus protection service: 2 months FREE* 

http://join.msn.com/?page=features/virus





-- 

PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP] Acessing $DOCUMENT_ROOT

2003-01-17 Thread Don
Hi,

How do I access $DOCUMENT_ROOT when register_gobals is set off?  I think
there's an array, something like $HTTP_ENV_VARS['DOCUMENT_ROOT'] but I can't
find it in the documentation.

Thanks,
Don


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


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




[PHP] Problems reading e-mail body when having attachements .....

2003-01-17 Thread Samuel Costa
I'm using the following code to parse the structure of the mail messages,
function parse($structure)
{
global $type;
global $encoding;

// create an array to hold message sections
$ret = array();

// split structure into parts
$parts = $structure-parts;

/*
iterate through parts
and create an array whose every element
represents one part
each element is itself an associative array
with keys representing the
- part number
- part type
- encoding
- disposition
- size
- filename
*/
for($x=0; $xsizeof($parts); $x++)
{
$ret[$x][pid] = ($x+1);


$this = $parts[$x];
// default to text

if ($this-type == )
{
$this-type = 0;
}
$ret[$x][type] = $type[$this-type] . / . strtolower($this-subtype);

// default to 7bit
if ($this-encoding == )
{
$this-encoding = 0;
}

$ret[$x][encoding] = $encoding[$this-encoding];


$ret[$x][size] = strtolower($this-bytes);

$ret[$x][disposition] = strtolower($this-disposition);

if (strtolower($this-disposition) == attachment)
{
$params = $this-dparameters;
foreach ($params as $p)
{
if($p-attribute == FILENAME)
{
$ret[$x][name] = $p-value;
break;
}
}
}
}

return $ret;
}



and when i use to show the the contents with the following code

if(is_array($sections))
{
echo sizeof($sections);
for($x=0; $xsizeof($sections); $x++)
{
if(($sections[$x][type] == text/plain || $sections[$x][type] ==
message/rfc822)  ($sections[$x][disposition] != attachment))
{

$text.= htmlspecialchars(stripslashes(trim(imap_fetchbody($inbox, $id,
$sections[$x][pid];
$text.= br;
}
}
}
else
{
$text.= htmlspecialchars(stripslashes(trim(imap_body($inbox, $id;
}

$headers = imap_header($inbox, $id);
$structure = imap_fetchstructure($inbox, $id);

// if multipart, parse
if(sizeof($structure-parts)  1)
{
$sections = parse($structure);
$attachments = get_attachments($sections);
}

if i only have text it works fine, but if i have attachements it only shows
the attachements and not the body text.

Any thought on why does this happens?

g

Thanks in advance,

Sam da Costa





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




Re: [PHP] What's the PHP-equivalent of Perl's AUTOLOAD feature?

2003-01-17 Thread Chip Castle
Hi Chris,

Thanks for the info.  I probably need to make myself more clear, as I'm 
not referring to a database abstraction layer in terms of drivers (e.g., 
dbx in PHP, DBI in Perl).

I think the best example of what I'm talking about is in Tim Kientzle's 
Perl and Rapid Database Prototyping article of December's TPJ:
http://www.chipcastle.com/tpj/TPJDecember2002.pdf

The first few paragraphs should give you the basic idea, so let me know 
if you have any suggestions.

Thanks!

Chip Castle / Open Source Web Developer
http://www.chipcastle.com


Chris Hayes wrote:
At 02:06 17-1-2003, you wrote:


I just read an interesting article in The Perl Journal (TPJ) about using
AUTOLOAD as a layer of abstraction for accessing database columns and I
would like to write something similar in PHP.  Is this possible?



If you mean some sort of database abstraction so one script would work 
on MySQL as well as Oracle; there is not such a thing within PHP itself. 
The google search term would 'database abstraction layer' and a popular 
one is ADODB (not to be confused with the other adoDB), at 
http://php.weblogs.com/ADODB.

If that's not what you mean please try to explain it again

Chris Hayes









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




[PHP] Re: Acessing $DOCUMENT_ROOT

2003-01-17 Thread Philip Hallstrom
$_SERVER[DOCUMENT_ROOT]

On Fri, 17 Jan 2003, Don wrote:

 Hi,

 How do I access $DOCUMENT_ROOT when register_gobals is set off?  I think
 there's an array, something like $HTTP_ENV_VARS['DOCUMENT_ROOT'] but I can't
 find it in the documentation.

 Thanks,
 Don


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


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




Re: [PHP] Acessing $DOCUMENT_ROOT

2003-01-17 Thread Chris Hewitt
Don wrote:


How do I access $DOCUMENT_ROOT when register_gobals is set off?  I think
there's an array, something like $HTTP_ENV_VARS['DOCUMENT_ROOT'] but I can't
find it in the documentation.


$_SERVER['DOCUMENT_ROOT']

HTH
Chris


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




Re: [PHP] Changing page orientaion for printing

2003-01-17 Thread Joshua Pierre
On Fri, Jan 17, 2003 at 05:07:30PM +1100, Stanislav Skrypnik wrote:
 Hi everybody,
 Is it possible using PHP change page orientation in browser so that when
 user clicks
 on Print button page automatically rotated to landscape orientation.
 I've heard that it is possible to do with ActiveX but due to security reason
 ActiveX might be disabled.
 Thanks for any help in advance,
 Stas.

I am fairly sure this can be done with cascading style sheets (CSS)
automatically.

Have a look here:- http://www.w3.org/TR/REC-CSS2/media.html

Cheers,

Josh

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




[PHP] Re: Meta Refresh

2003-01-17 Thread Edson Waite
Thanks for the assistance, It now works.

I have to figure out how to stop it at the end of the tale and force it it
to another page but I will mess with that for a while before asking for
help.

Thanks again to all who helped,
Ed Waite

Edson Waite [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi All,

 I am trying to make an automated tour as a section of my site, using the
 following.

 ?php
 $NewID = $colname_earlytour + 1;
 ?
 META HTTP-EQUIV=refresh CONTENT=15 URL=early-tour.php?ID= ?php echo
 $NewID;?

 This works great going from early-tour?ID=1 to early-tour?ID=2 but I can't
 get it to continue on to ID=3, ID=4 etc. It just keeps reloading the data
 from ID=2

 The data for each page is in a row identified by a unique ID# I just want
 the page to reload with the data from the next ID# after a givin time 15
 seconds.

 Thanks in advance for any ideas,
 Edson Waite III
 http://www.sportsvideooutlet.com







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




[PHP] Sessions or Cookies?

2003-01-17 Thread Cesar Aracena
Hi all,

I'm about to create a site where visitors will be able to search, view,
surf and add items to a shopping cart without logging in to the site,
but will need to do that in order to complete the transaction of course.
What I wonder, is what to use to collect information about the items the
visitor has chosen in order to show them in the cart section... Should I
use the no-so-secure old cookies method or should I start a new session
every time a client drops in and handle each cart by session name or ID?

Of course I would rather store every visitor's temporary cart in a long
MySQL DB and not in their Hard Disks because of those 4 Kb of limit
cookies have.

Any suggestions? Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




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




[PHP] DB replicated on RAM disk?

2003-01-17 Thread typea
This got long, but I structured it so one can stop reading when one gets
bored or mired in minutia, and constructively answer based on what was
read so far.

So feel free to stop reading after only a couple paragraphs and fire off a
response :-)

+++ marks good stopping-points for this cumulative post/response deal.

I'll take any other random suggestions for how to drasticly improve
full-text index/search performance, of course!  I examined the PostgreSQL
contrib/ directory solutions -- fulltextindex didn't help, and the other
option required software/processes we're not able to maintain at this
time.

THANKS!!!


Under what real-world conditions does a read-only replication of a DB on a
RAM disk make sense?

Any quick tips for what NOT to do if I just want to run a quick crude
benchmark trial sort of thing using PostgreSQL and PHP?

+++

A Google for PostgreSQL RAMdisk turned up only one brief article that
seemed geared toward a very small dataset for a hobbyist type site where
performance was more about principle than real-world need.  (Though it was
a VERY nice article with very concise directions and great warnings about
what if)

Perhaps I should have Googled for MySQL RAMdisk and hoped the parallels
were accurate?  I'll give it a shot, but am leery of invalid information
from that cross-db assumption.  Any comment on the likelihood of
non-PostgreSQL info being applicable?

Mailing List archives turned up some interesting discussions, but were
generally not conclusive.

+++

Or, to make this easier to answer, if somewhat less useful generally in
the archive, do you predict it would significantly boost performance (and
why or why not) for:

Intel Pentium III, 1.4 G MHz
RAM 1G
PostgreSQL 7.3
currently *NEEDS* shared_buffers = 256M, has 512M as safety
also set sort_mem = 16384 - not sure it helped/hurt
also tried to turn query/perofrmance logging on,
but never did find the darn log files to view anything useful (Help!)
PHP 4.2.3
The database itself is sucking down 2.6 Gig of hard drive space:
du -hc .
3.6M./base/1
3.6M./base/16975
4.0k./base/16976/pgsql_tmp
2.3G./base/16976
4.0k./base/3087869/pgsql_tmp
120M./base/3087869
2.5G./base
140k./global
113M./pg_xlog
720k./pg_clog
2.6G.
2.6Gtotal

+++

Obviously I cannot currently replicate that whole thing in RAM.

However, a large chunk (1 Gig-ish) of that is a 12 million row table of
(int4+int4+int4) == 96 byte records that I was hoping would allow a
self-join of word position (concordance) which would be faster than the
RegEx across 18000 articles of 0 to 270K in length.

Another large chunk (750 Meg-ish) is a 10 million (int4+int4+smallint) =
80 byte records which are currently being used (and probably must remain)
to cross index a dictionary with each article and its frequency in the
article.

This 750 Meg table took queries ranging from two minutes to an unknown
time down to the 10 second magnitude.  I doubt that the RAM disk is going
to be enough boon to beat that, right?

I believe that before I added these tables, we were looking at ~200 Meg of
data, which makes a little more sense on a RAM disk.

+++

An answer that involves paying for more RAM and making it 40X as fast
would be fine, of course.

So if I trade the 1.8 Gig concordance[s] for a RAM disk will the RAM disk
give 4X to ??X performance improvement to make up for the concordance
gains I've already achieved?

+++

Big Picture:
It's a custom search engine of texts from over 50 years' worth of a
magazine using some specific meta-data to provide searching.

Full-text index searching has been the biggest challenge.  No surprise
there -- But I had hoped for more definitive solutions out there in
algorithms and such-like.  There were off-the-shelf projects (eg
ht://dig), but they didn't fit in with some of the meta-data and design
constraints.

I've managed to create a concordance of article/word/frequency that has
sped up most queries from minutes to ~10 seconds.

Alas, the support for a NEAR b is at risk, because the RegEx on 18000
rows of text from 0 to 270K takes too long.  (We can drop NEAR if we have
to, maybe, but would rather not.)

Only now am I realizing I probably underestimated that 12 million number
-- It probably is closer to 20 million or even 40 million.  Hard to say
for sure until the actual text is indexed or I run a random sampling at
least.

I don't even have real data in that table yet -- Just used semi-random
numbers to populate it for benchmarking to see what sort of gains I might
get.  (Answer:  4X is great, but it's not enough.)

And the concordance with full positional information (eg word foo
appears in article 57 at offset 42) requires an [under-]estimated 12
million row self-join.

A sample table of that magnitude clocks in at 30 seconds just for two
words a NEAR b without even trying (yet) to correlate those with the
actual articles via the dictionary/concordance 

Re: [PHP] Sessions or Cookies?

2003-01-17 Thread Chris Shiflett
--- Cesar Aracena [EMAIL PROTECTED] wrote:
 Should I use the no-so-secure old cookies method
 or should I start a new session every time a client
 drops in and handle each cart by session name or ID?

My advice is to only use cookies to identify a Web client.
Any data you want to associate with that Web client (user
data, for example) should be stored on the server -
database, session store, etc.

Chris

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




[PHP] Question about using session and logging out

2003-01-17 Thread Don
Hi,

I have an application that uses sessions to allow customers to access a restricted 
area.  That is, they are prompted for a user login and password.  I then use sessions 
to track each customer.  At the top of each page, I have placed the following PHP code:

session_cache_limiter('Cache-control: private');
session_start();

Everything works fine.  However, I have a logout link that when clicked, runs the 
following PHP code (where userid is the login name):

session_cache_limiter('nocache');
if (isset($HTTP_SESSION_VARS['userid'])) {
   $HTTP_SESSION_VARS['userid'] = '';
   session_unregister($HTTP_SESSION_VARS['userid']);
}
session_unset();
session_destroy();
Header('Location: ' . 'http://www.lclnav.com' . $globals-relative_path . 
'customerlogin_standard.html');

I think the above is all that is needed to end the session.  I use the Header() 
function to take the user back to the login  page.

Here is my question:  Once I click on the logout link and am taken back to the main 
login page, I can click on the browser BACK button and still get my previous page 'as 
if I was still logged in'.  Please note that clicking on REFRESH tells me that I am 
not really logged in.

I know that browsers cache pages and there may not be anything I can do, however, I 
have seen sites that seem to work around this; i.e.., clicking on the back button 
loads a pages telling the user that they are no longer logged in.  This is what I want 
to emulate.  Is there a PHP method to always force a reload the first time a page is 
called?

Thanks,
Don


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


[PHP] Header sent polem

2003-01-17 Thread Cesar Aracena
Hi all,

Following Chris's idea on how to handle visitors sessions, I'm trying to
setup a cookie with a randomly generated session ID but it throws me the
headers already sent notice but there's nothing above the setcookie
function. Here's part of my code:

?
if (!isset($sessid))
{
require_once(PasswordGenerator.php);
$Password = new PasswordGenerator(10, 10);
$RandPassword = $Password-getHTMLPassword();
setcookie(sessid, .print($RandPassword)., time()+3600);
}
else if (isset($sessid))
{
echo $sessid;
}
[---snip---]

and after all this is then called the header and main files... What is
getting outputted to the browser?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




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




RE: [PHP] Header sent polem

2003-01-17 Thread Matt Schroebel
 -Original Message-
 From: Cesar Aracena [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, January 17, 2003 12:56 PM
 Subject: [PHP] Header sent polem
 
 
 Hi all,
 
 Following Chris's idea on how to handle visitors sessions, 
 I'm trying to
 setup a cookie with a randomly generated session ID but it 
 throws me the
 headers already sent notice but there's nothing above the setcookie
 function. Here's part of my code:
 
 ?
 if (!isset($sessid))
 {
 require_once(PasswordGenerator.php);

Look for white space in the include file ...

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




[PHP] Random string (was Header sent problem)

2003-01-17 Thread Cesar Aracena
I found that the Header already sent problem was caused by the Random
Password Generator I'm using, even if I place this function on the
bottom of the same file I'm trying to open an just call for the result.

So, to avoid this issue, I need another method of generating a random
number or string of some sort like using the actual time which I can
place inside the setcookie function directly... anyone knows what can I
use?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




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




Re: [PHP] Random string (was Header sent problem)

2003-01-17 Thread Marek Kilimajer
The function is not the real problem, you just need to find any
characters (even white) outside ?php ?

Cesar Aracena wrote:


I found that the Header already sent problem was caused by the Random
Password Generator I'm using, even if I place this function on the
bottom of the same file I'm trying to open an just call for the result.

So, to avoid this issue, I need another method of generating a random
number or string of some sort like using the actual time which I can
place inside the setcookie function directly... anyone knows what can I
use?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




 



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




[PHP] Something difference betwen php-4.0.3 and php-4.2.3

2003-01-17 Thread andre . lagadec
Hello,

I try to move an Web application in Php-4.0.3 to php-4.2.3, and some
programs
don't work well on some pages. I  make search in the code, and after
tests, I find that
the following code doesn't work in php-4.2.3, but works in php-4.0.3pl1


html
body
form
?
$i = 0;
while ($i=3) {
  $selected = ;
  $selectTab[$i] = option value='.$i.' .$selected. bla bla
/option\n;
  $i++;
  }
printf(select name='filiere' multiple size='%d' class='textNoir'\n,
($i-1) );
$j = 0;
while ( $j = $i ) {
  printf($selectTab[$j]);
  $j++;
  }
printf(/select);
?
/body
/html


It's because there is an error in the code : this instruction is wrong
while ( $j = $i ),
there is an out of range in the array selectTab[] when $j=$i=4
the good instruction is while ( $j  $i )

Is there something changed in the gestion of the error out of range in
an array
betwen php-4.0.3pl1 and php-4.2.4 ?

Thanks for your help ?

AL


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




RE: [PHP] Random string (was Header sent problem)

2003-01-17 Thread John W. Holmes
 I found that the Header already sent problem was caused by the Random
 Password Generator I'm using, even if I place this function on the
 bottom of the same file I'm trying to open an just call for the
result.
 
 So, to avoid this issue, I need another method of generating a random
 number or string of some sort like using the actual time which I can
 place inside the setcookie function directly... anyone knows what can
I
 use?

If the function is the problem, then stop echoing or printing anything
in the function, before it, or after it. Make sure there is nothing
outside of the ? And ? tags, especially an extra line break after the
closing ? of the file if it's an include file.

And, you can use uniqid() to create a random string.

---John Holmes...



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




[PHP] mail () error

2003-01-17 Thread Stephen Goehler
Anyone know what causes this error?

Warning: mail ()[function.mail]: Failed to receive

Can it not find the mail server?

On a side note, is there a PHP resource on the net that will listed error
messages and their possible causes?

Thanks,

Steve



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




RE: [PHP] mail () error

2003-01-17 Thread John W. Holmes
 Anyone know what causes this error?
 
 Warning: mail ()[function.mail]: Failed to receive
 
 Can it not find the mail server?

When I got this error it was because the server was rejecting the email,
saying it wouldn't relay the message. Maybe check your relay setting in
your SMTP server?

---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] Converting accented characters or numeric equivalents to non-accented

2003-01-17 Thread Ian M. Evans
Does anyone have a quick PHP function for converting accented characters to
their non-accented forms? It would really help a lot with Amazon searches,
etc.

For example something that can turn:

Renée Zellweger into Renee Zellweger

Along that same vein, turning

Ren#233;e Zellweger into Renee Zellweger

Thanks!

--
Ian Evans
Digital Hit Entertainment
http://www.digitalhit.com


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




RE: [PHP] PHP and SQL

2003-01-17 Thread John W. Holmes
 My company had just ordered a SQL 2000 Server.  I need to make a
webpage
 that collects data from the Server's database.  I guess I need to use
PHP
 with SQL.  My question is what is the difference between SQL and
mySQL?  I
 brought a book that teaches you how to use PHP with MymySQL, I am just
 wondering if this book will give me a good enough idea of how to do my
 job,
 since I know a little bit of SQL already.  Please advise, thanks.

You'd want a book that's specific to MSSQL. Yes, the underlying SQL is
the same in each one, but each has a list of functions and features that
are specific to it. Having a book on what you're actually using is going
to be most useful.

Don't chuck the MySQL book, though. Read it in conjunction with the
other and you'll get the best of both worlds...

---John Holmes...




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




RE: [PHP] Session Length

2003-01-17 Thread John W. Holmes
 I am using Sessions to secure parts of my website. I need to know if
 there is a way to set a lifetime for these sessions , so that they are
 automatically destroyed when say the user is inactive for 30 minutes.

It's already there, the session.gc_maxlifetime setting (default is 1440
seconds). 

Actually, this will only work if garbage_collection works on your
server. It's all explained on the session page.

If gc doesn't work on your system, then register a timestamp in the
session that get's updated with each action. Then just look for
timestamps over 30 minutes old and make them log in again.

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




RE: [PHP] OOP

2003-01-17 Thread John W. Holmes
 Nice work on php archittect by the way :)
 Thanks again,
 Jordan

Thank you. 

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




RE: [PHP] Re: Images : Store in dB or disk?

2003-01-17 Thread John W. Holmes
 With regards to Marek,
 I don't see how there would be two queries, because there row
conisists of
 image properties and image data. So when i select the required row(s),
I
 will have properties and images. So it will be 1 query, of course it
is a
 big (size-wise) query.

Hopefully you've gotten the point that this isn't true. If you store
your images in the database, it's going to make your main script execute
one query to output something like img src=file.php?id=xxx
...properties... for each image. Each one of those img tags will be a
separate request where file.php would pull the data for _one_ image,
send the headers and then send the data. 

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




RE: [PHP] What's the PHP-equivalent of Perl's AUTOLOAD feature?

2003-01-17 Thread John W. Holmes
 I just read an interesting article in The Perl Journal (TPJ) about
using
 AUTOLOAD as a layer of abstraction for accessing database columns and
I
 would like to write something similar in PHP.  Is this possible?
 
 I have written a number of PHP/MySQL applications, but do not consider
 myself an expert.  I cannot find anything on various PHP-related
 websites and was hoping someone with more in depth knowledge would be
 able to make a few suggestions.

Okay, so if I understand it correctly, you'd try to call a method such
as $class-method() where method() doesn't actually exist. You'd want to
catch that error, look for a column named 'method' in a table, and
either set, return, or do both for the value in the column?

If you call an unknown function, it produces a fatal error, so I don't
think that can be trapped by set_error_handler and acted on. 

In order to do this, I think you'd have to do something like
$class-method(phone,555-1212);

method() will look for a phone function and call it if it exists.
Otherwise, look for a phone column and set/retrieve the value...

---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] Re: occasional mcrypt problems

2003-01-17 Thread Steve Yates
After much testing, I think I may have it.  It appears that MySQL is
dropping a trailing space from the value being inserted into the database!
For example if the encrypted string is (.A®¢m¸¼'À  MySQL stores the
value without the trailing space (and it is a space).  Why is that?  I can
duplicate this by entering test  as the field value too.

 - Steve Yates
 - Life would be easy if we had the source code.

~ Taglines by Taglinator - www.srtware.com ~



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




Re: [PHP] mail () error

2003-01-17 Thread Stephen Goehler
Thanks, the server was relaying, but it turned out to be the firewall that
was rejecting the request.

Now I have a new problem thought, my mail () command will send the mail (and
I receive it) but it will just hang there and eventually return this:

Fatal error: Maximum execution time of 30 seconds exceeded

The email goes through, but it won't process any of the code after it.  Is
it waiting for a response from the mail server?  Can I disable that?

Steve

John W. Holmes [EMAIL PROTECTED] wrote in message
004901c2be5a$a384f910$7c02a8c0@coconut">news:004901c2be5a$a384f910$7c02a8c0@coconut...
  Anyone know what causes this error?
 
  Warning: mail ()[function.mail]: Failed to receive
 
  Can it not find the mail server?

 When I got this error it was because the server was rejecting the email,
 saying it wouldn't relay the message. Maybe check your relay setting in
 your SMTP server?

 ---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] Is it safe to enable unused extensions?

2003-01-17 Thread Mohanaraj
Hi,

I might need to enable several extension - out of which only a single one is 
used. Do these extra extensions that are enabled but not used eat up 
appreciable amounts of memory or in any way slow down PHP?

Thank you and best regards,
Mohanaraj

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




[PHP] Number Sign in String Variables

2003-01-17 Thread Joab Ben Stieglitz
I have a MySQL database that includes data with the # sign in some data
fields.  My PHP script pulls the data out of the database fine, but when I
got to write back to the database, I get errors because the string gets
truncated at the # sign.  For example:

 $query = INSERT INTO order_detail
   SET customer_id = -1,
   order_id = $order_no,
   item_id = $item_id,
   item_num = \$item_num\,
   unit = \$unit\,
   short_desc = \$short_desc\,
   quantity = $quantity,
   wholesaler = \$wholesaler\,
   cost = $cost,
   sale_price = $sale_price;

This statement fails if $short_desc contains a # sign.  The string stops at
the # sign, and all the subsequent fields are empty or garbage.

None of the various resources I have looked at indicate that the # sign is a
special character.  Any suggestions?

--
Joab Ben Stieglitz
[EMAIL PROTECTED]



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




Re: [PHP] mail () error

2003-01-17 Thread Thomas Seifert
The mail-server has to respond that it received the mail.
Maybe you've set the firewall only one-way open?


Thomas

On Fri, 17 Jan 2003 15:29:32 -0500 [EMAIL PROTECTED] (Stephen Goehler) wrote:

 Thanks, the server was relaying, but it turned out to be the firewall that
 was rejecting the request.
 
 Now I have a new problem thought, my mail () command will send the mail (and
 I receive it) but it will just hang there and eventually return this:
 
 Fatal error: Maximum execution time of 30 seconds exceeded
 
 The email goes through, but it won't process any of the code after it.  Is
 it waiting for a response from the mail server?  Can I disable that?
 
 Steve
 
 John W. Holmes [EMAIL PROTECTED] wrote in message
 004901c2be5a$a384f910$7c02a8c0@coconut">news:004901c2be5a$a384f910$7c02a8c0@coconut...
   Anyone know what causes this error?
  
   Warning: mail ()[function.mail]: Failed to receive
  
   Can it not find the mail server?
 
  When I got this error it was because the server was rejecting the email,
  saying it wouldn't relay the message. Maybe check your relay setting in
  your SMTP server?
 
  ---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] Curl-functions + socket send and receive... where is thedocumenation ?

2003-01-17 Thread Stefan Vetter
I just need some documentation on how to get curl to send to and receive
from a socket. Since there is no such information on www.php.net/curl.

Anyone, who can help me with that ?


Stefan




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




[PHP] Curl Problem

2003-01-17 Thread Jeff Hatcher
How do you retrieve a session cookie with curl?
How do you trick a page to make it think that it was submit from within the domain?
www.domainname.com/index.php - www.domainname.com/logincheck.php (validates the from 
address)

Any help would be greatly appreciate.

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




Re: [PHP] Re: Images : Store in dB or disk?

2003-01-17 Thread Bobby Patel
That makes sense. When Marek explained it I didn't realise that IMG tags
can't use the raw data, and needs to make a seperate HTTP request for the
Headers.

Now, I understand. Unfortunately the desicion has been made to go with the
database.

Oh well, I can always code the scripts to store and grab from the
filesystem, after if need be.

Thank you everyone, who has responded.


John W. Holmes [EMAIL PROTECTED] wrote in message
004d01c2be5c$631f4ea0$7c02a8c0@coconut">news:004d01c2be5c$631f4ea0$7c02a8c0@coconut...
  With regards to Marek,
  I don't see how there would be two queries, because there row
 conisists of
  image properties and image data. So when i select the required row(s),
 I
  will have properties and images. So it will be 1 query, of course it
 is a
  big (size-wise) query.

 Hopefully you've gotten the point that this isn't true. If you store
 your images in the database, it's going to make your main script execute
 one query to output something like img src=file.php?id=xxx
 ...properties... for each image. Each one of those img tags will be a
 separate request where file.php would pull the data for _one_ image,
 send the headers and then send the data.

 ---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] $HTTP_GET_VARS

2003-01-17 Thread Mike Tuller
I am following an example in a book and have run into a problem with a 
script that I am trying to run under PHP 4.3.0. What I have is a page 
that you click on an id number that is from a listing in a database, 
and it is supposed to take you to a page to edit that item. I have the 
id sent in the url (http://127.0.0.1/asset/editasset.php?id=3) and the 
book says to use $HTTP_GET_VARS to take that id and display the record 
for editing on a separate page. When I use $HTTP_GET_VARS nothing is 
returned, and I am thinking that I can't use $HTTP_GET_VARS in PHP 
4.3.0, so what do I need to use?

Thanks,
Mike


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



[PHP] Re: Question about using session and logging out

2003-01-17 Thread Bobby Patel
I believe there something (a meta tag?) called  meta-refresh or just
refresh.

But I believe you have to set the refresh interval. and if you set the
interval to small it might eat your server's resources.

OR I just thought of this, sometimes when you get to a page (usually with
forms?) it says that the page is expired and must be refreshed. Maybe you
can get that behaviour, so that when someone hits back, they have to
refresh.

Bobby

Don [EMAIL PROTECTED] wrote in message
020401c2be4f$c5420fd0$c889cdcd@enterprise">news:020401c2be4f$c5420fd0$c889cdcd@enterprise...
Hi,

I have an application that uses sessions to allow customers to access a
restricted area.  That is, they are prompted for a user login and password.
I then use sessions to track each customer.  At the top of each page, I have
placed the following PHP code:

session_cache_limiter('Cache-control: private');
session_start();

Everything works fine.  However, I have a logout link that when clicked,
runs the following PHP code (where userid is the login name):

session_cache_limiter('nocache');
if (isset($HTTP_SESSION_VARS['userid'])) {
   $HTTP_SESSION_VARS['userid'] = '';
   session_unregister($HTTP_SESSION_VARS['userid']);
}
session_unset();
session_destroy();
Header('Location: ' . 'http://www.lclnav.com' . $globals-relative_path .
'customerlogin_standard.html');

I think the above is all that is needed to end the session.  I use the
Header() function to take the user back to the login  page.

Here is my question:  Once I click on the logout link and am taken back to
the main login page, I can click on the browser BACK button and still get my
previous page 'as if I was still logged in'.  Please note that clicking on
REFRESH tells me that I am not really logged in.

I know that browsers cache pages and there may not be anything I can do,
however, I have seen sites that seem to work around this; i.e.., clicking on
the back button loads a pages telling the user that they are no longer
logged in.  This is what I want to emulate.  Is there a PHP method to always
force a reload the first time a page is called?

Thanks,
Don


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003



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




Re: [PHP] $HTTP_GET_VARS

2003-01-17 Thread Rick Emery

Show us your code
- Original Message - 
From: Mike Tuller [EMAIL PROTECTED]
To: php mailing list [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 4:05 PM
Subject: [PHP] $HTTP_GET_VARS


I am following an example in a book and have run into a problem with a 
script that I am trying to run under PHP 4.3.0. What I have is a page 
that you click on an id number that is from a listing in a database, 
and it is supposed to take you to a page to edit that item. I have the 
id sent in the url (http://127.0.0.1/asset/editasset.php?id=3) and the 
book says to use $HTTP_GET_VARS to take that id and display the record 
for editing on a separate page. When I use $HTTP_GET_VARS nothing is 
returned, and I am thinking that I can't use $HTTP_GET_VARS in PHP 
4.3.0, so what do I need to use?

Thanks,
Mike


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




Fw: [PHP] Number Sign in String Variables

2003-01-17 Thread Rick Emery
I have data that have #, so that is not the problem.

Show us more code AND your database structure.
- Original Message - 
From: Joab Ben Stieglitz [EMAIL PROTECTED]
To: 
Sent: Friday, January 17, 2003 2:25 PM
Subject: [PHP] Number Sign in String Variables


I have a MySQL database that includes data with the # sign in some data
fields.  My PHP script pulls the data out of the database fine, but when I
got to write back to the database, I get errors because the string gets
truncated at the # sign.  For example:

 $query = INSERT INTO order_detail
   SET customer_id = -1,
   order_id = $order_no,
   item_id = $item_id,
   item_num = \$item_num\,
   unit = \$unit\,
   short_desc = \$short_desc\,
   quantity = $quantity,
   wholesaler = \$wholesaler\,
   cost = $cost,
   sale_price = $sale_price;

This statement fails if $short_desc contains a # sign.  The string stops at
the # sign, and all the subsequent fields are empty or garbage.

None of the various resources I have looked at indicate that the # sign is a
special character.  Any suggestions?

--
Joab Ben Stieglitz
[EMAIL PROTECTED]



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




Fw: [PHP] Re: Question about using session and logging out

2003-01-17 Thread Kevin Stone
Don,

The only method that I have discovered to protect the login against the
back-button is to validate the session at the top of each and every
protected page.  Forgive the psuedo code..

?
if active session {
// validate privs for this page
// session start
}else{
// logout
}
?

When the back button is pressed it goes through this process, sees that
there is no active session, goes to else and shunts back to the login
screen.

Hope that helps,
Kevin

- Original Message -
From: Bobby Patel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 3:26 PM
Subject: [PHP] Re: Question about using session and logging out


 I believe there something (a meta tag?) called  meta-refresh or just
 refresh.

 But I believe you have to set the refresh interval. and if you set the
 interval to small it might eat your server's resources.

 OR I just thought of this, sometimes when you get to a page (usually with
 forms?) it says that the page is expired and must be refreshed. Maybe you
 can get that behaviour, so that when someone hits back, they have to
 refresh.

 Bobby

 Don [EMAIL PROTECTED] wrote in message
 020401c2be4f$c5420fd0$c889cdcd@enterprise">news:020401c2be4f$c5420fd0$c889cdcd@enterprise...
 Hi,

 I have an application that uses sessions to allow customers to access a
 restricted area.  That is, they are prompted for a user login and
password.
 I then use sessions to track each customer.  At the top of each page, I
have
 placed the following PHP code:

 session_cache_limiter('Cache-control: private');
 session_start();

 Everything works fine.  However, I have a logout link that when clicked,
 runs the following PHP code (where userid is the login name):

 session_cache_limiter('nocache');
 if (isset($HTTP_SESSION_VARS['userid'])) {
$HTTP_SESSION_VARS['userid'] = '';
session_unregister($HTTP_SESSION_VARS['userid']);
 }
 session_unset();
 session_destroy();
 Header('Location: ' . 'http://www.lclnav.com' . $globals-relative_path .
 'customerlogin_standard.html');

 I think the above is all that is needed to end the session.  I use the
 Header() function to take the user back to the login  page.

 Here is my question:  Once I click on the logout link and am taken back
to
 the main login page, I can click on the browser BACK button and still get
my
 previous page 'as if I was still logged in'.  Please note that clicking on
 REFRESH tells me that I am not really logged in.

 I know that browsers cache pages and there may not be anything I can do,
 however, I have seen sites that seem to work around this; i.e.., clicking
on
 the back button loads a pages telling the user that they are no longer
 logged in.  This is what I want to emulate.  Is there a PHP method to
always
 force a reload the first time a page is called?

 Thanks,
 Don


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003



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




Re: [PHP] $HTTP_GET_VARS

2003-01-17 Thread Mike Tuller
Nevermind. When copying my code to show you I noticed I have 
HTTP_GET_VARS, instead of $HTTP_GET_VARS, and now everything works.

Time to go home I guess.


On Friday, January 17, 2003, at 04:22 PM, Rick Emery wrote:


Show us your code
- Original Message -
From: Mike Tuller [EMAIL PROTECTED]
To: php mailing list [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 4:05 PM
Subject: [PHP] $HTTP_GET_VARS


I am following an example in a book and have run into a problem with a
script that I am trying to run under PHP 4.3.0. What I have is a page
that you click on an id number that is from a listing in a database,
and it is supposed to take you to a page to edit that item. I have the
id sent in the url (http://127.0.0.1/asset/editasset.php?id=3) and the
book says to use $HTTP_GET_VARS to take that id and display the record
for editing on a separate page. When I use $HTTP_GET_VARS nothing is
returned, and I am thinking that I can't use $HTTP_GET_VARS in PHP
4.3.0, so what do I need to use?

Thanks,
Mike


--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $HTTP_GET_VARS

2003-01-17 Thread Matt

- Original Message -
From: Mike Tuller [EMAIL PROTECTED]
To: php mailing list [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 5:05 PM
Subject: [PHP] $HTTP_GET_VARS


 I am following an example in a book and have run into a problem with a
 script that I am trying to run under PHP 4.3.0. What I have is a page
 that you click on an id number that is from a listing in a database,
 and it is supposed to take you to a page to edit that item. I have the
 id sent in the url (http://127.0.0.1/asset/editasset.php?id=3) and the
 book says to use $HTTP_GET_VARS to take that id

Are you using $HTTP_GET_VARS['id']?  If it's in a function, then php scopes
$HTTP_GET_VARS as a local variable, and thus there's nothing in it.  While
that's different then most other programming languages, it's how it is in
php. If you want to reference the global $HTTP_GET_VARS in a function, then
you must 'global' it:

function foo() {
global $HTTP_GET_VARS;
echo Id is {$HTTP_GET_VARS['id']}br\n;
}

Now the php developers added a new set of arrays to help with that in 4.1.2
(I think), so use $_GET['id'] which always references the builtin global
$_GET array. It's better.

i.e. Learn the new way and not the old way ...



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




Re: [PHP] $HTTP_GET_VARS

2003-01-17 Thread Jim Lucas
checkout the most recent version of the help documents from php.net.  it
will tell you.

something to do with $_GET,  i think...

Jim
- Original Message -
From: Mike Tuller [EMAIL PROTECTED]
To: php mailing list [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 2:05 PM
Subject: [PHP] $HTTP_GET_VARS


 I am following an example in a book and have run into a problem with a
 script that I am trying to run under PHP 4.3.0. What I have is a page
 that you click on an id number that is from a listing in a database,
 and it is supposed to take you to a page to edit that item. I have the
 id sent in the url (http://127.0.0.1/asset/editasset.php?id=3) and the
 book says to use $HTTP_GET_VARS to take that id and display the record
 for editing on a separate page. When I use $HTTP_GET_VARS nothing is
 returned, and I am thinking that I can't use $HTTP_GET_VARS in PHP
 4.3.0, so what do I need to use?

 Thanks,
 Mike


 --
 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] frame problem

2003-01-17 Thread Kiswa
What da fuck.
Been trying like forever to get a script to automaticly update the
framespage from inside one of the frames.
My goal is to reset all the frames to their original state

Can anybody help me!



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




[PHP] sending sms messages from the webpages

2003-01-17 Thread Denis L. Menezes
Hello friends.

Any idea which is the best way to send many sms messages from a web page? Any good 
gateways or service providers?

Thanks
Denis


[PHP] PUT uploads

2003-01-17 Thread Chris Jarecki
Hi everyone.

I'm trying to get my PUT method upload to work.
I tried the using the script from the manual, but it
creates an empty file.
?php
/* PUT data comes in on the stdin stream */
$putdata = fopen(php://stdin,r);

/* Open a file for writting */
$fp = fopen(myputfile.ext,w);

/* Read the data 1kb at a time
   and write to the file */
while ($data = fread($putdata,1024))
  fwrite($fp,$data);

/* Close the streams */
fclose($fp);
fclose($putdata);
?

then i tried to sniff on the bugs.php.net
(http://bugs.php.net/bug.php?id=14298)
site and i found this:

$in = fopen(php://input,rb);
$out = fopen($outfile,wb);
while(!feof($in)) {
  fwrite($out, fread($in, $bufsize));
}
fclose($in);
fclose($out);
but that doens't work too...the headers i get are correct:
Accept:
www/source, text/html, video/mpeg, image/jpeg, image/x-tiff, image/x-rgb,
image/x-xbm, image/gif, */*, application/postscript
Content-Length:
21504
Content-type: application/x-www-form-urlencodedHost: zenderx

the length of my file is ok.

My question is that... Is this new method of handling uploads already
working?
How can I handle this kind of upload?

Regards

--
Chris Jarecki
Web Developer
Prograf Net Partners
http://www.pnp.pl/

ICQ: 47650101



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




[PHP] PDF

2003-01-17 Thread Brian McGarvie
I'm looking to find out if PHP has the ability to do this...

OK I'm looking for a solution that could do the following.

We require to generate PDF files that can then be emailed or printed 
posted to clients.

I can create PDF Files from scratch using PDFLib.

What we will require to do though is, we presently have paper copies of
forms from various parties we deal with, our present Access-based system
simply prints on top of these, I am presently developing in PHP a system to
replace the Access database, we will want it to create these as PDF files
(we can get the printed forms in PDF format) based on supplied PDF files...
for example, generate a PDF for Customer X based on Supplier Z's PDF file.

Any solutions in PHP (open source, free, commercial etc etc.) would be very
much appreciated, or if we need to look at another Language to perform this
part of the solution (i.e. ASP).

The solution I'm developing is PHP, running on a Windows 2000 Server as we
require use of some windows-only software too. So if *cough* ASP is what's
needed to do the above then so be it :\ - really hope not though!!!

Thanks in advance!


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03



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




[PHP] Re: [PHP-WIN] PDF

2003-01-17 Thread Dash McElroy
If the PDF forms you print on top of are forms, you can use FDF (Forms
Data Format) to fill out the form. There are several FDF options. One is
to use Adobe's FDF program thingie. Others are listed in the comments on
this page (http://www.php.net/manual/en/ref.fdf.php). I used one of the
ones listed in the comments with no problems, but it was for a super
simple form. (i.e., your mileage may vary)

Another option is to have the suppliers form to be turned into an image
and placed in the background (via pdf_place_image() if you're using
PDFlib). This works well enough, but could be extremely troublesome for
large forms. It also heavily increases the size of the PDF document.

PDFlib is really powerful, but to edit existing PDF documents, you may
need to use their PDI (Pdf Import Library). That is an added cost module.

Otherwise, you could create a function (or possibly class) to basically
redo the suppliers' form, and then pass over it (at the same time) with
the data you need to put on the form.

Good Luck!

-Dash

The scum also rises.
-- Dr. Hunter S. Thompson

On Fri, 17 Jan 2003, Brian McGarvie wrote:

 I'm looking to find out if PHP has the ability to do this...

 OK I'm looking for a solution that could do the following.

 We require to generate PDF files that can then be emailed or printed 
 posted to clients.

 I can create PDF Files from scratch using PDFLib.

 What we will require to do though is, we presently have paper copies of
 forms from various parties we deal with, our present Access-based system
 simply prints on top of these, I am presently developing in PHP a system to
 replace the Access database, we will want it to create these as PDF files
 (we can get the printed forms in PDF format) based on supplied PDF files...
 for example, generate a PDF for Customer X based on Supplier Z's PDF file.

 Any solutions in PHP (open source, free, commercial etc etc.) would be very
 much appreciated, or if we need to look at another Language to perform this
 part of the solution (i.e. ASP).

 The solution I'm developing is PHP, running on a Windows 2000 Server as we
 require use of some windows-only software too. So if *cough* ASP is what's
 needed to do the above then so be it :\ - really hope not though!!!

 Thanks in advance!


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.438 / Virus Database: 246 - Release Date: 07/01/03



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




Re: [PHP] Re: Question about using session and logging out

2003-01-17 Thread Stanislav Skrypnik
Hi Kevin,
I don't well understand this part:
 if active session {
 // validate privs for this page
Can you give small example?
TIA,
Stas

Kevin Stone [EMAIL PROTECTED] wrote in message
019501c2be78$4ad0dc30$6601a8c0@kevin">news:019501c2be78$4ad0dc30$6601a8c0@kevin...
 Don,

 The only method that I have discovered to protect the login against the
 back-button is to validate the session at the top of each and every
 protected page.  Forgive the psuedo code..

 ?
 if active session {
 // validate privs for this page
 // session start
 }else{
 // logout
 }
 ?

 When the back button is pressed it goes through this process, sees that
 there is no active session, goes to else and shunts back to the login
 screen.

 Hope that helps,
 Kevin

 - Original Message -
 From: Bobby Patel [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, January 17, 2003 3:26 PM
 Subject: [PHP] Re: Question about using session and logging out


  I believe there something (a meta tag?) called  meta-refresh or just
  refresh.
 
  But I believe you have to set the refresh interval. and if you set the
  interval to small it might eat your server's resources.
 
  OR I just thought of this, sometimes when you get to a page (usually
with
  forms?) it says that the page is expired and must be refreshed. Maybe
you
  can get that behaviour, so that when someone hits back, they have to
  refresh.
 
  Bobby
 
  Don [EMAIL PROTECTED] wrote in message
  020401c2be4f$c5420fd0$c889cdcd@enterprise">news:020401c2be4f$c5420fd0$c889cdcd@enterprise...
  Hi,
 
  I have an application that uses sessions to allow customers to access a
  restricted area.  That is, they are prompted for a user login and
 password.
  I then use sessions to track each customer.  At the top of each page, I
 have
  placed the following PHP code:
 
  session_cache_limiter('Cache-control: private');
  session_start();
 
  Everything works fine.  However, I have a logout link that when clicked,
  runs the following PHP code (where userid is the login name):
 
  session_cache_limiter('nocache');
  if (isset($HTTP_SESSION_VARS['userid'])) {
 $HTTP_SESSION_VARS['userid'] = '';
 session_unregister($HTTP_SESSION_VARS['userid']);
  }
  session_unset();
  session_destroy();
  Header('Location: ' . 'http://www.lclnav.com' . $globals-relative_path
.
  'customerlogin_standard.html');
 
  I think the above is all that is needed to end the session.  I use the
  Header() function to take the user back to the login  page.
 
  Here is my question:  Once I click on the logout link and am taken
back
 to
  the main login page, I can click on the browser BACK button and still
get
 my
  previous page 'as if I was still logged in'.  Please note that clicking
on
  REFRESH tells me that I am not really logged in.
 
  I know that browsers cache pages and there may not be anything I can do,
  however, I have seen sites that seem to work around this; i.e..,
clicking
 on
  the back button loads a pages telling the user that they are no longer
  logged in.  This is what I want to emulate.  Is there a PHP method to
 always
  force a reload the first time a page is called?
 
  Thanks,
  Don
 
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
 
 
 
  --
  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] Gridwidget - javascript

2003-01-17 Thread Nico Jansen - NiRo IT Consultants B.V.

Hi all,

I'm trying to write a grid widget in php. When the user changes the value of
a cell the totals must be recalculated at the client side.
I can write a javascript when I use simple variables like A1, B1.

tdinput type=text name='A1' SIZE=5 MAXLENGTH=5
onChange=njrecalculate()/td
tdinput type=text name='B1' SIZE=5 MAXLENGTH=5
onChange=njrecalculate()/td

This javascript will do the trick:

function njrecalculate()
{
 document.forms[0].mytot.value = Math.round(document.forms[0].A1.value)
+ Math.round(document.forms[0].B1.value)   ;

}

But now I want to create a dynamice grid by using the array variable e.g.
mycell[]:
?php
echo trtdinput type=text NAME='mycel[]' SIZE=5 MAXLENGTH=5
onChange='njrecalculate()' value=$mycel[0]/td/tr;
echo trtdinput type=text NAME='mycel[]' SIZE=5 MAXLENGTH=5
onChange='njrecalculate()' value=$mycel[1]/td/tr;
echo trtdinput type=text NAME='mytotals' SIZE=5 MAXLENGTH=5
onChange='njrecalculate()' value=$mytot/td/tr;
?

Does anybody know how to access these mycell form fields on the client side
using javascript.


Nico Jansen



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




RE: [PHP] Re: Question about using session and logging out

2003-01-17 Thread Vladislav Kulchitski
I think the method Kevin mentioned is the best.

In other words, on every secure page you have a script that checks is a session 
registered. IF it is, it lets you go through and execute the rest of the script if 
not, simply tells you to login that's it. Very simple, if interested I can show 
example.

Vlad

-Original Message-
From: Stanislav Skrypnik [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 7:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Question about using session and logging out

Hi Kevin,
I don't well understand this part:
 if active session {
 // validate privs for this page
Can you give small example?
TIA,
Stas

Kevin Stone [EMAIL PROTECTED] wrote in message
019501c2be78$4ad0dc30$6601a8c0@kevin">news:019501c2be78$4ad0dc30$6601a8c0@kevin...
 Don,

 The only method that I have discovered to protect the login against the
 back-button is to validate the session at the top of each and every
 protected page.  Forgive the psuedo code..

 ?
 if active session {
 // validate privs for this page
 // session start
 }else{
 // logout
 }
 ?

 When the back button is pressed it goes through this process, sees that
 there is no active session, goes to else and shunts back to the login
 screen.

 Hope that helps,
 Kevin

 - Original Message -
 From: Bobby Patel [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, January 17, 2003 3:26 PM
 Subject: [PHP] Re: Question about using session and logging out


  I believe there something (a meta tag?) called  meta-refresh or just
  refresh.
 
  But I believe you have to set the refresh interval. and if you set the
  interval to small it might eat your server's resources.
 
  OR I just thought of this, sometimes when you get to a page (usually
with
  forms?) it says that the page is expired and must be refreshed. Maybe
you
  can get that behaviour, so that when someone hits back, they have to
  refresh.
 
  Bobby
 
  Don [EMAIL PROTECTED] wrote in message
  020401c2be4f$c5420fd0$c889cdcd@enterprise">news:020401c2be4f$c5420fd0$c889cdcd@enterprise...
  Hi,
 
  I have an application that uses sessions to allow customers to access a
  restricted area.  That is, they are prompted for a user login and
 password.
  I then use sessions to track each customer.  At the top of each page, I
 have
  placed the following PHP code:
 
  session_cache_limiter('Cache-control: private');
  session_start();
 
  Everything works fine.  However, I have a logout link that when clicked,
  runs the following PHP code (where userid is the login name):
 
  session_cache_limiter('nocache');
  if (isset($HTTP_SESSION_VARS['userid'])) {
 $HTTP_SESSION_VARS['userid'] = '';
 session_unregister($HTTP_SESSION_VARS['userid']);
  }
  session_unset();
  session_destroy();
  Header('Location: ' . 'http://www.lclnav.com' . $globals-relative_path
.
  'customerlogin_standard.html');
 
  I think the above is all that is needed to end the session.  I use the
  Header() function to take the user back to the login  page.
 
  Here is my question:  Once I click on the logout link and am taken
back
 to
  the main login page, I can click on the browser BACK button and still
get
 my
  previous page 'as if I was still logged in'.  Please note that clicking
on
  REFRESH tells me that I am not really logged in.
 
  I know that browsers cache pages and there may not be anything I can do,
  however, I have seen sites that seem to work around this; i.e..,
clicking
 on
  the back button loads a pages telling the user that they are no longer
  logged in.  This is what I want to emulate.  Is there a PHP method to
 always
  force a reload the first time a page is called?
 
  Thanks,
  Don
 
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
 
 
 
  --
  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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP Encoders and GPL License

2003-01-17 Thread [-^-!-%-

Food for thought:

As I look through the Zend website, and applaud their efforts to create
'protected' php applications, I can't help but wonder about the impact
(or lagality) or their efforts.  Doesn't the use of the Zend Encoder (or
any other PHP Encoders out there) violate the GPL License or the whole Open
Source Concept?

As far as I understand it, the GPL License states that the source code
of any product created from an open source solutions, or is derived from
the work of an open solutions, must be made availabe to all users.

Since PHP itself is open source, then wouldn't that prohibit a developer
from encoding any PHP product?

Please correct me, if I'm wrong. I'm just curious.

-john

=P e p i e  D e s i g n s
 www.pepiedesigns.com
 Providing Solutions That Increase Productivity

 Web Developement. Database. Hosting. Multimedia.



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




Re: [PHP] Re: Question about using session and logging out

2003-01-17 Thread Stanislav Skrypnik
Well then pseudo-code a bit not correct; I think it should be like:
?
 // session start
 if session registerred {
 // Do whatever you need
}
else{
 // logout
}
?

But what about such case:
Let we have 3 pages:
1) login page(user enters credentials and redirected to page2)
2) secure page (where we validate user, register sess. vars. etc). Than user
clicks logout and redirected to page3.
3) logout page. We destroy session and logout user.

If at this point user clicks Back button he/she will get message Warning:
page expired (this is secure page). Because browser
still has credentials entered on page 1(login page) pressing refresh button
starts new session and secure page is accesible.
How this problem can be fixed?
Stas



Vladislav Kulchitski [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I think the method Kevin mentioned is the best.

In other words, on every secure page you have a script that checks is a
session registered. IF it is, it lets you go through and execute the rest of
the script if not, simply tells you to login that's it. Very simple, if
interested I can show example.

Vlad

-Original Message-
From: Stanislav Skrypnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 17, 2003 7:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Question about using session and logging out

Hi Kevin,
I don't well understand this part:
 if active session {
 // validate privs for this page
Can you give small example?
TIA,
Stas

Kevin Stone [EMAIL PROTECTED] wrote in message
019501c2be78$4ad0dc30$6601a8c0@kevin">news:019501c2be78$4ad0dc30$6601a8c0@kevin...
 Don,

 The only method that I have discovered to protect the login against the
 back-button is to validate the session at the top of each and every
 protected page.  Forgive the psuedo code..

 ?
 if active session {
 // validate privs for this page
 // session start
 }else{
 // logout
 }
 ?

 When the back button is pressed it goes through this process, sees that
 there is no active session, goes to else and shunts back to the login
 screen.

 Hope that helps,
 Kevin

 - Original Message -
 From: Bobby Patel [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, January 17, 2003 3:26 PM
 Subject: [PHP] Re: Question about using session and logging out


  I believe there something (a meta tag?) called  meta-refresh or just
  refresh.
 
  But I believe you have to set the refresh interval. and if you set the
  interval to small it might eat your server's resources.
 
  OR I just thought of this, sometimes when you get to a page (usually
with
  forms?) it says that the page is expired and must be refreshed. Maybe
you
  can get that behaviour, so that when someone hits back, they have to
  refresh.
 
  Bobby
 
  Don [EMAIL PROTECTED] wrote in message
  020401c2be4f$c5420fd0$c889cdcd@enterprise">news:020401c2be4f$c5420fd0$c889cdcd@enterprise...
  Hi,
 
  I have an application that uses sessions to allow customers to access a
  restricted area.  That is, they are prompted for a user login and
 password.
  I then use sessions to track each customer.  At the top of each page, I
 have
  placed the following PHP code:
 
  session_cache_limiter('Cache-control: private');
  session_start();
 
  Everything works fine.  However, I have a logout link that when clicked,
  runs the following PHP code (where userid is the login name):
 
  session_cache_limiter('nocache');
  if (isset($HTTP_SESSION_VARS['userid'])) {
 $HTTP_SESSION_VARS['userid'] = '';
 session_unregister($HTTP_SESSION_VARS['userid']);
  }
  session_unset();
  session_destroy();
  Header('Location: ' . 'http://www.lclnav.com' . $globals-relative_path
.
  'customerlogin_standard.html');
 
  I think the above is all that is needed to end the session.  I use the
  Header() function to take the user back to the login  page.
 
  Here is my question:  Once I click on the logout link and am taken
back
 to
  the main login page, I can click on the browser BACK button and still
get
 my
  previous page 'as if I was still logged in'.  Please note that clicking
on
  REFRESH tells me that I am not really logged in.
 
  I know that browsers cache pages and there may not be anything I can do,
  however, I have seen sites that seem to work around this; i.e..,
clicking
 on
  the back button loads a pages telling the user that they are no longer
  logged in.  This is what I want to emulate.  Is there a PHP method to
 always
  force a reload the first time a page is called?
 
  Thanks,
  Don
 
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
 
 
 
  --
  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 General Mailing List (http://www.php.net/)
To 

RE: [PHP] frame problem

2003-01-17 Thread John W. Holmes
 What da fuck.
 Been trying like forever to get a script to automaticly update the
 framespage from inside one of the frames.
 My goal is to reset all the frames to their original state
 
 Can anybody help me!

Wash your mouth out with soap and go learn Javascript...

---John Holmes...



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




RE: [PHP] Number Sign in String Variables

2003-01-17 Thread John W. Holmes
 I have a MySQL database that includes data with the # sign in some
data
 fields.  My PHP script pulls the data out of the database fine, but
when I
 got to write back to the database, I get errors because the string
gets
 truncated at the # sign.  For example:
 
  $query = INSERT INTO order_detail
SET customer_id = -1,
order_id = $order_no,
item_id = $item_id,
item_num = \$item_num\,
unit = \$unit\,
short_desc = \$short_desc\,
quantity = $quantity,
wholesaler = \$wholesaler\,
cost = $cost,
sale_price = $sale_price;
 
 This statement fails if $short_desc contains a # sign.  The string
stops
 at
 the # sign, and all the subsequent fields are empty or garbage.
 
 None of the various resources I have looked at indicate that the #
sign is
 a
 special character.  Any suggestions?

# is used to start a comment in MySQL.

Show your actual code around this statement where you make your query.
The only reason the data would be cut off is if MySQL is interpreting
the # as the beginning of a comment. But, if that was the case, you'd
have an invalid query, so it must be a combination of things. 

---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] Meta Refresh Question (PHP)

2003-01-17 Thread Edson Waite
Hi All,

Can anyone see a problem with this?

?php
$TrialID = $colname_earlytour + 1;
 if ($TrialID = 5)
  {
$NewID = $TrialID;
$Page = test
}
else
  {
$NewID = 1;
$Page = newpage
}
?

html
head
titleAviation Hall of Fame/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
META HTTP-EQUIV=refresh CONTENT=15; URL=?php echo $Page;?.php?ID=?php
echo NewID;?

Thanks,
Edson Waite III
http://www.airforcemuseum.com
http://www.sportsvideooutlet.com



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




Re: [PHP] PHP Encoders and GPL License

2003-01-17 Thread Rick Widmer
At 04:45 PM 1/17/03 -0800, [-^-!-%- wrote:


Since PHP itself is open source, then wouldn't that prohibit a developer
from encoding any PHP product?

Please correct me, if I'm wrong. I'm just curious.



GPL isn't the only way to license open source.  PHP is not GPL for just 
that reason.  See the LICENSE file in your PHP source directory.

Rick



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



RE: [PHP] Meta Refresh Question (PHP)

2003-01-17 Thread Timothy Hitchens \(HiTCHO\)
It runs when you fix your (removed URL's and line endings) what is it
not doing?



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Edson Waite [mailto:[EMAIL PROTECTED]] 
 Sent: Saturday, 18 January 2003 11:09 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Meta Refresh Question (PHP)
 
 
 Hi All,
 
 Can anyone see a problem with this?
 
 ?php
 $TrialID = $colname_earlytour + 1;
  if ($TrialID = 5)
   {
 $NewID = $TrialID;
 $Page = test
 }
 else
   {
 $NewID = 1;
 $Page = newpage
 }
 ?
 
 html
 head
 titleAviation Hall of Fame/title
 meta http-equiv=Content-Type content=text/html; 
 charset=iso-8859-1 META HTTP-EQUIV=refresh CONTENT=15; 
 URL=?php echo $Page;?.php?ID=?php echo NewID;?
 
 Thanks,
 Edson Waite III
 http://www.airforcemuseum.com
 http://www.sportsvideooutlet.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




RE: [PHP] Meta Refresh Question (PHP)

2003-01-17 Thread John W. Holmes
 Can anyone see a problem with this?

Yes.
 
 ?php
 $TrialID = $colname_earlytour + 1;
  if ($TrialID = 5)
   {
 $NewID = $TrialID;
 $Page = test

Here...

 }
 else
   {
 $NewID = 1;
 $Page = newpage

and here...

 }
 ?
 
 html
 head
 titleAviation Hall of Fame/title
 meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
 META HTTP-EQUIV=refresh CONTENT=15; URL=?php echo
 $Page;?.php?ID=?php
 echo NewID;?

http://www.php.net/manual/en/language.types.string.php

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




RE: [PHP] Making alternate rows of different colour

2003-01-17 Thread Daevid Vincent
?php
   $bgcolor = ($i % 2 == 0) ?  BGCOLOR='#E3E3E3' : ;
?
TR?=$bgcolor?

  Can someone please help me with the code?
 
$cols = array('#ff','#00ff00');
$i = 0;
while(your_loop_to_output_each_row) {
   echo 'tr bgcolor='.$cols[$i%2].'td$row_data/td/tr';
}


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




RE: [PHP] Sessions or Cookies?

2003-01-17 Thread Daevid Vincent
Agreed. Sessions are much more secure and convienient to use too. Since
it's not reliant on the client to have cookies enabled, that's another
benefit. Plus it's MUCH harder for a client to spoof/alter a session
variable if you use the $_SESSION['myvar'] 

 -Original Message-
 From: Chris Shiflett [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, January 17, 2003 9:29 AM
 To: Cesar Aracena; [EMAIL PROTECTED]
 Subject: Re: [PHP] Sessions or Cookies?
 
 
 --- Cesar Aracena [EMAIL PROTECTED] wrote:
  Should I use the no-so-secure old cookies method
  or should I start a new session every time a client
  drops in and handle each cart by session name or ID?
 
 My advice is to only use cookies to identify a Web client.
 Any data you want to associate with that Web client (user
 data, for example) should be stored on the server -
 database, session store, etc.
 


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




[PHP] PHP Review Site

2003-01-17 Thread Stephen



Hello,

I was just wondering if there were any PHP review sites that 
review free and paid scripts? If so, where?
Thanks,Stephen Cratonhttp://www.melchior.us

"What's the point in appearance if your true love, doesn't care about it?" 
-- http://www.melchior.us
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP Encoders and GPL License

2003-01-17 Thread Sean Malloy
 As far as I understand it, the GPL License states that the source 
 code of any product created from an open source solutions, or is 
 derived from the work of an open solutions, must be made availabe 
 to all users.

no. 

Any modifications made to the PHP source code must be made 
available to anyone who wants it.

It does not cover programs, applications, websites, created with the 
programming language. They are covered under their own license (of 
the authors choosing).

If you created an application, enocoded it, but had made 
modifications to existing PHP engine code, or even PHP scripting 
code from other sources, you would have to include unencoded 
versions of said scripts, and also provide the PHP source (or just 
your modifications, imported via patch or whatever) to anyone who 
wants it.

I'm not sure what the deal is with your own custom PHP extensions. 
I think once again, extensions are separate programs, and up to 
the individual to specify the licensing terms.

There are thousands of programs written in C and compiled by GCC.
GCC is GPL software. Do you go around saying You compiled your 
commercial application with an Open Source tool, therefore you must 
release all source code to the community? No. Same principle 
applies to PHP

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




RE: [PHP] PHP Review Site

2003-01-17 Thread Timothy Hitchens \(HiTCHO\)
Please send plain text to e-mail lists NOT html:

Hmm now let me think:

http://www.hotscripts.com/



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED] 


-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 18 January 2003 11:40 AM
To: PHP List
Subject: [PHP] PHP Review Site


Hello,

I was just wondering if there were any PHP review sites that review free
and paid scripts? If so, where?

Thanks,
Stephen Craton
http://www.melchior.us

What's the point in appearance if your true love, doesn't care about
it? -- http://www.melchior.us


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




Re: [PHP] Meta Refresh Question (PHP)

2003-01-17 Thread Edson Waite
Thanks Guys,

That took care of it. I was also missing $ in the meta tag line before
NewID.

Thanks again,
Ed Waite


Timothy Hitchens ) [EMAIL PROTECTED] wrote in message
004b01c2be8e$f2d42ca0$0500a8c0@bambino">news:004b01c2be8e$f2d42ca0$0500a8c0@bambino...
 It runs when you fix your (removed URL's and line endings) what is it
 not doing?



 Timothy Hitchens (HiTCHO)
 Open Source Consulting
 e-mail: [EMAIL PROTECTED]

  -Original Message-
  From: Edson Waite [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, 18 January 2003 11:09 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Meta Refresh Question (PHP)
 
 
  Hi All,
 
  Can anyone see a problem with this?
 
  ?php
  $TrialID = $colname_earlytour + 1;
   if ($TrialID = 5)
{
  $NewID = $TrialID;
  $Page = test
  }
  else
{
  $NewID = 1;
  $Page = newpage
  }
  ?
 
  html
  head
  titleAviation Hall of Fame/title
  meta http-equiv=Content-Type content=text/html;
  charset=iso-8859-1 META HTTP-EQUIV=refresh CONTENT=15;
  URL=?php echo $Page;?.php?ID=?php echo NewID;?
 
  Thanks,
  Edson Waite III
  http://www.airforcemuseum.com
  http://www.sportsvideooutlet.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




Re: [PHP] frame problem

2003-01-17 Thread Justin French
1. this has nothing to do with PHP

2. this has nothing to do with PHP

3. you could call a frameset html page with a href=frameset.html
target=_top

4. you could set individual frames to different sources from one link with
javascript -- but you'd have to consult a JS list :P


Justin



on 18/01/03 9:30 AM, Kiswa ([EMAIL PROTECTED]) wrote:

 What da fuck.
 Been trying like forever to get a script to automaticly update the
 framespage from inside one of the frames.
 My goal is to reset all the frames to their original state
 
 Can anybody help me!
 
 


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




  1   2   >