Re: [PHP] abreviating echo commands

2003-09-15 Thread Eugene Lee
: Kris Yates <[EMAIL PROTECTED]> wrote:
: > 
: > I forget where but I found some source awhile back that abbreviated 
: > echo.  It was something like
: >  which worked the same as .  Maybe it was 
: > .. Obviously I dont remember.. which is why I am asking..  
: > :)  Does anyone have a link to something that talks about how to 
: > abbreviate commands in PHP?

Is this what you meant?


http://www.php.net/manual/en/language.basic-syntax.php#language.basic-syntax.phpmode

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



Re: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread - Edwin -
Hi,

"John W. Holmes" <[EMAIL PROTECTED]> wrote:

> Jeremy Brand, B.S. wrote:
> > Thanks to everyone for their responses, though I still have not found a 
> > way to get to the conference at a reasonable price (what I consider 
> > reasonable).
> > 
> > If anyone has any comments other than justifying the price of the 
> > conference, like a friends of php list I can get on so I can attend it 
> > would be greatly appreciated.  
> 
> I know this guy that can get you in. 1/2 price, cash up front. What size 
> cardboard box could you fit in?

Would this still work even if "safe_mode" is on?

:)

- E -
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



Re: [PHP] abreviating echo commands

2003-09-15 Thread - Edwin -
Hi,

Kris Yates <[EMAIL PROTECTED]> wrote:

> Hello..
> 
> I forget where but I found some source awhile back that abbreviated 
> echo.  It was something like
>  which worked the same as .  Maybe it was 
> .. Obviously I dont remember.. which is why I am asking..  
> :)  Does anyone have a link to something that talks about how to 
> abbreviate commands in PHP?
> 
> Well.. not how to.. but just a list of abbreviations?
> 
> Is echo the only one that has an abbreviation?  I couldn't find anything 
> in the manual.. any leads?

Ternary conditional operator:

  http://www.php.net/manual/en/language.expressions.php

echo()'s shortcut syntax:

  http://www.php.net/manual/en/function.echo.php

The only two that I know of... I think.

- E -
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



[PHP] [Newbie Guide] For the benefit of new members

2003-09-15 Thread tech
=
This message is for the benefit of new subscribers and those new to PHP.  
Those who  do not want to be bothered just filter out the [Newbie Guide] 
mails. Please feel free to add more points and send to the list.
==
1. If you have any queries/problems about PHP try http://www.php.net/manual/en 
first. You can download a copy and use it offline also.

2. If you can not get answer here try http://www.google.com next. Try 
searching for "php YOUR QUERY" and you may be lucky to get an answer within 
the first 10 results.

3. Glancing/searching through the list archive at 
http://marc.theaimsgroup.com/?l=php-general , you can find many of the 
common topics discussed repeatedly and can get your answer from those 
discussions. 

4. If you are stuck with a script and do not understand what is wrong, instead 
of posting the whole script, try doing some research yourself. One useful 
trick is to print the variable/sql query using print or echo command and 
check whether you get what you expected. 

After diagnosing the problem, send the details of your efforts (following 
steps 1, 2 & 3) and ask for help.

5. Provide a clear descriptive subject line. Avoid general subjects like 
"Help!!", "A Question" etc.  Especially avoid blank subjects. 

6. When you want to start a new topic, open a new mail and enter the mailing 
list address [EMAIL PROTECTED] instead of replying to an existing 
thread and replacing the subject and body with your message.

7. PHP is a server side scripting language. Whatever processing PHP does takes 
place BEFORE the output reaches the client. Therefore, it is not possible to 
access the users'  computer related information (OS, screen size etc) using 
PHP. You need to go for JavaScript and ask the question in a JavaScript 
list.

8. It's always a good idea to post back to the list once you've solved
your problem. People usually add [SOLVED] to the subject line of their
email when posting solutions. By posting your solution you're helping
the next person with the same question. [contribued by Chris W Parker]

9. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)

Hope you have a good time programming with PHP.

Best regards,


Ma Siva Kumar


-- 
Integrated Management Tools for leather industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink,
No 9, First Main Road,
Jai Nagar, Arumbakkam,
Chennai - 600106
Tel : +91 44 55191757

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



Re: [PHP] Japanese on a page

2003-09-15 Thread - Edwin -
Hi,

On Fri, 12 Sep 2003 12:24:33 -0700
"Chris W. Parker" <[EMAIL PROTECTED]> wrote:

> (now to the entire list)
> 
> Mark McCulligh 
> on Friday, September 12, 2003 11:48 AM said:
> 
> > I am trying to create both an English and Japanese version of a site.
> > The English done and I have the Japanese translation in a word doc. 
> > Can someone point me in the right direction on how I do this. I know
> > it has something to do with the META setting.
> 
> I have only dabbled in this so I don't know the proper terms and
> technologies used, but I'll try to pass on what I've learned.
> 
> It requires a few things.
> 
> 1. PHP needs to send the proper header. (At the top of each page.)
> 
>header("Content-type: text/html; charset=EUC-JP");
> ?>
 
Or, you can just declare it inside you're  tags (as mentioned previously). Also, 
depending on the charset you're using, you might need "shift_jis" instead of "euc-jp". 
("euc-jp" is recommended though esp. if data is coming from a database.)

> 2. You also need to send the correct language info from within the page
> itself. I suggest going to a japanese page and looking at the source.
> 
> 3. You need an editor that can handle the japanese language. I stopped
> trying to make japanese pages because I could not find a suitable editor
> (granted I didn't try very hard and I wasn't about to buy something).

Quanta works fine for me. ( http://quanta.sourceforge.net/ ) And you don't have to buy 
it ;) Actually, as long as you can change the default font used (and assuming you have 
the fonts installed), *most* editors should do just fine.

- E -

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



Re: [PHP] MySql temporary tables

2003-09-15 Thread andu
On Mon, 15 Sep 2003 22:31:08 -0500
Jackson Miller <[EMAIL PROTECTED]> wrote:

> On Monday 15 September 2003 10:26, andu wrote:
> > I did this blog where I create a temporary table to store entries while
> > editing them (spell checking, preview, etc). The problem I was having is
> > that sometimes the temporary table is created sometimes not. For every
> > transaction with MySql I used mysql_pconnect(). Since I changed to using
> > mysql_connect and regular tables instead of temporary tables everything
> > seems to work fine, has anyone experienced problems with temporary tables
> > with MySql?
> 
> Temporary tables are only accessible from the MySQL connection that created 
> them.  Using pconnect it was a crap shoot as to whether you would get the 
> same connection on the next page load.
> 
> Temporary tables should only be used (from within PHP) for the current page 
> view.

Thanks.

> 
> -Jackson
> 
> >
> > 
> > Regards, Andu Novac
> 
> -- 
> jackson miller
>  
> cold feet creative
> 615.321.3300 / 800.595.4401
> [EMAIL PROTECTED]
>  
>  
> cold feet presents Emma
> the world's easiest email marketing
> Learn more @  http://www.myemma.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 



Regards, Andu Novac

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



Re: [PHP] MySql temporary tables

2003-09-15 Thread Jackson Miller
On Monday 15 September 2003 10:26, andu wrote:
> I did this blog where I create a temporary table to store entries while
> editing them (spell checking, preview, etc). The problem I was having is
> that sometimes the temporary table is created sometimes not. For every
> transaction with MySql I used mysql_pconnect(). Since I changed to using
> mysql_connect and regular tables instead of temporary tables everything
> seems to work fine, has anyone experienced problems with temporary tables
> with MySql?

Temporary tables are only accessible from the MySQL connection that created 
them.  Using pconnect it was a crap shoot as to whether you would get the 
same connection on the next page load.

Temporary tables should only be used (from within PHP) for the current page 
view.

-Jackson

>
> 
> Regards, Andu Novac

-- 
jackson miller
 
cold feet creative
615.321.3300 / 800.595.4401
[EMAIL PROTECTED]
 
 
cold feet presents Emma
the world's easiest email marketing
Learn more @  http://www.myemma.com

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



[PHP] MySql temporary tables

2003-09-15 Thread andu
I did this blog where I create a temporary table to store entries while editing
them (spell checking, preview, etc). The problem I was having is that sometimes
the temporary table is created sometimes not. For every transaction with MySql I
used mysql_pconnect(). Since I changed to using mysql_connect and regular tables
instead of temporary tables everything seems to work fine, has anyone experienced
problems with temporary tables with MySql?


Regards, Andu Novac

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



Re: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> These gatherings are most likely for people sponsored by their employers, don't
> imagine participants come out of it $500 smarter then they went in. If it makes

Well I suppose that depends on exactly what you are looking to get out
of it.  Conferences can be many things.  For instance, you have an
opportunity to meet people and network (with possible employers,
clients, partners, and the like).  Also, you can learn A LOT in three
days.  And for some people a classroom learning style is better then a
book.  And for us vulcans a book is all we need.  It's all about the
individual.

-Dan

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



Re: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread andu
On Mon, 15 Sep 2003 18:22:05 -0700
"Jeremy Brand, B.S." <[EMAIL PROTECTED]> wrote:

> Thanks to everyone for their responses, though I still have not 
> found a way to get to the conference at a reasonable price (what I 
> consider reasonable).
> 
> If anyone has any comments other than justifying the price of the 
> conference, like a friends of php list I can get on so I can 
> attend it would be greatly appreciated.  I feel like I would 
> actually add value by being there, not only in supporting my 
> friends who are doing speaking at the conference, but also in 
> helping to evangelize php and help newbies with questions/fud/etc.

These gatherings are most likely for people sponsored by their employers, don't
imagine participants come out of it $500 smarter then they went in. If it makes
you feel good to hang out for 5 minutes with "the big guys" then borrow money and
go, if learning is your goal, a good book and mostly practice will get you there.
I used to read about these RedHat certification 2-3 days sessions for around
$2000, does anyone in his/hers right mind believe he/she can become a Linux system
administrator in 3 days?

> 
> Thanks.
> Jeremy
> 
> 
> Jeremy Brand, B.S. wrote:
> > Does anyone know a way to attend the PHP|con west as an observer in 
> > Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?
> > 
> > The pricing seems insane, and geared towards people with lots of spare 
> > money...
> > 
> > I would love to hear specifically the Advanced track on Oct. 23 (Michael 
> > Radwin, Sterling, Thies, George Schlossnagle and JimW), but I'm not going 
> > to shell out $495 (the cheapest non-student rate) for it.
> > 
> > Thanks,
> > Jeremy
> > 
> 
> 
> -- 
> "Prediction is very difficult, especially of the future."
> Niels Bohr
> http://www.nirvani.net
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-- 
Andu

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



Re: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread Robert Cummings
I've been hearing a lot lately about online donations. People setting up
paypal or whatnot accounts to have people donate for new boobies, new
clothes, new whatever. Maybe you could set up a paypal donation fund for
people to help pay your way there. Now admittedly it's not going to be
all the rave like chipping in for a new set of boobies, but hey, who
knows, maybe you'll get to go to the conference AND get a new set of
boobies.

Cheers,
Rob.

Ps. This message has been brought to you by a tongue in a cheek.

On Mon, 2003-09-15 at 21:22, Jeremy Brand, B.S. wrote:
> 
> If anyone has any comments other than justifying the price of the 
> conference, like a friends of php list I can get on so I can 
> attend it would be greatly appreciated.  I feel like I would 
> actually add value by being there, not only in supporting my 
> friends who are doing speaking at the conference, but also in 
> helping to evangelize php and help newbies with questions/fud/etc.

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Jeremy Johnstone
Let me also say, that I fully think their price is fair. It's right in
line with most other conferences (if not cheaper). I was just clarifying
that the $495 price is not all inclusive. I wish I would be able to
attend, but unfortunately money is tight right now for me, and I can't
afford it. I most likely will be speaking at the next one (assuming they
accept my submission when it comes time) and money won't be an issue. 

Jeremy

P.S. - In regards to the email below, if you did that you would have to
factor in extra gas money, and $10 a day for WIFI access from the hotel.

On Mon, 2003-09-15 at 21:23, John W. Holmes wrote:
> Jeremy Johnstone wrote:
> 
> > Actually the $495 is the conference fee only... It does not include the
> > $160 a night for the hotel room (price of the hotel the conference is
> > at), or food, or transportation. That is just your ticket into the
> > conference. Factor in everything else, and your easily up to
> > $1500-$2000. Using the average salary which was posted in this thread,
> > that is about a months pay after taxes for an average programmer.
> 
> What are you talking about? You sleep in your car and have a hot plate 
> running off the cigarette lighter to make Raman noodles! Bring extra 
> spray deodorant.
> 
> -- 
> ---John Holmes...
> 
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
> 
> php|architect: The Magazine for PHP Professionals – www.phparch.com

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread John W. Holmes
Jeremy Johnstone wrote:

Actually the $495 is the conference fee only... It does not include the
$160 a night for the hotel room (price of the hotel the conference is
at), or food, or transportation. That is just your ticket into the
conference. Factor in everything else, and your easily up to
$1500-$2000. Using the average salary which was posted in this thread,
that is about a months pay after taxes for an average programmer.
What are you talking about? You sleep in your car and have a hot plate 
running off the cigarette lighter to make Raman noodles! Bring extra 
spray deodorant.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


RE: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread Cody Phanekham
> -Original Message-
> From: Jeremy Brand, B.S. [mailto:[EMAIL PROTECTED]
> actually add value by being there, not only in supporting my 
> friends who are doing speaking at the conference, 

maybe ask your friends that are speaking at the conference if they can sneak you in? 
or get you a discount?


*
This e-mail, including any attachments to it, may contain confidential and/or personal 
information.
If you have received this e-mail in error, you must not copy, distribute, or disclose 
it, use or take any action 
based on the information contained within it.

Please notify the sender immediately by return e-mail of the error and then delete the 
original e-mail.

The information contained within this e-mail may be solely the opinion of the sender 
and may not necessarily 
reflect the position, beliefs or opinions of Salmat on any issue.

This email has been swept for the presence of computer viruses known to Salmat's 
anti-virus systems.

For more information, visit our website at  www.salmat.com.au.
*


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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Jeremy Johnstone
Actually the $495 is the conference fee only... It does not include the
$160 a night for the hotel room (price of the hotel the conference is
at), or food, or transportation. That is just your ticket into the
conference. Factor in everything else, and your easily up to
$1500-$2000. Using the average salary which was posted in this thread,
that is about a months pay after taxes for an average programmer.

Jeremy

On Mon, 2003-09-15 at 17:12, Dan Anderson wrote:
> > The pricing seems insane, and geared towards people with lots of 
> > spare money...
> ::snip::
> > but I'm not going to shell out $495 (the cheapest non-student 
> 
> If you consider the average salary for a computer programmer is probably
> $40k - $50k (at least in the US) this is not insane.  (Heck, it's less
> then a weeks pay -- even with the plane tickets).  I assume this covers
> hotel rooms (pricey), food (pricey), speakers (very pricey), etc.
> 
> -Dan

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



[PHP] Oracle 8i problem connection with pear

2003-09-15 Thread ORLANDO POZO
  Hello, mailing-list people, I need help about connect 
the RDBMS Oracle8i through PEAR library, look this code

Test DB Class - PEAR


NAMEPHONEADDRESS

  //connect
  require_once('DB.php');
  $db 
=DB::connect("oci8://system:[EMAIL PROTECTED]/orcl");
  // message
  if (DB::iserror($db)) {
die($db->getMessage());
  }
  //issue the query
  $sql ="SELECT *
 FROM S_CUSTOMER";
  $q =$db->query($sql);
  // message
  if (DB::iserror($q)) {
die($q->getMessage());
  }
  //generate table
  while ($q->fetchInto($row)) {
  ?>
  




  }
  ?>
  
  

  When I execute this code, I receive this output:

  DB Error: extension not found
  NAME PHONE ADDRESS
  I think that is a problem with the DSN in the 
connection (oci8://system:[EMAIL PROTECTED]/orcl)

  I put oci8 for the db type, user: system, pass: 
manager, 
and db: orcl
I could connect oracle8i with PHP, but using ODBC methods, 
I want now connect oracle8i through the PEAR library.

  If someone know, please give me a hand, thanks.

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


Re: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread John W. Holmes
Jeremy Brand, B.S. wrote:
Thanks to everyone for their responses, though I still have not found a 
way to get to the conference at a reasonable price (what I consider 
reasonable).

If anyone has any comments other than justifying the price of the 
conference, like a friends of php list I can get on so I can attend it 
would be greatly appreciated.  
I know this guy that can get you in. 1/2 price, cash up front. What size 
cardboard box could you fit in?

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


[PHP] Re: PHP|Con insane pricing

2003-09-15 Thread Jeremy Brand, B.S.
Thanks to everyone for their responses, though I still have not 
found a way to get to the conference at a reasonable price (what I 
consider reasonable).

If anyone has any comments other than justifying the price of the 
conference, like a friends of php list I can get on so I can 
attend it would be greatly appreciated.  I feel like I would 
actually add value by being there, not only in supporting my 
friends who are doing speaking at the conference, but also in 
helping to evangelize php and help newbies with questions/fud/etc.

Thanks.
Jeremy
Jeremy Brand, B.S. wrote:
Does anyone know a way to attend the PHP|con west as an observer in 
Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?

The pricing seems insane, and geared towards people with lots of spare 
money...

I would love to hear specifically the Advanced track on Oct. 23 (Michael 
Radwin, Sterling, Thies, George Schlossnagle and JimW), but I'm not going 
to shell out $495 (the cheapest non-student rate) for it.

Thanks,
Jeremy


--
"Prediction is very difficult, especially of the future."
   Niels Bohr
http://www.nirvani.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Language filter

2003-09-15 Thread Kris Reid
Hi All

I have a website with a standard html form on it. Every now and then some jerk submits 
the form with some dirty words.
This is then seen by my clients which as you can imagine is very unprofessional.

I want to build a language filter but can't think of good way of doing in it.
The best idea I found on the net was to have a DB of dirty words.
Then when someone submits the form check their entree against the DB.
This seems a little labour intensive and won't work if someone submits something like 
youraf*&!head.

Any ideas?

Thanks

Kris



Re: [PHP] Win2K and trans_sid

2003-09-15 Thread Raditha Dissanayake
The only sure fire way to make sure you sessions do not get killed 
without cookies is to append the session identifier to the end of each link.

Adam H. Pendleton wrote:

I am running Apache 2.0.47 with PHP 4.3.3 on a Windows 2000 server, 
and I am having some trouble getting cookie-less sessions to work.  
I've search around trying to figure out how to get this to work, but 
most of what i have found is people going to other way.  To be clear, 
I am trying to use PHP sessions *without* cookies (none at all).  To 
do this I have set use_cookies to 0 and use_trans_sid to 1, but all 
that does is break sessions altogether.  Is there a way to get this to 
work?  What am I doing wrong?  Is what I am trying to do even possible 
with the PHP session handler?

Any help or pointers would be greatly appreciated.

ahp



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread Raditha Dissanayake
Wrong approach all together. Start using CVS

Wei Wang wrote:

>hi, 
>
>This may sound very newbie. But since html comment uses  which doesn't 
>comment out the
>php code. And the php comment /**/ // apparently doesn't work on html. So how do I 
>comment out
>a chunk of html/php mixed code? 
>
>
>Many thanks,
>
>Wei Wang
>  
>


-- 
http://www.radinks.com/upload
Drag and Drop File Uploader.

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



Re: [PHP] simple online form stuck at !isset($first) condition

2003-09-15 Thread Wei Wang
Dear Curt,

Thanks a lot. Is this related to the register_global variable as well? I was
stuck at the $request_method and $_SERVER['request_method'] for quite
a long time.


Wei




- Original Message - 
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 16, 2003 1:22 AM
Subject: Re: [PHP] simple online form stuck at !isset($first) condition


> * Thus wrote Wei Wang ([EMAIL PROTECTED]):
> >
> > 
> >
> > 
> note the method --
>
> > First Name:
> > 
> > 
> > Last Name:
> > 
> > 
> >
> > 
> > 
> >
> >  >
> >
> > if(!isset($first)) {
>
> make this
> if (!isset($_POST['first'])) {
>
> see:
> http://php.net/language.variables
> http://us3.php.net/register_globals
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."
>
> -- 
> 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] simple online form stuck at !isset($first) condition

2003-09-15 Thread Curt Zirzow
* Thus wrote Wei Wang ([EMAIL PROTECTED]):
> 
> 
> 
> 
note the method --

> First Name:
> 
> 
> Last Name:
> 
>  
> 
> 
> 
> 
>  
> 
> if(!isset($first)) {

make this 
if (!isset($_POST['first'])) {

see:
http://php.net/language.variables 
http://us3.php.net/register_globals


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] simple online form stuck at !isset($first) condition

2003-09-15 Thread Wei Wang
hi, all,

I have this code at http://weiwang.freeshell.org/formprac.php and the execution kept 
stuck at
the condition part of:
if(!isset($first)) {
show_form();
}

Even if I input some text into both field and click submit, the execution wouldn't go 
to any other
conditional branch and be stuck at this one. 

Any advice would be greatly appreciated.


Wei Wang






Untitled Document




Simple Form Example




First Name:


Last Name:

 




"; 
show_form($first,$last);
   }
   else {
echo "Thank you, $first $last";  
   }
} 
?>





Re: [PHP] mysql_query not returning true on innodb

2003-09-15 Thread daniel
i am doing a straight mysql_query without an autocommit=0 should i be doing
an autocommit=0 if i am doing a read ?

> Hi there i have a random issue where mysql_query is not returning true
> sometimes on an innodb table which will trigger a custom error, this
> happens randomly if i go back to that page its fine ??
>
> --
> 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] mysql_query not returning true on innodb

2003-09-15 Thread daniel
Hi there i have a random issue where mysql_query is not returning true
sometimes on an innodb table which will trigger a custom error, this
happens randomly if i go back to that page its fine ??

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> ah like with 4 kids I have nothing better to do than run down and grab a
> book and evaluate my parenting skills.
It's not about parenting but about money management.  It's pretty cool
and shows you how to minimize taxes (so the govn't gets less then 40%).

> umm I take it you dont have kids and only pay part of the rent or what not?

No kids.  Full time programmer.  Putting as much away as possible and
hoping to retire at 40.

> lets see rent is 1200/mo
> 1200 * 12 = 14400
With 4 kids I can understand that.

> and umm socialist system.. umm where you been hiding?
I pay for health care and other things out of pocket.  Socialism in the
form of government handouts should not be confused with communism.  

> at least I dont live in a police state.
I hate the patriot act.

-Dan

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Curt Zirzow
* Thus wrote Chris Sherwood ([EMAIL PROTECTED]):

> and umm socialist system.. umm where you been hiding?
> at least I dont live in a police state.

ouch :)

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Chris Sherwood
> > Yea its not bad if you dont have a life outside of programming and/or
> > computers
> Well most professionals who would go to this conference -- IMHO -- would
> be doing it because it would be worth while.  For instance, I considered
> going because if it reduced the time it takes for me to develop software
> by just 1% it would more then pay itself off.

lol that I agree with

> > if you have kids or other responsibilities then all of a sudden 500$
becomes
> > a very large issue as thats a months groceries or what not...
> Well there are a number of things to consider.  It is a lot about what
> you value and how you manage your money.  (Pick up a copy of one of the
> Rich Dad's series in your local library / bookstore to see what I mean).

ah like with 4 kids I have nothing better to do than run down and grab a
book and evaluate my parenting skills.

never mind keeping up with the current advances in techniques and technology

> > heh yea the average salary is 50K but then when the government takes 40%
(if
> > your canadian) that is not a whole lot
> (5 - (.40 * 5) == 3)

umm I take it you dont have kids and only pay part of the rent or what not?

lets see rent is 1200/mo
1200 * 12 = 14400
and umm socialist system.. umm where you been hiding?
at least I dont live in a police state.
> That's a heckuva lot of money.  Especially when you consider you
> canadians have a cradle to grave socialist system that covers major
> expenses for us from the US like healthcare.  Of course, I don't know
> your particular situation.  What would be reasonable to you?
>
> -Dan
>
>

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> Unless I'm missing out on all the gold (which is a possibility),
speakers
> usually get a very modest honorarium and their expenses paid. I can't imagine
> that speakers are the most significant cost of a conference.

Well it does depend on the fame (or infamy) of the speaker.  If you want
Bill Clinton to speak for you be prepared to cough up a couple hundred
grand.  If you want somebody else well::shrugs::

But remember that all expenses paid part.  Let's say a meal costs $5 a
person (to be cheap).  That's not a lot of money.  But rooms can cost
upwards of $100 a night (probably at least $60 even with the discount). 
So that plus food + everything else for the speaker can add up.

Of course, I haven't seen the finances of this conference.  But I would
suspect that $495 is a reasonable price.

-Dan

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> Yea its not bad if you dont have a life outside of programming and/or
> computers
Well most professionals who would go to this conference -- IMHO -- would
be doing it because it would be worth while.  For instance, I considered
going because if it reduced the time it takes for me to develop software
by just 1% it would more then pay itself off.  

> if you have kids or other responsibilities then all of a sudden 500$ becomes
> a very large issue as thats a months groceries or what not...
Well there are a number of things to consider.  It is a lot about what
you value and how you manage your money.  (Pick up a copy of one of the
Rich Dad's series in your local library / bookstore to see what I mean).

> heh yea the average salary is 50K but then when the government takes 40% (if
> your canadian) that is not a whole lot
(5 - (.40 * 5) == 3)

That's a heckuva lot of money.  Especially when you consider you
canadians have a cradle to grave socialist system that covers major
expenses for us from the US like healthcare.  Of course, I don't know
your particular situation.  What would be reasonable to you?

-Dan

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Chris Shiflett
--- Dan Anderson <[EMAIL PROTECTED]> wrote:
> speakers (very pricey), etc.

Unless I'm missing out on all the gold (which is a possibility), speakers
usually get a very modest honorarium and their expenses paid. I can't imagine
that speakers are the most significant cost of a conference.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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



RE: [PHP] PHP|Con insane pricing

2003-09-15 Thread Roger B.A. Klorese
> Yea its not bad if you dont have a life outside of programming and/or
> computers
> 
> if you have kids or other responsibilities then all of a 
> sudden 500$ becomes
> a very large issue as thats a months groceries or what not...
> 
> heh yea the average salary is 50K but then when the 
> government takes 40% (if
> your canadian) that is not a whole lot

I'm sure that, like most conferences and trainings, the assumption is that
people will attend who are either employed in the subject area -- in which
case they need to get their employers to ante up -- or are independent
contractors in the subject area -- in which case they need to treat it as a
legitimate business expense for tax purposes.  It's not a "friends of PHP"
sci-fi con...

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



Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Chris Sherwood

Yea its not bad if you dont have a life outside of programming and/or
computers

if you have kids or other responsibilities then all of a sudden 500$ becomes
a very large issue as thats a months groceries or what not...

heh yea the average salary is 50K but then when the government takes 40% (if
your canadian) that is not a whole lot


> > The pricing seems insane, and geared towards people with lots of
> > spare money...
> ::snip::
> > but I'm not going to shell out $495 (the cheapest non-student
>
> If you consider the average salary for a computer programmer is probably
> $40k - $50k (at least in the US) this is not insane.  (Heck, it's less
> then a weeks pay -- even with the plane tickets).  I assume this covers
> hotel rooms (pricey), food (pricey), speakers (very pricey), etc.
>
> -Dan
>
> -- 
> 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] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
> The pricing seems insane, and geared towards people with lots of 
> spare money...
::snip::
> but I'm not going to shell out $495 (the cheapest non-student 

If you consider the average salary for a computer programmer is probably
$40k - $50k (at least in the US) this is not insane.  (Heck, it's less
then a weeks pay -- even with the plane tickets).  I assume this covers
hotel rooms (pricey), food (pricey), speakers (very pricey), etc.

-Dan

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



[PHP] Re: How do I squelch warnings (without editing php.ini)?

2003-09-15 Thread Curt Zirzow
On Mon, 15 Sep 2003 13:20:05 -0400, Dan Anderson <[EMAIL PROTECTED]> 
wrote:

I am running a script that occasionally utters a few warnings when the
user does something dumb (but it does not kill the script).  Is there a
way to turn off warnings within a script?  I really don't want my users
to see them.
You can  lazily suppress errors on the fly like so
 @call_func();
the @ will suppress error messages being sent directly to the browser.

Curt	

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


[PHP] Re: PHP|Con insane pricing

2003-09-15 Thread Curt Zirzow
On Mon, 15 Sep 2003 11:27:37 -0700, Jeremy Brand <[EMAIL PROTECTED]> 
wrote:

Does anyone know a way to attend the PHP|con west as an observer in Santa 
Clara, CA, US on Oct. 23rd without spending tons of ca$h?
I think technically its PHP{con west

The pricing seems insane, and geared towards people with lots of spare 
money...
There is nothing insane, IMO, most events like this usually cost much more.

and no, i don't have lots of spare money to spend to go to this.

Curt.

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


[PHP] Re: How to comment out chunk of html/php mixed code?

2003-09-15 Thread Curt Zirzow
On Mon, 15 Sep 2003 20:59:53 +0100, Wei Wang <[EMAIL PROTECTED]> wrote:

hi,

This may sound very newbie. But since html comment uses  which 
doesn't comment out the
php code. And the php comment /**/ // apparently doesn't work on html. So 
how do I comment out
a chunk of html/php mixed code?
for temporary comments I do what jennifer does and use a if(false) block to 
not execute it


// other php code
/* that has comments like this */
?>
} // if false
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: MS-SQL 2000 weird problem

2003-09-15 Thread Curt Zirzow
On Mon, 15 Sep 2003 15:21:41 -0300, Martin Greco <[EMAIL PROTECTED]> 
wrote:

Hi everyone.

I have a Redhat 8 box with Apache 2.0.40, PHP 4.3.1, FreeTDS 0.61 to work
with an MS-SQL2000 server.
It works fine and I have no problems but today i found this.

When i call specific stored procedures it retrieve no rows, and if i 
paste
this query on the Query Analizer it works fine.
The function mssql_num_fields() shows correctly the number of fields.
I'm just taking a wild stab at this but maybe somethings changed with the
database structure.. try re-saving the storedprocedure so it will update 
its cache.

Curt	

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


[PHP] Re: Is the "PHP List Automoderator" a spam bot?

2003-09-15 Thread Curt Zirzow
On Mon, 15 Sep 2003 17:49:44 -0400, Dan Anderson <[EMAIL PROTECTED]> 
wrote:

I just got an email from some daemon claiming to be the "PHP List
Automoderator" asking me to reply before my e-mail could be sent to the
list.  I assume that this is a spam bot.  Anybody else having this
problem?
that usually happens when you send a post/reply to the list with an email 
that
isn't subscribed to the list.

curt.	

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


Re: [PHP] multiple FORMS on same page problem.

2003-09-15 Thread Chris Shiflett
--- "Golawala, Moiz M (IndSys, GE Interlogix)" <[EMAIL PROTECTED]> wrote:
> I am creating a page with 2 buttons.
...
> 
>   
>   
>   
> 
> 
>   
> 
...
> I would like to see the variable 'someVal' in the $_POST of both
> "page4 Submit" button and "page5 Submit" button.

Then put someVal in both forms. When you submit a form, only the data in the
form will be sent to the server.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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



[PHP] Is the "PHP List Automoderator" a spam bot?

2003-09-15 Thread Dan Anderson
I just got an email from some daemon claiming to be the "PHP List
Automoderator" asking me to reply before my e-mail could be sent to the
list.  I assume that this is a spam bot.  Anybody else having this
problem?

-Dan

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



Re: [PHP] MS-SQL 2000 weird problem

2003-09-15 Thread Dan Anderson
> Any thoughts?

Are you dying and outputting an error where something could happen to
bodge up the server?

I'm not familiar with MS SQL Server, but I know under mysql:



-Dan

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



[PHP] abreviating echo commands

2003-09-15 Thread Kris Yates
Hello..

I forget where but I found some source awhile back that abbreviated 
echo.  It was something like
 which worked the same as .  Maybe it was 
.. Obviously I dont remember.. which is why I am asking..  
:)  Does anyone have a link to something that talks about how to 
abbreviate commands in PHP?

Well.. not how to.. but just a list of abbreviations?

Is echo the only one that has an abbreviation?  I couldn't find anything 
in the manual.. any leads?

Thanks,

Kris

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


Re: [PHP] browser detector (php side)

2003-09-15 Thread Raquel Rice
On Mon, 15 Sep 2003 13:54:19 +0800
"Louie Miranda" <[EMAIL PROTECTED]> wrote:

> Im looking for a browser detector and can redirect to a certain
> page if its match something. So far phpsniff is the only thing i
> found.
> 
> But i didnt got it to work d redirection part.
> 
> any ideas?
> 
> 
> -
> Louie
> 

Did you try:  $_SERVER['HTTP_USER_AGENT'];

--
Raquel

Far away in the sunshine are my highest aspirations. I may not reach
them, but I can look up and see the beauty, believe in them and try
to follow where they lead.
  --Louisa May Alcott

--
Raquel

Far away in the sunshine are my highest aspirations. I may not reach
them, but I can look up and see the beauty, believe in them and try
to follow where they lead.
  --Louisa May Alcott

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



[PHP] MS-SQL 2000 weird problem

2003-09-15 Thread Martin Greco
Hi everyone.

I have a Redhat 8 box with Apache 2.0.40, PHP 4.3.1, FreeTDS 0.61 to work
with an MS-SQL2000 server.

It works fine and I have no problems but today i found this.

When i call specific stored procedures it retrieve no rows, and if i paste
this query on the Query Analizer it works fine.
The function mssql_num_fields() shows correctly the number of fields.

The strange thing is that it was working a day ago (the same code).

Any thoughts?

-- 
###
# Martin Greco

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



Re: [PHP] multiple FORMS on same page problem.

2003-09-15 Thread CPT John W. Holmes
You can only use one form, as you've figured out. You can have PHP determine
the action for each button, though..

In a form with two buttons, say names "submit1" and "submit2", only one
variable will be set when the form is submitted, the actual button that was
clicked. So you can use logic like this in PHP.

http://www.yourdomain.com/page5.php";);
}

Now, on "page5.php", to get $_POST back, just do:

$_POST = $_SESSION['post'];

That's assuming you have session_start() on each page and you don't have
anything in $_POST already on "page5.php" that you want to retain.

---John Holmes

PS: Sorry for the top-post, but OExpress sucks. :)


- Original Message - 
From: "Golawala, Moiz M (IndSys, GE Interlogix)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 15, 2003 4:17 PM
Subject: [PHP] multiple FORMS on same page problem.


I am creating a page with 2 buttons. One which will refresh the page and the
other that will go to another page. My problem that I need to put all the
values into $_POST and have access to when any of the 2 buttons are clicked.
If I use the button in 2 seperate form tags I don't have access to all the
values in $_POST. Please look at the code below:

file (page4.php):













file(page5.php):



I would like to see the variable 'someVal' in the $_POST of both "page4
Submit" button and "page5 Submit" button. This code is a simplified version
of the more complecated code where a tonnes of other values are involved.
Any help is appreciated.

Moiz

-- 
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] multiple FORMS on same page problem.

2003-09-15 Thread Vail, Warren
I don't know of any rule that says you cannot have two submit button in the same form.

Of course, if you need to know which was clicked, you will either need to name them 
differently or detect their values in your form processing routine.  If the button is 
clicked that should take you to another form simply do a redirect (after processing 
all $_POST information);

header("Location: new page");
exit;   // I always use this because 
processing continues after header

good luck,

Warren Vail

-Original Message-
From: Golawala, Moiz M (IndSys, GE Interlogix)
[mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2003 1:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] multiple FORMS on same page problem.


I am creating a page with 2 buttons. One which will refresh the page and the other 
that will go to another page. My problem that I need to put all the values into $_POST 
and have access to when any of the 2 buttons are clicked. 
If I use the button in 2 seperate form tags I don't have access to all the values in 
$_POST. Please look at the code below:

file (page4.php):













file(page5.php):



I would like to see the variable 'someVal' in the $_POST of both "page4 Submit" button 
and "page5 Submit" button. This code is a simplified version of the more complecated 
code where a tonnes of other values are involved. Any help is appreciated. 

Moiz

-- 
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] Re: passthru causes php to lose internal variables

2003-09-15 Thread exasperated
system() has the same problem as passthru.  Thanks for the suggestion
anyway.

I wonder if I should post this to the bug list?

"Nicole" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Did you try using the system() command instead and skip using exec and
> passthru?
>
> --
> Nicole
>
>
> "Exasperated" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Anyone come across something like this before?
> >
> > I have made a little test script as follows:
> >  > header ("Content-Type: application/pdf");
> > $command_line = "/usr/bin/pdflabelseries " .
> > escapeshellcmd($_POST['labelstart']) . " " .
> > escapeshellcmd($_POST['labelend']);
> > exec ("echo \"$command_line\" >/opt/specs/labels.txt");
> > //passthru($command_line);
> > ?>
> >
> > The form takes input from a posted form with two variables, labelstart
and
> > labelend.  In the above test, if I put in 'start' and 'end' as the
posted
> > variable data, the output from /opt/specs/labels.txt (writable by the
http
> > server) is:
> > /usr/bin/pdflabelseries start end
> > All is well and good.  Now is where it heads South.  I uncomment the
> > passthru command above.  The output from the script in
> /opt/specs/labels.txt
> > from the same posted form with the same data entered is now:
> > /usr/bin/pdflabelseries
> > pdflabelseries is a C program that I have confirmed works perfectly on
the
> > command line (i.e. generates the requisite pdf file to stdout).
> > Even if the C program fails (which it does not appear to do from the
> output
> > in the httpd logs as it outputs its command line to stderr), surely php
> > should not lose its own internal variables, especially, for a command
that
> > is executed BEFORE the passthru command.
> >
> > I am truly baffled.
> >
> > Any help appreciated.
> > Regards
> >
> > Mark
> >
> > I am running vanilla Mandrake 9.1 with the following PHP rpms:
> > libphp_common430-430-11mdk
> > php-pear-4.3.0-3mdk
> > apache2-mod_php-2.0.44_4.3.1-2mdk
> > php-xml-4.3.0-2mdk
> > php-dba_bundle-4.3.0-4mdk
> > php-pgsql-4.3.0-4mdk
> > php-xmlrpc-4.3.0-2mdk
> > php-manual-en-4.3.0-2mdk
> > php430-devel-430-11mdk
> > php-gd-4.3.0-2mdk

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



[PHP] multiple FORMS on same page problem.

2003-09-15 Thread Golawala, Moiz M (IndSys, GE Interlogix)
I am creating a page with 2 buttons. One which will refresh the page and the other 
that will go to another page. My problem that I need to put all the values into $_POST 
and have access to when any of the 2 buttons are clicked. 
If I use the button in 2 seperate form tags I don't have access to all the values in 
$_POST. Please look at the code below:

file (page4.php):













file(page5.php):



I would like to see the variable 'someVal' in the $_POST of both "page4 Submit" button 
and "page5 Submit" button. This code is a simplified version of the more complecated 
code where a tonnes of other values are involved. Any help is appreciated. 

Moiz

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



RE: [PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread Jennifer Goodie

> 
> your mixed html and php code here
>
> */ ?>
>
> that way php will take everything inside the  tags and
> comment them
> out, regardless of if they are html or php or whatever.

This won't work is your PHP code has comments using /* */ syntax in it
already.  I always just through an if(false){ } around huge portions of
mixed content that I want to comment out.  Unless you have unbalanced curly
braces in the chunk you want to comment out, it should work.

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



Re: [PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread Eugene Lee
On Mon, Sep 15, 2003 at 08:59:53PM +0100, Wei Wang wrote:
: 
: This may sound very newbie. But since html comment uses 
: which doesn't comment out the php code. And the php comment /**/ //
: apparently doesn't work on html. So how do I comment out a chunk of
: html/php mixed code? 

Remove the chunk of mixed code and save it into an external PHP file,
e.g. mixed_code.php.  In place of removed chunk, use an include() or
require() statement, e.g. include("mixed_code.php").  Now comment
that one line in or out as needed.

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



Re: [PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread CPT John W. Holmes
From: "Wei Wang" <[EMAIL PROTECTED]>

> This may sound very newbie. But since
> html comment uses  which doesn't
> comment out the php code. And the php
> comment /**/ // apparently doesn't work
> on html. So how do I comment out a
> chunk of html/php mixed code?

/* and */ appears to work:


HTML


That'll just display "bye"... You just have to start the comment in PHP mode
and end it in PHP mode. Any breaking out of PHP mode to display HTML will be
commented out.

If you have mostly HTML with some PHP thrown in that you want to comment
out, HTML comments will work, also, so long as you start the comment in HTML
mode and end it in HTML mode, like this:


HTML

HTML

Which will just display "HTML" twice. The center part is commented out.

---John Holmes...

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



Re: [PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread Gabriel Guzman
On Monday 15 September 2003 12:59 pm, Wei Wang wrote:
> hi,
>
> This may sound very newbie. But since html comment uses  which
> doesn't comment out the php code. And the php comment /**/ // apparently
> doesn't work on html. So how do I comment out a chunk of html/php mixed
> code?

probably the easiest way is to just do this: 




that way php will take everything inside the  tags and comment them 
out, regardless of if they are html or php or whatever. 

hth, 
gabe.

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



Re: [PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread Robert Cummings
You might try the following:



This is untested, I've never had to face the issue.

Cheers,
Rob.

On Mon, 2003-09-15 at 15:59, Wei Wang wrote:
> hi, 
> 
> This may sound very newbie. But since html comment uses  which doesn't 
> comment out the
> php code. And the php comment /**/ // apparently doesn't work on html. So how do I 
> comment out
> a chunk of html/php mixed code? 
> 
> 
> Many thanks,
> 
> Wei Wang
-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



[PHP] How to comment out chunk of html/php mixed code?

2003-09-15 Thread Wei Wang
hi, 

This may sound very newbie. But since html comment uses  which doesn't comment 
out the
php code. And the php comment /**/ // apparently doesn't work on html. So how do I 
comment out
a chunk of html/php mixed code? 


Many thanks,

Wei Wang

RE: [PHP] What is wrong with this code ?

2003-09-15 Thread Carl Furst
If should use double equals for comparison.. if ($doWork == 1) { etc here}.
Of course doing multiple tests like this you are better off using switch
case...


Switch ($doWork) {
Case 0:
Exit;
Break;
Case 1:
DoOne($arguments);
Break;
Case 2:
DoTwo($arguments);
Break;
}
each number after the case statement is the value that $doWork will be
tested against.. look up Switch in the php manual, it's behavior can be a
bit weird especially if you forget to "break" if you don't break it's like
an OR statement/gate;

Carl.

-Original Message-
From: Daniel Szasz [mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2003 3:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] What is wrong with this code ?

Hello

What is wrong with this code ?

$doWork = $_GET[doWork];

echo $doWork;
echo ( "");
if ( $doWork = 0) {
  exit;
}
else
{
  if ( $doWork = 1) {
  ?>
  
  
  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] What is wrong with this code ?

2003-09-15 Thread Miroslaw Milewski
Daniel Szasz wrote:

 > What is wrong with this code ?

 == instead of =.

--

	miro.

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


Re: [PHP] What is wrong with this code ?

2003-09-15 Thread Robert Cummings
On Mon, 2003-09-15 at 15:29, Daniel Szasz wrote:
> Hello
> 
> What is wrong with this code ?
> 
> $doWork = $_GET[doWork];

This is sloppy, put the quotes around the key string "doWork".

> echo $doWork;
> echo ( "");
> if ( $doWork = 0) {

You just assigned 0 to $doWork, try using 0 == $doWork

>   exit;
> }
> else
> {
>   if ( $doWork = 1) {

Once again, assignment when comparison is probably intended.

>   ?>
>   
>   
>  };
>   if ( $doWork = 2) {

Yet again with the assignment.

> echo ( "call request accepted");
>   };
>   if ( $doWork = "3") {

Another assignment, but now it's a string, not even any consistency.

> echo ( "call request rejected");
>   }
> }
> 
> I still got in the page the 2 buttons and the 2 echo's from doWork = 2 and
> doWork = 3.

Looks like you're a coding slob IMHO.

Rob.
-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



[PHP] PHP|Con insane pricing

2003-09-15 Thread Jeremy Brand, B.S.
Does anyone know a way to attend the PHP|con west as an observer 
in Santa Clara, CA, US on Oct. 23rd without spending tons of ca$h?

The pricing seems insane, and geared towards people with lots of 
spare money...

I would love to hear specifically the Advanced track on Oct. 23 
(Michael Radwin, Sterlin, Thies, George Schlossnagle and JimW), 
but I'm not going to shell out $495 (the cheapest non-student 
rate) for it.

Thanks,
Jeremy
--
"Prediction is very difficult, especially of the future."
   Niels Bohr
http://www.nirvani.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] What is wrong with this code ?

2003-09-15 Thread Daniel Szasz
Hello

What is wrong with this code ?

$doWork = $_GET[doWork];

echo $doWork;
echo ( "");
if ( $doWork = 0) {
  exit;
}
else
{
  if ( $doWork = 1) {
  ?>
  
  
  http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: installation help

2003-09-15 Thread Shadow
You didn't configure something right. I would go over the install steps
again.  I installed Foxserv on NT without IIS but I did install 4.3.2 on
Windows 2003 server and found the instructions here a god-send.
http://www.php.net/manual/en/install.windows.php
Basically you need to make sure that php.ini is in \windows and
php4isapi.dll in \windows\system32.  I also had to configure IIS to allow me
to run scripts.
Shadow

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



Re: [PHP] How do I squelch warnings (without editing php.ini)?

2003-09-15 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]>


> I am running a script that occasionally utters a few warnings when the
> user does something dumb (but it does not kill the script).  Is there a
> way to turn off warnings within a script?  I really don't want my users
> to see them.

Short of fixing your code, adjust the error_reporting() level.

us2.php.net/error_reporting

---John Holmes...

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



[PHP] How do I squelch warnings (without editing php.ini)?

2003-09-15 Thread Dan Anderson
I am running a script that occasionally utters a few warnings when the
user does something dumb (but it does not kill the script).  Is there a
way to turn off warnings within a script?  I really don't want my users
to see them.

Thanks in advance,

Dan Anderson

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



RE: [PHP] Using PHP to do something with Acrobat PDF....

2003-09-15 Thread Luis Lebron
I use htmldoc http://www.easysw.com/htmldoc/ to generate pdf files from html
documents. Another options is fpdf http://www.fpdf.org. 

Luis

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003 9:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Using PHP to do something with Acrobat PDF


Hi Fellas!!

Know of any good websites that would provide tutorials, step-by-step,
and/or a PHP scripts of creating a PDF, putting datas into PDF, along with
Printing PDF, Saving PDF files, etc...  I have no experience with using PHP
and PDF so I need both a tutorial and quick, plain to the point of PHP
script of PDF stuffs.  From there I can start reviewing on how it work, what
function is being used, etc.  Then look at all of the available PHP
functions for PDF, add what I need or take out what I don't need, etc.
(Customize), etc...

Another question, does using PDF require the use of some configuration
in php.ini??  How does PHP do the PDF stuffs if there is no PDF on the
server?  Etc...


Thanks!
  Scott F.

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


[PHP] Updated PayPal IPN class for PHP

2003-09-15 Thread Jeremy Johnstone
Unfortunately it seems PayPal has broke IPN processing for PHP users
recently. This is important news because a good majority of the people
using IPN with a PHP script are no longer able to automatically process
payments, and PayPal offers nothing to help PHP users who are having
trouble. In fact they claim that they changed nothing and that it is the
user's fault that it suddenly stopped working one day. The problem
actually is that PayPal now seems to require your IPN script to follow a
http redirection. After trying almost everything, within reason, to
avoid this redirection, it seems no matter whether you use GET or POST
and HTTP or HTTPS they force you to follow the redirect. The solution to
this problem is to use cURL so PHP can follow the redirection and thus
get the VERIFIED or INVALID response from PayPal. A new PHP class which
works perfectly with the current PayPal IPN (and should always work even
if they fix the bug) is available at http://www.scriptdevelopers.net. It
is a modified version of the class by Pineapple Technologies which is
commonly used all over the Internet and is a drop in replacement for
their paypal_ipn.php class. If you use a class named paypal_ipn.php,
then most likely you will need to get this updated version. The script
is licensed under the GPL.

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



[PHP] PEAR::Pager examples

2003-09-15 Thread Mauricio Cuenca
Hello,

I've been using the PEAR::DB_Pager class for a while, but looking at the
PEAR documentation I saw that there is another database paging class.
PEAR::Pager (http://pear.php.net/package/Pager/). It seems to be good, but I
couldn't find any documentation about it.

Has anyone had any experiencie with this package that can share ?

TIA,


Mauricio Cuenca

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



[PHP] installation help

2003-09-15 Thread Jeremiah Breindel
I was recently involved in installing PHP 4.3.2 on a NT 4 server with IIS 4.
We followed all of the installation instructions, but whenever we tried to
run a test script through a browser to see if PHP was installed correctly,
all the page did was load.  And load and load and load.  It never displayed
the text it was supposed to, and it never errored out.  Anybody have any
ideas?

I also had phpinfo run as a script through the server, with the same
results.

Jeremiah Breindel
[EMAIL PROTECTED]

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



[PHP] RE: [SMARTY] Re: dreamweaver extension

2003-09-15 Thread carlos castillo

I would like to know too, where i can get the dreamweaver extension for
smarty, thanks!

Carlos A. Castillo.
Ingeniero de desarrollo
[EMAIL PROTECTED]

 
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia 

- Soluciones web para Internet e Intranet
- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico




-Mensaje original-
De: Mattia Cazzola [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 15 de septiembre de 2003 11:40
Para: [EMAIL PROTECTED]
Asunto: [SMARTY] Re: dreamweaver extension


It's not very clear what you mean with "dreamweaver extension for 
smarty". Smarty in not a piece of dreamweaver. Smarty is a standalone 
project, not made bi Macromedia.
Usully template files used by smarty use .tpl or .html extension. But 
that is not something special related to dreaweaver.

Pete M wrote:
> Anyone know where the dreamweaver extension for smarty is ? - its not 
> on
> Macromedia's site and the one at tiki.org crashes ;-(
> 
> tia
> 
> pete

-- 
Smarty General Mailing List (http://smarty.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] Oracle8i PEAR Connection problem

2003-09-15 Thread ORLANDO POZO
 Hello, mailing-list people, I need help about connect 
the RDBMS Oracle8i through PEAR library, look this code

Test DB Class - PEAR


NAMEPHONEADDRESS

 //connect
 require_once('DB.php');
 $db 
=DB::connect("oci8://system:[EMAIL PROTECTED]/orcl");
 // message
 if (DB::iserror($db)) {
   die($db->getMessage());
 }
 //issue the query
 $sql ="SELECT *
FROM S_CUSTOMER";
 $q =$db->query($sql);
 // message
 if (DB::iserror($q)) {
   die($q->getMessage());
 }
 //generate table
 while ($q->fetchInto($row)) {
 ?>
 
   
   


 }
 ?>
 
 

 When I execute this code, I receive this output:

 DB Error: extension not found
 NAME PHONE ADDRESS
 I think that is a problem  with the  DSN in the 
connection (oci8://system:[EMAIL PROTECTED]/orcl)

 I put oci8 for the db type, user: system, pass: manager, 
and db: orcl 

I could connect oracle8i with PHP, but using ODBC methods, 
I want now connect oracle8i through the PEAR library.

 If someone know,  please give me a hand, thanks.

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


[PHP] Win2K and trans_sid

2003-09-15 Thread Adam H. Pendleton
I am running Apache 2.0.47 with PHP 4.3.3 on a Windows 2000 server, and 
I am having some trouble getting cookie-less sessions to work.  I've 
search around trying to figure out how to get this to work, but most of 
what i have found is people going to other way.  To be clear, I am 
trying to use PHP sessions *without* cookies (none at all).  To do this 
I have set use_cookies to 0 and use_trans_sid to 1, but all that does is 
break sessions altogether.  Is there a way to get this to work?  What am 
I doing wrong?  Is what I am trying to do even possible with the PHP 
session handler?

Any help or pointers would be greatly appreciated.

ahp

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


Re: [PHP] FAQ in PHP

2003-09-15 Thread Raditha Dissanayake
Is this part of the 'mailing lists :: guess the missing paragraph' 
competition?

Suresh Babu.A [Support] wrote:

Hi Team,

How to track a posting in a faq using mysql.

Thanks in advance.

Suresh A.

 

--
Raditha Dissanayake
--
http://www.radinks.com/sftp/?sg
Lean and mean secure FTP applet in pure java.
Complete with Graphical User Inteface Just 150 kb in size. 

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


[PHP] Printing reports

2003-09-15 Thread Hardik Doshi
Hi,

>From the different PHP mailing lists archives i found
out that printing reports with the PDF is good
solution. Let me know if you guys know any better
solution for printing the reports.

Currently i am testing report module with the FPDF
library. My main goal is to print addresses
information of all the users. Now the critical part is
how can i set the page break if some user's record is
not completed on the particular page(Meaning, some of
the addresses information for particular user on the
first page and remaining on the second page). I would
like to set page break in the PDF when such kind of
conditions occur. Does any one know about it?

Thanks

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



[PHP] FAQ in PHP

2003-09-15 Thread Suresh Babu.A [Support]
Hi Team,

How to track a posting in a faq using mysql.

Thanks in advance.

Suresh A.

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



Re: [PHP] Header and dfile download bug???

2003-09-15 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]):
> header("Content-Disposition: attachment; filename=$file");
> header("Content-Length: " . filesize($path));
> header("Content-Type: " . filetype($path));

I didn't see this the first time, you should be calling:
  mime_content_type()

And ensure that there is mime type defined in magic.mime for pdf.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] File Types

2003-09-15 Thread Ed Curtis

> Didn't google hard enough :)
>
> .pm5  application/x-pagemaker
> I'd guess that can be extended to pm7 and 65 - I've seen x-pagemaker5 as
> well.
>
> pmd is also pagemaker according to filext.com, as well as some software I've
> never heard of.
>
> QXP is a good one, and you may need to ask the manufacturer of the software
> what mime type is used.
>

 I think too that application/pagemaker should work for .p65 and .pm7
as well as .pmd (Page Maker Document). I think .qpx is a Quark Express
document but I can't find the mime for that anywhere.

Thanks for the repiles,

Ed

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



Re: [PHP] File Types

2003-09-15 Thread Duncan Hill
On Monday 15 Sep 2003 14:23, Ed Curtis wrote:
> On Mon, 15 Sep 2003, Raditha Dissanayake wrote:
> > You don't need to look any further than mime.types files included in
> > your apache distro.
>
> Did that as well as googled for the list of extensions. Still can't seem
> to find the mime type for .pm7, .p65, .qxp and .pmd.

Didn't google hard enough :)

.pm5application/x-pagemaker
I'd guess that can be extended to pm7 and 65 - I've seen x-pagemaker5 as 
well.

pmd is also pagemaker according to filext.com, as well as some software I've 
never heard of.

QXP is a good one, and you may need to ask the manufacturer of the software 
what mime type is used.

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



php-general Digest 15 Sep 2003 13:41:11 -0000 Issue 2298

2003-09-15 Thread php-general-digest-help

php-general Digest 15 Sep 2003 13:41:11 - Issue 2298

Topics (messages 162591 through 162631):

htmlentities -- can it skip tags
162591 by: Justin French
162592 by: John W. Holmes
162602 by: Justin French
162603 by: Justin French

Re: How are variables called in current php?
162593 by: Jason Sheets
162597 by: Raditha Dissanayake

User Access
162594 by: Ryan Stagg
162596 by: Raditha Dissanayake
162598 by: Ryan Stagg
162601 by: Raditha Dissanayake

Branching to a page
162595 by: Todd Cary
162611 by: chris.neale.somerfield.co.uk

Re: more details about previous email
162599 by: Raditha Dissanayake

Re: XML Reading, Writing
162600 by: Raditha Dissanayake

Re: (Conclusion) Re: [PHP] Program works only when there are records :-(
162604 by: Eugene Lee

Re: HTTP_REFERER
162605 by: Eugene Lee

Security of php_auth_pw ?
162606 by: Neale Yates
162620 by: Javier Tacon

browser detector (php side)
162607 by: Louie Miranda

Re: space sensitive?
162608 by: Jason Wong

navigation question
162609 by: Andre
162610 by: Petre Agenbag
162631 by: Andre

Re: php sockets was Re: [PHP] socket_write eats data - solved
162612 by: Daniel Souza

Yikes! Strange Occurrence of ! in mail
162613 by: Nicole

Re: passthru loses php posted variables
162614 by: Nicole

Sessions doubt
162615 by: Ryan A
162621 by: Jay Blanchard
162622 by: Javier Tacon

Re: Header and dfile download bug???
162616 by: Tristan.Pretty.risk.sungard.com
162617 by: Marek Kilimajer

Need to refresh a dozen times for php pages to load
162618 by: Karan R.

Re: Using PHP to generate Acrobat PDF...
162619 by: Jay Blanchard

File Types
162623 by: Ed Curtis
162624 by: Raditha Dissanayake
162626 by: Javier Tacon
162627 by: Ed Curtis
162629 by: Ed Curtis
162630 by: Raditha Dissanayake

Re: php generate thumbnails
162625 by: David Robley

Re: Verifying E-mail Addresses
162628 by: David Robley

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
Hi all,

I need to convert some text from a database for presentation on 
screen... as per usual, characters like quotes and ampersands (&) are 
giving me grief.  the obvious answer is to apply htmlspecialchars(), 
BUT this also converts all < and > into < and > signs, which 
destroys the html mark-up within the text.

Is there a non-tag equivalent of htmlspecialchars(), or do I need to 
build one?

TIA
Justin
--- End Message ---
--- Begin Message ---
Justin French wrote:

Hi all,

I need to convert some text from a database for presentation on 
screen... as per usual, characters like quotes and ampersands (&) are 
giving me grief.  the obvious answer is to apply htmlspecialchars(), BUT 
this also converts all < and > into < and > signs, which destroys 
the html mark-up within the text.

Is there a non-tag equivalent of htmlspecialchars(), or do I need to 
build one?
You'll have to build one.

If you know what characters are causing trouble, you could just use 
str_replace on them. Or you could use htmlspecialchars() and then run 
str_replace to convert < and > back into brackets.

You could also use get_html_translation_table() to get the conversions, 
remove the < and > conversion elements of the array and then use strtr() 
to do the conversion.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
On Monday, September 15, 2003, at 12:58  PM, John W. Holmes wrote:

Justin French wrote:

Hi all,
I need to convert some text from a database for presentation on 
screen... as per usual, characters like quotes and ampersands (&) are 
giving me grief.  the obvious answer is to apply htmlspecialchars(), 
BUT this also converts all < and > into < and > signs, which 
destroys the html mark-up within the text.
Is there a non-tag equivalent of htmlspecialchars(), or do I need to 
build one?
You'll have to build one.

If you know what characters are causing trouble, you could just use 
str_replace on them. Or you could use htmlspecialchars() and then run 
str_replace to convert < and > back into brackets.
Which is what I just did as a 'patch' :)


You could also use get_html_translation_table() to get the 
conversions, remove the < and > conversion elements of the array and 
then use strtr() to do the conversion.
I like that idea a LOT.

Thanks John!

Justin
--- End Message ---
--- Begin Message ---
On Monday, September 15, 2003, at 12:58  PM, John 

Re: [PHP] navigation question

2003-09-15 Thread Andre
Thanks for your reaction,

You are right about your conclusion how I think the code should work. I am
indeed trying to run the script off one server (my_domain1) and then
attempting to "feed" the function a directory structure off another server
(my_domain2).

I suppose the function opendir() only work for a directory at the same
server. When someone can tell me what I can do best. Because I just started
with PHP and I read this code in an example, I realy need some help if you
tell me to use ftp.

Andre



"Petre Agenbag" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> The function is correct, BUT, it looks like you are trying to run this
> script off one server and then attempting to "feed" the function a
> directory structure off another server.
>
> Your code will work "as-is" if you run the script off my_domain2, but it
> won't work if you run it off my_domain asking for a directory structure
> located on my_domain2.
>
> I am not sure that opendir() can work like this, and you would probably
> need to look at some remote file functions like the ftp functions...
>
>
> On Mon, 2003-09-15 at 08:38, Andre wrote:
> > Hello,
> >
> > For my website I use some PHP code for navigation. Therefore I use a
> > directory structure which contains some navigation files the visitor can
> > open. The directory structure looks like this:
> >
> > my_domain
> >  |
> >  - /navigation
> >  |  - file_1.html
> >  |  - file_2.html
> >  |  - file_3.html
> >  |
> >  -/images
> >  :
> >  :
> >
> > The name of the files the visitor can open (file_1file_3) I detect
from
> > reading the files in the directory "navigation". The function I use is
this:
> >
> > $handle=opendir("./navigation/");
> > $counter=0;
> >
> > while ($file = readdir($handle)) {
> >
> >  $the_type = strrchr($file, ".");
> >  $is_html = eregi("htm",$the_type);
> >  if ($file != "." and $file != ".." and $is_html) {
> >$newsflash[$counter] = $file;
> >$counter++;
> >
> >  }
> > }
> > closedir($handle);
> > rsort($newsflash);
> > reset($newsflash);
> >
> > With some other code I can echo the different files, this code works on
the
> > same server. Now I want to read the navigation files from a different
server
> > (my_domain2), then I get an error and the name of the files are not
shown.
> > When I try it with Apache on my local computer an error is shown on the
> > first line
> >  $handle=opendir("http://domain2/navigation/";);
> >
> > Is there an other way of getting the filenames from a different server?
The
> > directory structure at my_domain is equal to my_domain2. Apparently the
> > function opendir is not correct, can someone help me?
> >
> > Thanks in advance,
> >
> > Andr

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



Re: [PHP] File Types

2003-09-15 Thread Raditha Dissanayake
Having done some coding for the print industry i can tell you that pm7 
may be adobe page maker 7 and p65 could be pagemaker 6.5 no idea about 
qxp and .pmd though.



Ed Curtis wrote:

On Mon, 15 Sep 2003, Raditha Dissanayake wrote:

 

You don't need to look any further than mime.types files included in
your apache distro.
   

Did that as well as googled for the list of extensions. Still can't seem
to find the mime type for .pm7, .p65, .qxp and .pmd.
 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] File Types

2003-09-15 Thread Ed Curtis

On Mon, 15 Sep 2003, Javier Tacon wrote:

>
> You could use the function exif_imagetype() to see what type of file
> has been uploaded.
>

 The filetypes are not all images types.

Ed

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



[PHP] Re: Verifying E-mail Addresses

2003-09-15 Thread David Robley
In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> I'm having a problem with e-mail addresses entered by users that are
> invalid (i.e. $email == "some person at somewhere.com").  Is there a
> function I could call like:
> 
>  
>   if (email_is_valid($email))
>{ mail_out_newsletter($email); }
>   else
>{ yelp_and_whine(); }
> 
> ?>
> 
> Thanks in advance,

Haven't seen this question for a few days now :-) The mailing list 
archives are a valuable resource at 

http://marc.theaimsgroup.com/?l=php-general

In particular, for your question, try (allowing for line wrap)

http://marc.theaimsgroup.com/?l=php-
general&w=2&r=1&s=email+address+validation&q=b

Cheers
-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



Re: [PHP] File Types

2003-09-15 Thread Ed Curtis

On Mon, 15 Sep 2003, Raditha Dissanayake wrote:

> You don't need to look any further than mime.types files included in
> your apache distro.

Did that as well as googled for the list of extensions. Still can't seem
to find the mime type for .pm7, .p65, .qxp and .pmd.

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



RE: [PHP] File Types

2003-09-15 Thread Javier Tacon

You could use the function exif_imagetype() to see what type of file has been uploaded.

http://es.php.net/manual/en/function.exif-imagetype.php


-Mensaje original-
De: Ed Curtis [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 15 de septiembre de 2003 15:02
Para: [EMAIL PROTECTED]
Asunto: [PHP] File Types
Importancia: Baja



 I currently limit file types in an upload script by using an allowed
types array

$allowed_types = array("image/jpeg", "image/gif");

 I also need to allow files of with the following extentions.

 .tif, .pm7, .p65, .pdf, .qxp, .pmd, .eps

Is there a site out there anywhere that gives the mime types of theses
files?

Thanks,

Ed

-- 
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] Re: php generate thumbnails

2003-09-15 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Sir, I read in a thread that you mailed some code to generate thumbnails
> Might I also have a copy ?
> It's been driving me crazy, all week.
> Thanks 
> Cheers
> Russell

Russell - you might try this google link if you don't get a more useful 
response:

http://www.google.com/search?q=generate+thumbnails+php&sourceid=opera&num=
25&ie=utf-8&oe=utf-8

Cheers
-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



Re: [PHP] File Types

2003-09-15 Thread Raditha Dissanayake
You don't need to look any further than mime.types files included in 
your apache distro.

Ed Curtis wrote:

I currently limit file types in an upload script by using an allowed
types array
$allowed_types = array("image/jpeg", "image/gif");

I also need to allow files of with the following extentions.

.tif, .pm7, .p65, .pdf, .qxp, .pmd, .eps

Is there a site out there anywhere that gives the mime types of theses
files?
Thanks,

Ed

 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] File Types

2003-09-15 Thread Ed Curtis

 I currently limit file types in an upload script by using an allowed
types array

$allowed_types = array("image/jpeg", "image/gif");

 I also need to allow files of with the following extentions.

 .tif, .pm7, .p65, .pdf, .qxp, .pmd, .eps

Is there a site out there anywhere that gives the mime types of theses
files?

Thanks,

Ed

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



RE: [PHP] Sessions doubt

2003-09-15 Thread Javier Tacon

In PHP >= 4.3.3 versions, start a session when you have a session started already, 
causes a notice error and the second call is ignored.

In older versions, the second call is ignored without errors (assumes the first 
session started)

Put this to your top.php:

@session_start();

And then, remove all the session_start from the others php files, when you are done, 
remove the eat '@' in the session_start() (isn't smart)


-Mensaje original-
De: Ryan A [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 15 de septiembre de 2003 11:11
Para: [EMAIL PROTECTED]
Asunto: [PHP] Sessions doubt
Importancia: Baja


Hi,
I have a small (simple?) doubt, if you know the answer kindly reply.

I have a top.php and bottom.php template files so that the whole site has
pretty much the same look and feel, then I have around 150 scripts that call
this files such as index.php or something.php like so:



I am relying heavily on sessions, right now its become an habit for me to
have session_start(); on every page as I start to write it, but have started
seeing some funny results as I have a session_start(); in both the calling
file and the top.php

do I really need to have it in both or just one?
or does it really matter at all?
 if just one it should be the file that is calling top.php right?

Thanks,
-Ryan A



We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.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] Sessions doubt

2003-09-15 Thread Jay Blanchard
[snip]
do I really need to have it in both or just one?
or does it really matter at all?
 if just one it should be the file that is calling top.php right?
[/snip]

Just one, the calling page/script

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



RE: [PHP] Security of php_auth_pw ?

2003-09-15 Thread Javier Tacon

If you want this type of level security, you should work under SSL connection, that 
works with crypted data between browser and server.

Javier Tacón


-Mensaje original-
De: Neale Yates [mailto:[EMAIL PROTECTED]
Enviado el: lunes, 15 de septiembre de 2003 7:47
Para: [EMAIL PROTECTED]
Asunto: [PHP] Security of php_auth_pw ?
Importancia: Baja


Is anyone able to advise me on the security of the password when using
PHP authentication.  My specific concern is whether the password can be
intercepted between the browser and server when submitted.

thanks

Neale

-- 
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] Using PHP to generate Acrobat PDF...

2003-09-15 Thread Jay Blanchard
[snip]
Ooohhh!  Neat website!  Here's the other info send to me by someone from
email.  Thanks for all of the feedback.  Now i have something to get
start

--snip--
http://ca3.php.net/manual/en/ref.pdf.php
[/snip]

Don't forget the FPDF class at http://www.fpdf.org

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



[PHP] Need to refresh a dozen times for php pages to load

2003-09-15 Thread Karan R.
hello people,
i have apache2, php 4.3.2, win XP, mysql4, fairly fast
comp.

i'm hosting phpBB 2.0.6(latest) forums on my comp for
the college LAN
the speeds r very good so that's not a problem

problem is that people have to refresh their pages
somehitng like a dozen times before the page shows
up...other times, just a blank page shows up.
php is properly installed coz the forums work
perfectly when they finaly load.

barely 5-6 ppl post on it right now so flooding cant
be a problem...

i've tried asking this in the phpBB and apache forums
but they can't think of a fix. all that's left is
PHP,.
i hope u guys can help
i've spent 4 consecutive nights reading manuals and
mining the net for a solution but all i found was 1
other person wiht a similar problem on google's usenet
thingie...who also got no answer

im not sure when this started coz no one told me about
it before...
HELP! my exams start in 4 days and i can't get any
sleep coz of this ...

did i miss out any info?


thnx
Karan Rawat

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Header and dfile download bug???

2003-09-15 Thread Marek Kilimajer
There are issues with acrobat and IE combination. Sometimes it just does 
not work and you have to close all IE windows so it starts working 
again. You should provide a download link for these cases.

[EMAIL PROTECTED] wrote:
Well, I'm on IE V6.0.2800
My boss, has the same version.
Yet.. when she hits the link, she get's the error, (unable to open file) 
However, I didn't say before, that it's Acrobat reader, that's giving the 
error.
The file is downloaded etc...
yet on my machine, I can see the file, and on hers, she cannot...?
Stumpt...





Curt Zirzow <[EMAIL PROTECTED]>
13/09/2003 18:54
 
To: [EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] Header and dfile download bug???

* Thus wrote [EMAIL PROTECTED] 
([EMAIL PROTECTED]):

Hi all,
I have a download for that collects data from a user (name, e-mail etc) 
The $bu variable and others are from the previous form too.
[...]

So, it works great on my desktop here at work, but I just got a few 
mails 

from random users, who complained that they saw an error screen after 
trying to download pdf's.


Well did they supply any information like what the error was or
what browser they were using?


Dunno if this is a PDF problem, or if my script is bad?

So, here is my code... (that site at the very top of my page.)
The headers after the else statement are simply to avoid page caching, 
so 

we can ignore them in this example.
So, why does this work for me and many others, but not all?


I'm unable to answer that. Some knowlege of what exactly the error
is might help. The headers shouldn't cause error.

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above. 


am I the intended person? the email wasn't addressed to me, so I
feel like I'm breaking the policy...
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Header and dfile download bug???

2003-09-15 Thread Tristan . Pretty
Well, I'm on IE V6.0.2800
My boss, has the same version.
Yet.. when she hits the link, she get's the error, (unable to open file) 
However, I didn't say before, that it's Acrobat reader, that's giving the 
error.
The file is downloaded etc...
yet on my machine, I can see the file, and on hers, she cannot...?
Stumpt...






Curt Zirzow <[EMAIL PROTECTED]>
13/09/2003 18:54
 
To: [EMAIL PROTECTED]
cc: 
Subject:Re: [PHP] Header and dfile download bug???


* Thus wrote [EMAIL PROTECTED] 
([EMAIL PROTECTED]):
> Hi all,
> I have a download for that collects data from a user (name, e-mail etc) 
> The $bu variable and others are from the previous form too.
> [...]
> 
> So, it works great on my desktop here at work, but I just got a few 
mails 
> from random users, who complained that they saw an error screen after 
> trying to download pdf's.

Well did they supply any information like what the error was or
what browser they were using?


> Dunno if this is a PDF problem, or if my script is bad?
> 
> So, here is my code... (that site at the very top of my page.)
> The headers after the else statement are simply to avoid page caching, 
so 
> we can ignore them in this example.
> So, why does this work for me and many others, but not all?

I'm unable to answer that. Some knowlege of what exactly the error
is might help. The headers shouldn't cause error.

> 
> *
> The information contained in this e-mail message is intended only for 
> the personal and confidential use of the recipient(s) named above. 

am I the intended person? the email wasn't addressed to me, so I
feel like I'm breaking the policy...

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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




*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP] Sessions doubt

2003-09-15 Thread Ryan A
Hi,
I have a small (simple?) doubt, if you know the answer kindly reply.

I have a top.php and bottom.php template files so that the whole site has
pretty much the same look and feel, then I have around 150 scripts that call
this files such as index.php or something.php like so:



I am relying heavily on sessions, right now its become an habit for me to
have session_start(); on every page as I start to write it, but have started
seeing some funny results as I have a session_start(); in both the calling
file and the top.php

do I really need to have it in both or just one?
or does it really matter at all?
 if just one it should be the file that is calling top.php right?

Thanks,
-Ryan A



We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com

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



[PHP] Re: passthru loses php posted variables

2003-09-15 Thread Nicole
Hi,

Did you try using the system() command instead and skip using exec and
passthru?

--
Nicole


"Exasperated" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Anyone come across something like this before?
>
> I have made a little test script as follows:
>  header ("Content-Type: application/pdf");
> $command_line = "/usr/bin/pdflabelseries " .
> escapeshellcmd($_POST['labelstart']) . " " .
> escapeshellcmd($_POST['labelend']);
> exec ("echo \"$command_line\" >/opt/specs/labels.txt");
> //passthru($command_line);
> ?>
>
> The form takes input from a posted form with two variables, labelstart and
> labelend.  In the above test, if I put in 'start' and 'end' as the posted
> variable data, the output from /opt/specs/labels.txt (writable by the http
> server) is:
> /usr/bin/pdflabelseries start end
> All is well and good.  Now is where it heads South.  I uncomment the
> passthru command above.  The output from the script in
/opt/specs/labels.txt
> from the same posted form with the same data entered is now:
> /usr/bin/pdflabelseries
> pdflabelseries is a C program that I have confirmed works perfectly on the
> command line (i.e. generates the requisite pdf file to stdout).
> Even if the C program fails (which it does not appear to do from the
output
> in the httpd logs as it outputs its command line to stderr), surely php
> should not lose its own internal variables, especially, for a command that
> is executed BEFORE the passthru command.
>
> I am truly baffled.
>
> Any help appreciated.
> Regards
>
> Mark
>
> I am running vanilla Mandrake 9.1 with the following PHP rpms:
> libphp_common430-430-11mdk
> php-pear-4.3.0-3mdk
> apache2-mod_php-2.0.44_4.3.1-2mdk
> php-xml-4.3.0-2mdk
> php-dba_bundle-4.3.0-4mdk
> php-pgsql-4.3.0-4mdk
> php-xmlrpc-4.3.0-2mdk
> php-manual-en-4.3.0-2mdk
> php430-devel-430-11mdk
> php-gd-4.3.0-2mdk

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



[PHP] Yikes! Strange Occurrence of ! in mail

2003-09-15 Thread Nicole
Has anyone experienced exclamation points ! in their emails from no where?
This is a really strange thing I have been noticing lately in emails I send
to myself via PHP.  When I send an email from 2 different machines using 2
different smtp servers, I still get the exclamations in the email.

Any ideas what on earth is causing that?

Example:

the!ir is an ex!clamation in my e!mail that I did not pu!t there.

Why??

Thanks!

--
Nicole

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



[PHP] Re: php sockets was Re: [PHP] socket_write eats data - solved

2003-09-15 Thread Daniel Souza
Probably your problems about "i can send about seven messages per second"
may be relationed to
OS's tcp connection stream buffering... try to flush every fd after write to
it. I wrote a multi-threaded (pcntl_fork())
application in phpcli using many sockets and they worked well... array
iterations are fast and easy too, as they have
only one level... so I believe that this is really relationed to socket
flushing stuffs...you can also use select() to determine
when a fd is ready for write and implement a "write spool"... only a ideia,
but probably will spent more time with the same
results... well.. flush then may resolve it.

Daniel Souza

"Raditha Dissanayake" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Hi thomas,
>
> Thomas Weber wrote:
>
> >IMAP? We were talking about IRC,
> >
> Used imap as an example.
>
> > the Internet Relay Chat.
> >In detail, my problems doesn't even refer to IRC directly, as i am
> >developing a server for a html-based webchat, but the server-structure
and
> >the messages are nearly the same.
> >
> Yes my questions was how are you going to maintain the connection
> between two different connectsion. As far as i know sockets cannot be
> serialized in php4.
>
> >Once you realize the basics of socket-multicasting, it is no problem to
> >maintain hundreds of simultanous TCP-connects via arrays of sockets, also
> >called descriptor-sets. PHP seems to directly use the underlying C-
> >libraries, so everything you can imagine is possible.
> >
> Thanx i am aware of it
>
> >
> >
>
> --
> http://www.radinks.com/upload
> Drag and Drop File Uploader.

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



RE: [PHP] Branching to a page

2003-09-15 Thread chris . neale
I don't understand what this achieves? Tell me more...

C

-Original Message-
From: Todd Cary [mailto:[EMAIL PROTECTED]
Sent: 15 September 2003 03:30
To: [EMAIL PROTECTED]
Subject: [PHP] Branching to a page


Back in the earlier days of PHP, pages were not cached so I developed a 
method of "branching to a page" by opening a new socket.  Since it has 
worked over the years in quite a variety of applications, I have not 
changed...but maybe I should.  Are there any glaring deficiencies with 
doing this:

  // Verify the Session ID
  if ($session_id) {
  ...
  } else {
bounce_post($server, $path, $url, "abort.php", "");
exit;
  }

Where "bounce" is defined as

  function bounce_post($server, $path, $url, $page, $info) {
$http = new http;

$fp = $http->http_fpost($server, $path . $page, $info);
if($fp) {
  print '';
  fpassthru($fp);
};
  }

Todd

-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
If you are not the intended recipient of this e-mail, please preserve the
confidentiality of it and advise the sender immediately of any error in
transmission. Any disclosure, copying, distribution or action taken, or
omitted to be taken, by an unauthorised recipient in reliance upon the
contents of this e-mail is prohibited. Somerfield cannot accept liability
for any damage which you may sustain as a result of software viruses so
please carry out your own virus checks before opening an attachment. In
replying to this e-mail you are granting the right for that reply to be
forwarded to any other individual within the business and also to be read by
others. Any views expressed by an individual within this message do not
necessarily reflect the views of Somerfield.  Somerfield reserves the right
to intercept, monitor and record communications for lawful business
purposes.

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



Re: [PHP] navigation question

2003-09-15 Thread Petre Agenbag
The function is correct, BUT, it looks like you are trying to run this
script off one server and then attempting to "feed" the function a
directory structure off another server.

Your code will work "as-is" if you run the script off my_domain2, but it
won't work if you run it off my_domain asking for a directory structure
located on my_domain2.

I am not sure that opendir() can work like this, and you would probably
need to look at some remote file functions like the ftp functions...

 
On Mon, 2003-09-15 at 08:38, Andre wrote:
> Hello,
> 
> For my website I use some PHP code for navigation. Therefore I use a
> directory structure which contains some navigation files the visitor can
> open. The directory structure looks like this:
> 
> my_domain
>  |
>  - /navigation
>  |  - file_1.html
>  |  - file_2.html
>  |  - file_3.html
>  |
>  -/images
>  :
>  :
> 
> The name of the files the visitor can open (file_1file_3) I detect from
> reading the files in the directory "navigation". The function I use is this:
> 
> $handle=opendir("./navigation/");
> $counter=0;
> 
> while ($file = readdir($handle)) {
> 
>  $the_type = strrchr($file, ".");
>  $is_html = eregi("htm",$the_type);
>  if ($file != "." and $file != ".." and $is_html) {
>$newsflash[$counter] = $file;
>$counter++;
> 
>  }
> }
> closedir($handle);
> rsort($newsflash);
> reset($newsflash);
> 
> With some other code I can echo the different files, this code works on the
> same server. Now I want to read the navigation files from a different server
> (my_domain2), then I get an error and the name of the files are not shown.
> When I try it with Apache on my local computer an error is shown on the
> first line
>  $handle=opendir("http://domain2/navigation/";);
> 
> Is there an other way of getting the filenames from a different server? The
> directory structure at my_domain is equal to my_domain2. Apparently the
> function opendir is not correct, can someone help me?
> 
> Thanks in advance,
> 
> Andr

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



  1   2   >