[PHP] Seperating presentation from logic

2002-06-25 Thread Jean-Christian Imbeault

I'm just about to start a large PHP project in which I get to work with 
professional designers/layout people. I want to separate all the 
programming logic from the presentation but I am not sure how to do this.

Can anyone point me to resources (web tutorials/articles or books) that 
would help me figure out how best to separate my programming work from 
designer's work and how best to integrate them?

Sorry for asking such a generic question but I don't know how to best 
phrase it. I did look on the web but the best I could find were some 
mentions of templates. While templates seems ok they don't address all 
the issues of separation presentation from code (if I understand them 
correctly).

Thanks!

Jc


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




[PHP] looping through numbers

2002-06-25 Thread rdkurth

Hello ,

How do I do a loop that will increase a number tell it reaches another
number

I what it to print out every number starting at 200 and ending at 250
so it would print out 200 201 202 203 204



-- 
Best regards,
 rdkurth  mailto:[EMAIL PROTECTED]


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




RE: [PHP] looping through numbers

2002-06-25 Thread Niklas Lampén

for ($i = 200; $i = 200; $i++)
print $i ;


Niklas


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 25. kesäkuuta 2002 10:05
To: [EMAIL PROTECTED]
Subject: [PHP] looping through numbers


Hello ,

How do I do a loop that will increase a number tell it reaches another
number

I what it to print out every number starting at 200 and ending at 250 so
it would print out 200 201 202 203 204



-- 
Best regards,
 rdkurth  mailto:[EMAIL PROTECTED]


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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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




RE: [PHP] looping through numbers

2002-06-25 Thread Niklas Lampén

it should ofcourse be

for ($i = 200; $i = 250; $i++)
print $i ;


:)



-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]] 
Sent: 25. kesäkuuta 2002 10:05
To: Php-General
Subject: RE: [PHP] looping through numbers


for ($i = 200; $i = 200; $i++)
print $i ;


Niklas


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 25. kesäkuuta 2002 10:05
To: [EMAIL PROTECTED]
Subject: [PHP] looping through numbers


Hello ,

How do I do a loop that will increase a number tell it reaches another
number

I what it to print out every number starting at 200 and ending at 250 so
it would print out 200 201 202 203 204



-- 
Best regards,
 rdkurth  mailto:[EMAIL PROTECTED]


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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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




RE: [PHP] looping through numbers

2002-06-25 Thread Martin Towell

I think you mean

for ($i = 200; $i = 250; $i++)
print $i ;

(:

-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 5:05 PM
To: Php-General
Subject: RE: [PHP] looping through numbers


for ($i = 200; $i = 200; $i++)
print $i ;


Niklas


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 25. kesäkuuta 2002 10:05
To: [EMAIL PROTECTED]
Subject: [PHP] looping through numbers


Hello ,

How do I do a loop that will increase a number tell it reaches another
number

I what it to print out every number starting at 200 and ending at 250 so
it would print out 200 201 202 203 204


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




Re: [PHP] Seperating presentation from logic

2002-06-25 Thread René Moonen

You might want to start by looking (download, instal, try) at available 
content managers like
PHPWebSite   http://phpwebsite.appstate.edu/ 
PHPNukehttp://phpnuke.org/

They do exactly that; seperate content from programming logic. As an 
admin you can assign certain users as beining authors. Authors can 
upload contents to the web-server without every having to know anything 
about PHP, webservers or databases. As an admin you can change the look 
and feel of the webpage without having to know much about PHP. It's 
designing a new 'skin' rather than desiging a complete new PHP project.
It might very well be that these content managers do not fit your needs, 
but if you start from scratch they are certainly worth looking into 
before you take off on a large PHP project.

good luck

René

Jean-Christian Imbeault wrote:

 I'm just about to start a large PHP project in which I get to work 
 with professional designers/layout people. I want to separate all the 
 programming logic from the presentation but I am not sure how to do this.

 Can anyone point me to resources (web tutorials/articles or books) 
 that would help me figure out how best to separate my programming work 
 from designer's work and how best to integrate them?

 Sorry for asking such a generic question but I don't know how to best 
 phrase it. I did look on the web but the best I could find were some 
 mentions of templates. While templates seems ok they don't address all 
 the issues of separation presentation from code (if I understand them 
 correctly).

 Thanks!

 Jc




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




Fwd: Re: Re: [PHP] Re: PHP 4.2

2002-06-25 Thread Dreamriver.com


Rasmus,
Yes, thank you, that's the function I wanted and didn't see ...


Kind Regards,
richard.


 You mean like php.net/version_compare ?

 On Mon, 24 Jun 2002, Dreamriver.com wrote:
snip



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




[PHP] function echo ' '

2002-06-25 Thread Martin Johansson

Is there a way to express php variables inside an echo ' '.

I want something like this to work:

echo 'a href=$address';

I know I can write it like this:
echo 'a href=';
echo $address;
echo '';

But Its to hard to read the code like this.
/Martin



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




RE: [PHP] function echo ' '

2002-06-25 Thread Matthew Nock

my understanding is that you could write it like this:

? echo 'a href='.$address.''; ?


-Original Message-
From: Martin Johansson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 25 June 2002 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] function echo ' ' 


Is there a way to express php variables inside an echo ' '.

I want something like this to work:

echo 'a href=$address';

I know I can write it like this:
echo 'a href=';
echo $address;
echo '';

But Its to hard to read the code like this.
/Martin



-- 
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] function echo ' '

2002-06-25 Thread René Moonen

Use the escape character to output double quotes

echo 'a href=\$address\';

René

Martin Johansson wrote:

Is there a way to express php variables inside an echo ' '.

I want something like this to work:

echo 'a href=$address';

I know I can write it like this:
echo 'a href=';
echo $address;
echo '';

But Its to hard to read the code like this.
/Martin


  




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




Re: [PHP] function echo ' '

2002-06-25 Thread PHPCoder

Yes, just use  instead of '.
Using ' causes the contents to be treated as literal strings, and the $ 
is therefore not treated as a $.
Just do:

echo a href=\$address\;



Martin Johansson wrote:

Is there a way to express php variables inside an echo ' '.

I want something like this to work:

echo 'a href=$address';

I know I can write it like this:
echo 'a href=';
echo $address;
echo '';

But Its to hard to read the code like this.
/Martin






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




Re: [PHP] function echo ' '

2002-06-25 Thread Craig

Can you use

a href=? echo $address; ? or is this bad coding?


René moonen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Use the escape character to output double quotes

 echo 'a href=\$address\';

 René

 Martin Johansson wrote:

 Is there a way to express php variables inside an echo ' '.
 
 I want something like this to work:
 
 echo 'a href=$address';
 
 I know I can write it like this:
 echo 'a href=';
 echo $address;
 echo '';
 
 But Its to hard to read the code like this.
 /Martin
 
 
 
 





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




RE: [PHP] function echo ' '

2002-06-25 Thread Niklas Lampén

Shorter version would be

a href=?=$address?

And this is not bad coding, it is actually faster than echoing
everything. We had this conversation maybe a week ago, so let's not
start it again. :)


Niklas



-Original Message-
From: Craig [mailto:[EMAIL PROTECTED]] 
Sent: 25. kesäkuuta 2002 10:43
To: [EMAIL PROTECTED]
Subject: Re: [PHP] function echo ' '


Can you use

a href=? echo $address; ? or is this bad coding?


René moonen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Use the escape character to output double quotes

 echo 'a href=\$address\';

 René

 Martin Johansson wrote:

 Is there a way to express php variables inside an echo ' '.
 
 I want something like this to work:
 
 echo 'a href=$address';
 
 I know I can write it like this:
 echo 'a href=';
 echo $address;
 echo '';
 
 But Its to hard to read the code like this.
 /Martin
 
 
 
 





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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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




Re: [PHP] Seperating presentation from logic

2002-06-25 Thread Jean-Christian Imbeault

Thanks for the links. Hard to figure out what those things are just from 
their web pages. They should work on making it easier to figure what the 
projects are.

I'll have a look but ...

Maybe my message was too vague but what I meant is that my designers 
will come up with the site layout, colours, graphics etc ... I want them 
to be able to do all their work without thinking about any programming.

If they want to make a page that lists in a table all the documents we 
have from 1999-2001, then they can can do this easily without worrying 
about me.

And just as importantly I can code the scripts that will generate the 
table without worrying that maybe in the future the layout will change.

So I how can I do this? i.e. if the designers want to change the 
background colour on one page how can they do this without coming to seem?

Jc


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




Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson

But the problem is that Im doin it inside a while loop. So I need to
echo it.
/mj

Niklas lampén [EMAIL PROTECTED] skrev i meddelandet
025801c21c1d$55d16210$ba93c5c3@Niklas">news:025801c21c1d$55d16210$ba93c5c3@Niklas...
Shorter version would be

a href=?=$address?

And this is not bad coding, it is actually faster than echoing
everything. We had this conversation maybe a week ago, so let's not
start it again. :)


Niklas




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




[PHP] Problem with regular expressions

2002-06-25 Thread Drew

When I run the following script it returns String Okay! when it should say
Invalid Characters Found. I've tried the script substituting $ for other
characters, such as j, and it works just fine. What do I need to do?



?php

$input = johnon@company.$com;

if (ereg([$], $input)) {
 die(Invalid Characters Found.);
} elseif (ereg([[:space:]], $input)) {
 die(Whitespace found.);
} else {
 echo String okay!;
}


?


Thanks,

Drew



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




Re: [PHP] Re: Re: PHP 4.2

2002-06-25 Thread John Lim

I use http://php.net/strnatcasecmp since version_compare is only available
since 4.1.0, which is rather self-defeating :-)

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 You mean like php.net/version_compare ?

 On Mon, 24 Jun 2002, Dreamriver.com wrote:

 
  Hello All,
  I also have the challenge of distributing php code to unknown php
versions. There is a wide discrepancy in the functionality of even various
PHP 4.x code. Since at the time of coding I don't know the version, I test
for it when I need to, and include code accordingly.
 
 
  For example, in the case of image uploads I find out what PHP version
the server is running. I declare a 'yardstick' value. If the server version
is less than the yardstick then I include one block of code. If the server
version is equal to or greater than the 'yardstick' value then I include
another, different block of code. It's messy, and extra code, but it
works...
 
 
  While there is a user contributed function for checking the difference
of two php versions:
 
  http://www.php.net/manual/en/function.phpversion.php
 
  interfear01 at hotmail dot com
  09-Jun-2002 03:00
  function check_php_version ($version)
 
 
  ... wouldn't it be really nice to have the PHP development team make up
a formal, built in function to handle this growing need to check versions?
 
 
  If such a function was made now, then we could rely on its availability
some years in the future...
 
 
  Kind Regards,
 
  Richard Creech
  [EMAIL PROTECTED]
  Phone 250.744.3350 Pacific Time, Canada
  Easily create your very own Yellow Pages - free download
  http://www.dreamriver.com
 
 
  Message-ID: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  From: Peter [EMAIL PROTECTED]
  Date: Mon, 24 Jun 2002 21:24:13 +0100
  Subject: Re: PHP 4.2
  
  If you want an all in one solution without having to have two versions,
  can't you read the status of register_globals from the config file and
base
  the rest of the script on this?
  eg
  if (register_globals == 'on') {
  $name = _POST['name'];
  $address = _GET['address'];
  }
  
  then you can access the variables as if register_globals = on even if
it
  isn't
  Simon Troup [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   I've written a small freeware script that gets installed on a variety
of
   different platforms running various PHP versions.
  
   I've read through the manual about the super global arrays and how
post
  and
   get vars are no longer registered by default, but am confused about
when
  it
   would be a good idea to upgrade the script.
  
   If I change everything in the script and use $_GET and $_POST etc.
then
   those people who are still using earlier versions won't be able to
  upgrade.
  
   Does anyone know what the uptake of the latest version is? What is
  everyone
   else doing about this? If I were developing for one client it
wouldn't be
  a
   problem as obviously you'd know what you were developing for.
  
   I'd just like some feedback on when would be a good time to upgrade
the
   scripts while causing the minimum disruption and maintaining maximum
happy
   users.
  
   Thanks
  
   Zim
 
 
 
  --
  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] Library Function

2002-06-25 Thread Uma Shankari T.



Hello,


 Is there any built in function in php to read character by character of
the value stored in the variable...??


Thanks  Regards,
Ums


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




Re: [PHP] Seperating presentation from logic

2002-06-25 Thread René Moonen

Well... I still think that these tools can help.

For example PHPWebSite (which I use for our Intranet) has a set of 
'themes'. A theme consists of a style sheet (.css), some image files 
(logo's, backgrounds etc.) and a small set of PHP scripts that define 
things like standard header, footers.

If you would like to change the look and feel, you 'just' have to change 
(or add) the theme plugin. Examples are also on the phpwebsite homepage.
You can even allow visitors to select a different theme when they visit 
the website.

Now it depends on how much your designers know about style sheets etc. 
Would you trust them changing a style sheet and some images? If not than 
your project could very well be that you have to write a 'theme editor'. 
A kind of user interface that designers can use to build the theme files.

But anyway 'content mangers'  (phpwebsite / phpnuke) do seperate the 
application from the contents, but also application from design. 
Allthough the later not as far as I suppose you would need for your project.

good luck

René


p.s. these tools require a database on the webserver as well, so if you 
download phpwebsite or phpnuke,  be prepared to also have a database 
installed on your webserver.


Jean-Christian Imbeault wrote:

 Thanks for the links. Hard to figure out what those things are just 
 from their web pages. They should work on making it easier to figure 
 what the projects are.

 I'll have a look but ...

 Maybe my message was too vague but what I meant is that my designers 
 will come up with the site layout, colours, graphics etc ... I want 
 them to be able to do all their work without thinking about any 
 programming.

 If they want to make a page that lists in a table all the documents we 
 have from 1999-2001, then they can can do this easily without worrying 
 about me.

 And just as importantly I can code the scripts that will generate the 
 table without worrying that maybe in the future the layout will change.

 So I how can I do this? i.e. if the designers want to change the 
 background colour on one page how can they do this without coming to 
 seem?

 Jc




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




Re: [PHP] Seperating presentation from logic

2002-06-25 Thread Justin French

I think the issues are VERY project specific.  Luckily for me I'm the
DESIGNER and PROGRAMMER on many of my projects, but often I'm just one of
the two.

When I'm just designing, I obviously need to develop page templates, but
more and more of my time is spent developing style guides (often also called
VM's (visual manifestos), among others).

Basically, if a Style Guide is done right, programmers can make a whole heap
of design-related decisions as they go.  This can be in the form of colour
guides, type styles, heading treatment, image treatment, spacing, layout
styles, form presentation, etc etc.

If the programmer reads and understands the rules, then a LOT of back and
forth can be saved.


Commonly a site may have:

--
| common header  |
--
||
| dynamic middle section |
||
||
--
| common footer  |
--


What you want to do is have the designer design the header and footer, and
provide style guides and samples of what might happen in the middle.


From there, it depends on how far you want to separate the code and content.

Simple things like:

- defining $col1 $col2 $col3 colours which can be changed for a different
pallet at any time
- defining font tags like $fontBig $fontHeading $fontCopyright which can be
changed site-wide at any time

Slightly more complex things like a webbox/fusebox architecture
(http://www.phpbuilder.com/columns/bill19990831.php3), or even just
separating the TEXT of the pages out into separate plain text files or into
a database will be a major help.

Also check out http://bombusbee.com  http://www.fusebox.org in relation to
fuseboxes.

Then talk about CSS -- the whole aim of CSS is to separate content from
design/mark-up.  There's a pretty good article on SitePoint
(http://www.WebmasterBase.com/article/379) which brushes the surface.


There's about another 5 or six articles on this page worth reading:
http://www.phpbuilder.com/columns/

And I'd recommend spending a LOT of time at http://SitePoint.com
(http://www.WebmasterBase.com).




I think you need to define the issues you mention, and them we can all
help with some solutions :)



on 25/06/02 3:00 PM, Jean-Christian Imbeault ([EMAIL PROTECTED])
wrote:

 I'm just about to start a large PHP project in which I get to work with
 professional designers/layout people. I want to separate all the
 programming logic from the presentation but I am not sure how to do this.
 
 Can anyone point me to resources (web tutorials/articles or books) that
 would help me figure out how best to separate my programming work from
 designer's work and how best to integrate them?
 
 Sorry for asking such a generic question but I don't know how to best
 phrase it. I did look on the web but the best I could find were some
 mentions of templates. While templates seems ok they don't address all
 the issues of separation presentation from code (if I understand them
 correctly).
 
 Thanks!
 
 Jc
 


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




Re: [PHP] Seperating presentation from logic

2002-06-25 Thread Jean-Christian Imbeault

Thanks! I'll visit and read all the links you gave.

Some of the issues are things like how to make it painless for both 
the designers and me if one day, out of the blue, a designers decides 
that the background colour should be changed, or the graphics changed. 
Or even worse the two column layout should be a three column layout.

But to start off with simple things like:

Designer:
- on this page a dynamic table will be generated according to the search 
criteria entered by the user
- lines will have alternating colours

I can code this easily, but what if the designer then decides that he 
wants each *third* line to alternate colour, or he wants to use three 
colours instead of two (a pattern 1,2,3,1,2,3 instead of 1,2,1,2).

How can I make it so that he can do these changes without coming to see 
me to change the code that outputs the data used in the table?

Simple things like that ;)

Jc
Justin French wrote:

 I think the issues are VERY project specific.  Luckily for me I'm the
 DESIGNER and PROGRAMMER on many of my projects, but often I'm just one of
 the two.
 
 When I'm just designing, I obviously need to develop page templates, but
 more and more of my time is spent developing style guides (often also called
 VM's (visual manifestos), among others).
 
 Basically, if a Style Guide is done right, programmers can make a whole heap
 of design-related decisions as they go.  This can be in the form of colour
 guides, type styles, heading treatment, image treatment, spacing, layout
 styles, form presentation, etc etc.
 
 If the programmer reads and understands the rules, then a LOT of back and
 forth can be saved.
 
 
 Commonly a site may have:
 
 --
 | common header  |
 --
 ||
 | dynamic middle section |
 ||
 ||
 --
 | common footer  |
 --
 
 
 What you want to do is have the designer design the header and footer, and
 provide style guides and samples of what might happen in the middle.
 
 
 From there, it depends on how far you want to separate the code and content.
 
 Simple things like:
 
 - defining $col1 $col2 $col3 colours which can be changed for a different
 pallet at any time
 - defining font tags like $fontBig $fontHeading $fontCopyright which can be
 changed site-wide at any time
 
 Slightly more complex things like a webbox/fusebox architecture
 (http://www.phpbuilder.com/columns/bill19990831.php3), or even just
 separating the TEXT of the pages out into separate plain text files or into
 a database will be a major help.
 
 Also check out http://bombusbee.com  http://www.fusebox.org in relation to
 fuseboxes.
 
 Then talk about CSS -- the whole aim of CSS is to separate content from
 design/mark-up.  There's a pretty good article on SitePoint
 (http://www.WebmasterBase.com/article/379) which brushes the surface.
 
 
 There's about another 5 or six articles on this page worth reading:
 http://www.phpbuilder.com/columns/
 
 And I'd recommend spending a LOT of time at http://SitePoint.com
 (http://www.WebmasterBase.com).
 
 
 
 
 I think you need to define the issues you mention, and them we can all
 help with some solutions :)
 
 
 
 on 25/06/02 3:00 PM, Jean-Christian Imbeault ([EMAIL PROTECTED])
 wrote:
 
 
I'm just about to start a large PHP project in which I get to work with
professional designers/layout people. I want to separate all the
programming logic from the presentation but I am not sure how to do this.

Can anyone point me to resources (web tutorials/articles or books) that
would help me figure out how best to separate my programming work from
designer's work and how best to integrate them?

Sorry for asking such a generic question but I don't know how to best
phrase it. I did look on the web but the best I could find were some
mentions of templates. While templates seems ok they don't address all
the issues of separation presentation from code (if I understand them
correctly).

Thanks!

Jc


 


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




[PHP] New window, new session

2002-06-25 Thread Riaan Stander

Hi there

I know this is not a php specific question, but I don't know where else to
ask.

I've got the following situation. The website I'm currently working on has
got a administration page where the administration user must be able to
login as all the users available. It is fine getting all the data, but I
want to open the login in a new browser window, otherwise the administrator
has go to re-login with his account. Thus, I need to somehow open a new
browser window, with a new session id. When somebody logs in I check to see
if there is already a session variable registered. If there is, I unset this
variable, and register a new one for the login account. You can see where my
problem is. At this stage I'm using some java script window.open() to open
the new window, but it is still with the save session id.

If any of you can tell me how to open a new browser window with a new
session id, I would greatly appreciate it.

Thanx
Riaan



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




Re: [PHP] Seperating presentation from logic

2002-06-25 Thread Justin French

on 25/06/02 5:50 PM, Jean-Christian Imbeault ([EMAIL PROTECTED])
wrote:

 Maybe my message was too vague but what I meant is that my designers
 will come up with the site layout, colours, graphics etc ... I want them
 to be able to do all their work without thinking about any programming.

Why can't you specify them to make comments to !--insert php code--, or
better still specify which file to include with
?include('inc/something.php');?

??

 If they want to make a page that lists in a table all the documents we
 have from 1999-2001, then they can can do this easily without worrying
 about me.

Yes, but things like sessions, form validation, etc will require more
indepth scripts, possibly with thing in the headers, and much more
conditional style pages with lots of if()'s.


 And just as importantly I can code the scripts that will generate the
 table without worrying that maybe in the future the layout will change.

ask them to write an include statement at the point where your table needs
to appear.

 So I how can I do this? i.e. if the designers want to change the
 background colour on one page how can they do this without coming to seem?

See my other post on this topic... have a set of predefined variables which
both you and they have access to, and include this set of vars on every
page... these can be for the colour pallet, font tags, and all sorts of
other stuff which can be changed centrally (once) by modifying the config
file, affecting all templated pages.

You need to sit down and figure out what you want to give them access to,
and try to define these as variables.

? // general_config.php

$siteTitle

$colBg = #FF;
$colText = #FFCC99;
$colLink = #EE;
$colComplimentary = #CC6600;


$fontHeading = FONT class=\heading\ face=\verdana, arial\
size=\3\;

$fontBody = FONT class=\body\ face=\verdana, arial\ size=\2\
color=\{$colText}\;

$fontCopyright = FONT class=\copyright\ face=\verdana, arial\
size=\1\ color=\{$ colComplimentary}\;

?

The calling in HTML code might be:

? include('inc/general_config.php'); ?
HTML
HEADTITLE?=$siteTitle?/TITLE
BODY bgcolor=?=$colBg? text=?=$colText? link=?=$colLink?
?=$fontHeading?My Heading/FONTBR
?=$fontBody?The main body text/FONTBRBR
?=$fontCopyright?Copyright me 2002/FONT
/BODY
/HTML


They can change the config file as many times as they want!


Justin French


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




[PHP] odbc

2002-06-25 Thread sonjaya

i just newbie how to use odbc in php i have ready craete odbc in window
like this
 
odbc name= data
user = tes
password=
 
i want read some data in password.db and put ini un the screen 
strukture database password.db  like this
password
name
level 
 allos some exsample to use to get in the screen , i so sory because i
newbie , thank's



Re: [PHP] Seperating presentation from logic

2002-06-25 Thread Justin French

on 25/06/02 6:40 PM, Jean-Christian Imbeault ([EMAIL PROTECTED])
wrote:

 Some of the issues are things like how to make it painless for both
 the designers and me if one day, out of the blue, a designers decides
 that the background colour should be changed, or the graphics changed.
 Or even worse the two column layout should be a three column layout.

well, some things are easy (see my other posts about colours) and some
things are hard (2 col layout changing to 3), although not impossible.

decide on a allowed set of changes the design team can make/have access to,
and stick to it... anything else will require more code, and more time.


 But to start off with simple things like:
 
 Designer:
 - on this page a dynamic table will be generated according to the search
 criteria entered by the user
 - lines will have alternating colours

 I can code this easily, but what if the designer then decides that he
 wants each *third* line to alternate colour, or he wants to use three
 colours instead of two (a pattern 1,2,3,1,2,3 instead of 1,2,1,2).

 How can I make it so that he can do these changes without coming to see
 me to change the code that outputs the data used in the table?

Well, then you work on a set of code that allows for configuration of the
table to alternate in 2 or 3 colours (1st rule established -- not  2, not 
3), and then allow them to set the 2 or 3 values via a colour configuration
file (see other posts) which is included at the top of the page.

Proving them ACCESS to these configuration values can be as simple as
allowing them to write/change the config.php file, or it might involve a
content management system with a GUI web based control panel.

Generally the config aren't hard, it's executing them in a function wrapper
/ code block.


Establish rules, design config variables to accomodate the options, allow
access to these config variables (a flat file, mysql values, whatever), then
accomodate these config options in code.


Yes, providing code that allows for 2 OR 3 alternating color rows in a
table will be a lot more than for just 2, so you need to establish if this
is a priority.


Justin French


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




[PHP] Re: [PHP-DEV] singleton feature

2002-06-25 Thread BB

I would like to know too,

Purushotham Komaravolu [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Singleton means only one instance.. i.e. instance of a class per
 webserver... all application scripts should talk only to that same
instance
 irrespective of the request.
 p

 - Original Message -
 From: Alexander Skwar [EMAIL PROTECTED]
 To: Purushotham Komaravolu [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, June 24, 2002 2:53 PM
 Subject: Re: [PHP-DEV] singleton feature


 So sprach Purushotham Komaravolu am 2002-06-24 um 11:39:36 -0700 :
 
  Hi ,
I have a small suggestion. I guess it is a good feature to
  have a provision to have a Singleton class per webserver instance. This
is
  especially useful for maintain user defined connection pools, loggers
etc.

 Uhm, what's a Singleton class?

 Alexander Skwar
 --
 How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
 Homepage: http://www.iso-top.de  |Jabber: [EMAIL PROTECTED]
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 11 hours 5 minutes

 --
 PHP Development 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] function echo '

2002-06-25 Thread Pradeep Dsouza

Yes you can 

a href = link.php??php echo module=1; ?
Link Here /a

Pradeep 




Can you use

a href=? echo $address; ? or is this bad coding?


René moonen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Use the escape character to output double quotes

 echo 'a href=\$address\';

 René




[PHP] New window, new session

2002-06-25 Thread Riaan Stander

Hi there

I know this is not a php specific question, but I don't know where else to
ask.

I've got the following situation. The website I'm currently working on has
got a administration page where the administration user must be able to
login as all the users available. It is fine getting all the data, but I
want to open the login in a new browser window, otherwise the administrator
has go to re-login with his account. Thus, I need to somehow open a new
browser window, with a new session id. When somebody logs in I check to see
if there is already a session variable registered. If there is, I unset this
variable, and register a new one for the login account. You can see where my
problem is. At this stage I'm using some java script window.open() to open
the new window, but it is still with the save session id.

If any of you can tell me how to open a new browser window with a new
session id, I would greatly appreciate it.

Thanx
Riaan



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




[PHP] paradox

2002-06-25 Thread sonjaya

?php
$conections=odbc_connect(data,tes,);
$result=odbc_do($conections,select nama from password);
odbc_binmode($result,0);
odbc_longreadlen($result);
odbc_fetch_row($result);
header(Conten-type:type: image/gif);
odbc_result($result,1);
?
error message like this 
Warning: SQL error: [Microsoft][ODBC Paradox Driver] External table is
not in the expected format., SQL state S1000 in SQLExecDirect in
c:\apache\htdocs\database\odbc1.php on line 8

Warning: Wrong parameter count for odbc_longreadlen() in
c:\apache\htdocs\database\odbc1.php on line 10

Warning: Supplied argument is not a valid ODBC result resource in
c:\apache\htdocs\database\odbc1.php on line 11

Warning: Cannot add header information - headers already sent by (output
started at c:\apache\htdocs\database\odbc1.php:8) in
c:\apache\htdocs\database\odbc1.php on line 12

Warning: Supplied argument is not a valid ODBC result resource in
c:\apache\htdocs\database\odbc1.php on line 13

any one cna help me with sample  source 



RE: [PHP] function echo ' '

2002-06-25 Thread Niklas Lampén

Not true. :)
You can do it like this: (Ok, this is a for loop, but idea is the same)

?
for ($i = 0; $i  10; ++$i)
{
?
a href=page?=$i?.htmPage ?=$i?/a
?
};
?


Niklas

-Original Message-
From: Martin Johansson [mailto:[EMAIL PROTECTED]] 
Sent: 25. kesäkuuta 2002 10:56
To: [EMAIL PROTECTED]
Subject: Re: [PHP] function echo ' '


But the problem is that Im doin it inside a while loop. So I need to
echo it. /mj

Niklas lampén [EMAIL PROTECTED] skrev i meddelandet
025801c21c1d$55d16210$ba93c5c3@Niklas">news:025801c21c1d$55d16210$ba93c5c3@Niklas...
Shorter version would be

a href=?=$address?

And this is not bad coding, it is actually faster than echoing
everything. We had this conversation maybe a week ago, so let's not
start it again. :)


Niklas




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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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




Re: [PHP] Library Function

2002-06-25 Thread Jason Wong

On Tuesday 25 June 2002 16:31, Uma Shankari T. wrote:
 Hello,


  Is there any built in function in php to read character by character of
 the value stored in the variable...??

Assuming your variable holds a string then you could do:

$doo = dah;
echo $doo{2}; // displays 'h'

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

/*
This is National Non-Dairy Creamer Week.
*/


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




[PHP] PHP not working on Apache at XP Pro.

2002-06-25 Thread Thomas Edison Jr.

Glory!

I've got Windows XP Pro OS. I installed and am running
mySQL on that. 
However, PHP is not getting configured with Apache on
it. I got the latest Apache, 1.3.24 or something, not
the Version 2. Anyway, Apache runs perfectly on it.
However, when i put in the required PHP lines in
httpd.conf and install PHP otherwise on the system. 
What happens is that i get an error stating that :
mod_c.php already exists, skipping

Now when i remove that line, PHP does not work with
Apache. If i insert that line, APACHE itself doesn't
work at all. What is wrong with it?

Well thanks,
T. Edison Jr.



=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




[PHP] Re: New window, new session

2002-06-25 Thread George Whiffen

Riaan Stander wrote:

 Hi there

 I know this is not a php specific question, but I don't know where else to
 ask.

 I've got the following situation. The website I'm currently working on has
 got a administration page where the administration user must be able to
 login as all the users available. It is fine getting all the data, but I
 want to open the login in a new browser window, otherwise the administrator
 has go to re-login with his account. Thus, I need to somehow open a new
 browser window, with a new session id. When somebody logs in I check to see
 if there is already a session variable registered. If there is, I unset this
 variable, and register a new one for the login account. You can see where my
 problem is. At this stage I'm using some java script window.open() to open
 the new window, but it is still with the save session id.

 If any of you can tell me how to open a new browser window with a new
 session id, I would greatly appreciate it.

 Thanx
 Riaan

Riaan,

Would it help if you opened the window at another domain?

I don't use sessions, as I much prefer http authentication/stateless
pages etc.  But I get the same problem i.e. admin user has to
keep logging in between accounts.  The solution is just to change
the realm/domain for the admin user e.g. admin.mysite.com.  Then
the browser keeps separate login/passwords.

This should also be possible with cookie based sessions since the
browsers will hold separate cookies for different domains and
also for different paths if you specify a path on the cookie setting.

I don't know if all this session stuff lets you specify the path
on the session cookie, but certainly the separate domain technique
should work.

Hope that helps,

George


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




Re: [PHP] Re: New window, new session

2002-06-25 Thread Justin French

Would it help if you opened the new window with some sort of GET variable
which alerted PHP that it has to kill the existing session, and fire up a
new one with the current user?

window.open('myPopUpPage.php?action=killSession')

???

Justin French




on 25/06/02 9:16 PM, George Whiffen ([EMAIL PROTECTED]) wrote:

 Riaan Stander wrote:
 
 Hi there
 
 I know this is not a php specific question, but I don't know where else to
 ask.
 
 I've got the following situation. The website I'm currently working on has
 got a administration page where the administration user must be able to
 login as all the users available. It is fine getting all the data, but I
 want to open the login in a new browser window, otherwise the administrator
 has go to re-login with his account. Thus, I need to somehow open a new
 browser window, with a new session id. When somebody logs in I check to see
 if there is already a session variable registered. If there is, I unset this
 variable, and register a new one for the login account. You can see where my
 problem is. At this stage I'm using some java script window.open() to open
 the new window, but it is still with the save session id.
 
 If any of you can tell me how to open a new browser window with a new
 session id, I would greatly appreciate it.
 
 Thanx
 Riaan


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




[PHP] Re: Problem with regular expressions

2002-06-25 Thread George Whiffen

Drew wrote:

 When I run the following script it returns String Okay! when it should say
 Invalid Characters Found. I've tried the script substituting $ for other
 characters, such as j, and it works just fine. What do I need to do?

 ?php

 $input = johnon@company.$com;

 if (ereg([$], $input)) {
  die(Invalid Characters Found.);
 } elseif (ereg([[:space:]], $input)) {
  die(Whitespace found.);
 } else {
  echo String okay!;
 }

 ?

 Thanks,

 Drew

Try changing the double quotes to single quotes i.e.
$input = 'johnon@company.$com';

php automatically attempts variable substitution on double-quoted
strings, but not single-quoted strings.  Unless you know that you want
variable substitution, it's always safer and faster to use single-quotes.

George


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




[PHP] A simple javascript problem

2002-06-25 Thread Jon

Im the copy/paste guru and I want a downloaded php/mysql guestbook to work.
Php and mysql works fine and Ive seen friends use this guestbook. But on my
server a get file not found whenever a try to 'add' to the guestbook.
'Add' links to

guestbook.php?action=add

Seems like my server doesn't interprete the? correct.

Is there anything really basic here Im missing...

/Jon



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




Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson

Thanks, that was new for me!
/mj

Niklas lampén [EMAIL PROTECTED] skrev i meddelandet
026b01c21c31$3bdab780$ba93c5c3@Niklas">news:026b01c21c31$3bdab780$ba93c5c3@Niklas...
Not true. :)
You can do it like this: (Ok, this is a for loop, but idea is the same)

?
for ($i = 0; $i  10; ++$i)
{
?
a href=page?=$i?.htmPage ?=$i?/a
?
};
?


Niklas

-Original Message-
From: Martin Johansson [mailto:[EMAIL PROTECTED]]
Sent: 25. kesäkuuta 2002 10:56
To: [EMAIL PROTECTED]
Subject: Re: [PHP] function echo ' '


But the problem is that Im doin it inside a while loop. So I need to
echo it. /mj

Niklas lampén [EMAIL PROTECTED] skrev i meddelandet
025801c21c1d$55d16210$ba93c5c3@Niklas">news:025801c21c1d$55d16210$ba93c5c3@Niklas...
Shorter version would be

a href=?=$address?

And this is not bad coding, it is actually faster than echoing
everything. We had this conversation maybe a week ago, so let's not
start it again. :)


Niklas




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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/



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




[PHP] File Retrieval, unusual

2002-06-25 Thread Jay Blanchard

I am in the process of analyzing the following situation and wanted to see
if any of you might have done this or something similar before...

Each day we have a person who is responsible for going to a secure web site
,logging in, (which redirects to) a JAVA applet. This JAVA applet has a set
of tabs across the top, one of which is labeled 'Daily Records'. The tab is
clicked on and then a set of zip files is listed for download.

All done manually every day.

What we would like to do is develop some sort of automated method to do this
file retrieval using PHP (as a stand alone executable run by a CRON job)
since it has excellent file handling functions. We could use PERL too.

Unfortunately the company we retrieve these files from will not make them
available in a more convenient manner because if we do it for you, we have
to do it for everyone. My arguement was that we already had access, there
was no need for a JAVA applet layer of abstraction. The arguement fell on
deaf ears, leaving me in this position.

Does anyone have any ideas? I am trying some things, but looking for
'eye-openers' and 'ah-ha's!'

TIA!

Jay



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




Re: [PHP] Which costs more: connecting to a DB or accessing the file system?

2002-06-25 Thread Luke Welling

Mike wrote:
 thaks for the reply.  I conducted a simple/rough benchmark to which is
more
 expensive.
...

 On the win box, file system access was 11 times faster, while on the
freeBSD
 box, file system access was 3 times faster.  The include of the adodb
class
 is not benchmarked, as part of this test, that that adds extra overhead as
 well.

 I suppose that filesystem access is faster.

The answer that you got that said it depends, while superficially not very
useful is almost certainly right.

Compared to a 'select * from table' query, reading all of a file is likely
quicker regardless of which DB or DB abstraction you use.

How about some more complex cases:

 * 'select * from table where id = 999' compared to reading in a file and
finding the correct line?

 * inserting or altering a line in the middle of an ordered file, compared
to a simple insert or alter on a DB?

 * writing data to the file while 40 other script instances are all trying
to read and write to the file at the same time and doing your own
concurrency control, compared to letting a DB engine handle the concurrency
issues for you?

Simple tasks might be easier and quicker to do from a file, in which case,
if the application is unlikely to grow or evolve, the file might be the best
way to do things.  For complex or concurrent tasks, it can be much more
efficient in terms of both programming and execution time to let the DB
handle some of the harder parts for you.

It really does depend exactly what you are trying to do with your database
or file.

Cheers,

Luke Welling
--
PHP and MySQL Web Development
by Luke Welling and Laura Thomson
http://www.amazon.com/exec/obidos/ASIN/0672317842/tangledwebdesign




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




[PHP] Re: paradox

2002-06-25 Thread Kondwani Spike Mkandawire

I've been having the same error for the past couple of days,
I have posted on a couple of news goups with no response...
I even have a posting on this one...  I posted one on the paradox
news group and some very rude individual gave a sarcastic
response and led me back here (I think he was feeling like a
don coz he owns some software firm)...  Anywayz, I am quite
convinced that it is to do with the configuration when setting
up the connection to your database (I haven't come around
that yet), kind of the same way you connect to an access DB.
I don't think it has anything to do with your source...  I was told
that people link their php Scripts to paradox tables via. ODBC.
However, I'd appreciate it if you would throw any further suggestions
if you have any...



Kondwani
Sonjaya [EMAIL PROTECTED] wrote in message
01c21c2d$fbf5ef20$c800a8c0@sicute">news:01c21c2d$fbf5ef20$c800a8c0@sicute...
 ?php
 $conections=odbc_connect(data,tes,);
 $result=odbc_do($conections,select nama from password);
 odbc_binmode($result,0);
 odbc_longreadlen($result);
 odbc_fetch_row($result);
 header(Conten-type:type: image/gif);
 odbc_result($result,1);
 ?
 error message like this
 Warning: SQL error: [Microsoft][ODBC Paradox Driver] External table is
 not in the expected format., SQL state S1000 in SQLExecDirect in
 c:\apache\htdocs\database\odbc1.php on line 8

 Warning: Wrong parameter count for odbc_longreadlen() in
 c:\apache\htdocs\database\odbc1.php on line 10

 Warning: Supplied argument is not a valid ODBC result resource in
 c:\apache\htdocs\database\odbc1.php on line 11

 Warning: Cannot add header information - headers already sent by (output
 started at c:\apache\htdocs\database\odbc1.php:8) in
 c:\apache\htdocs\database\odbc1.php on line 12

 Warning: Supplied argument is not a valid ODBC result resource in
 c:\apache\htdocs\database\odbc1.php on line 13

 any one cna help me with sample  source




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




RE: [PHP] A simple javascript problem

2002-06-25 Thread Richard Black

Why is that a javascript problem?

It may be that the guestbook expects the action variable to be
registered as a global variable, but your server has this feature turned
off.

What is it not ddoing correctly??

Richy

==
Richard Black
Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 435 3504
Email: [EMAIL PROTECTED] 

-Original Message-
From: Jon [mailto:[EMAIL PROTECTED]] 
Sent: 25 June 2002 12:20
To: [EMAIL PROTECTED]
Subject: [PHP] A simple javascript problem


Im the copy/paste guru and I want a downloaded php/mysql guestbook to
work. Php and mysql works fine and Ive seen friends use this guestbook.
But on my server a get file not found whenever a try to 'add' to the
guestbook. 'Add' links to

guestbook.php?action=add

Seems like my server doesn't interprete the? correct.

Is there anything really basic here Im missing...

/Jon



-- 
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] wordwrap doesn't work for customer's Outlook

2002-06-25 Thread m u i n a r

Is there really no solution to this issue? Is everyone using
wordwrap to wrap their newsletter texts, or is there a way that
works as well with Ms Outlook?

Thanks a lot

Recap:
- Ms Outlook gets everything on 1 line when I use wordwrap( $text,76,\r\n ).
- Ms Outlook shows nice line breaks when they are hard-coded in the script.

At 23:33 24.06.02, you wrote:

So can anyone tell me what is the difference between wordwrap and
these hard-coded lines? Is wordwrap not safe for use in newsletter
sending scripts? Why is $newtext = wordwrap( $text,76,\r\n );
not sufficient?

Thanks a lot



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




[PHP] how to get names of files...

2002-06-25 Thread tauntz

Hello..

I have a problem:

I want to get all the filenames in a folder and put each filename into a
variable..
(if there's a.gif in the folder then I want $first to be a.gif, IF
there's also a na.jpg then I want then it should be $second .. if you
know what I mean)

sry for the dumb question but I'm quite new to php


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




RE: [PHP] Seperating presentation from logic

2002-06-25 Thread SP

I recommend http://smarty.php.net for seperating presentation from logic.
It's one of the best template systems currently.  It worked out of the box
for me but it took me like the long weekend to figure out some of the config
folders.  It does your standard variable substitution {$bgcolor} but what I
like about it is that it lets you code your own custom tags for your
designers like {display_calender} so it hides all the php code for
displaying a calender or something.  Your designer just types in
{display_calender} in the html files and it comes out a calender everytime.



-Original Message-
From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]]
Sent: June 25, 2002 1:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Seperating presentation from logic


I'm just about to start a large PHP project in which I get to work with
professional designers/layout people. I want to separate all the
programming logic from the presentation but I am not sure how to do this.

Can anyone point me to resources (web tutorials/articles or books) that
would help me figure out how best to separate my programming work from
designer's work and how best to integrate them?

Sorry for asking such a generic question but I don't know how to best
phrase it. I did look on the web but the best I could find were some
mentions of templates. While templates seems ok they don't address all
the issues of separation presentation from code (if I understand them
correctly).

Thanks!

Jc


--
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: how to get names of files...

2002-06-25 Thread Henrik Hansen

[EMAIL PROTECTED] (Tauntz) wrote:

  Hello..

  I have a problem:

  I want to get all the filenames in a folder and put each filename into a
  variable..

http://dk.php.net/manual/en/function.readdir.php

  (if there's a.gif in the folder then I want $first to be a.gif, IF
  there's also a na.jpg then I want then it should be $second .. if you
  know what I mean)

use some if's to find out in the readdir loop.

-- 
Henrik Hansen

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




RE: [PHP] Re: how to get names of files...

2002-06-25 Thread tauntz


Thank you, I got it working :)


-Original Message-
From: Henrik Hansen [mailto:[EMAIL PROTECTED]] 
Sent: 25. juuni 2002. a. 15:04
To: [EMAIL PROTECTED]
Subject: [PHP] Re: how to get names of files...

[EMAIL PROTECTED] (Tauntz) wrote:

  Hello..

  I have a problem:

  I want to get all the filenames in a folder and put each filename
into a
  variable..

http://dk.php.net/manual/en/function.readdir.php

  (if there's a.gif in the folder then I want $first to be a.gif, IF
  there's also a na.jpg then I want then it should be $second .. if
you
  know what I mean)

use some if's to find out in the readdir loop.

-- 
Henrik Hansen

-- 
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] Problem compiling PHP

2002-06-25 Thread David Loszewski

I'm using php-4.2.1 on FreeBSD 4.5 with Apache2, I did the 
configurefine, I did a './configure --with-mysql 
--with-apxs2=/usr/local/apache/bin/apxs', but when I do a 'gmake' it 
comes up with

php_functions.c:93: syntax error
gmake[3]: *** [php_functions.lo] Error 1
gmake[3]: Leaving directory `/usr2/php-4.2.1/sapi/apache2filter'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr2/php-4.2.1/sapi/apache2filter'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr2/php-4.2.1/sapi'
gmake: *** [all-recursive] Error 1

what can I do to fix this? I even tried to just do a 'make' but came 
upwith basically the same thing

Dave


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




[PHP] Re: File Retrieval, unusual

2002-06-25 Thread Kondwani Spike Mkandawire

Do you really need the quotation marks when you are simply using
php to spit out your HTML?

Unless it is absolutely necessary php still spits out the correct
HTML code without uneccessary quotations...

echo a href= $address;

I am quite sure this should work for the link tag...  Correct me
if I am wrong but I know if works with the other HTML tags...
The EXTRA quotation marks usually aren't necessary...

Spike...
Jay Blanchard [EMAIL PROTECTED] wrote in message
001401c21c3c$1c98b2e0$8102a8c0@niigziuo4ohhdt">news:001401c21c3c$1c98b2e0$8102a8c0@niigziuo4ohhdt...
 I am in the process of analyzing the following situation and wanted to see
 if any of you might have done this or something similar before...

 Each day we have a person who is responsible for going to a secure web
site
 ,logging in, (which redirects to) a JAVA applet. This JAVA applet has a
set
 of tabs across the top, one of which is labeled 'Daily Records'. The tab
is
 clicked on and then a set of zip files is listed for download.

 All done manually every day.

 What we would like to do is develop some sort of automated method to do
this
 file retrieval using PHP (as a stand alone executable run by a CRON job)
 since it has excellent file handling functions. We could use PERL too.

 Unfortunately the company we retrieve these files from will not make them
 available in a more convenient manner because if we do it for you, we
have
 to do it for everyone. My arguement was that we already had access, there
 was no need for a JAVA applet layer of abstraction. The arguement fell on
 deaf ears, leaving me in this position.

 Does anyone have any ideas? I am trying some things, but looking for
 'eye-openers' and 'ah-ha's!'

 TIA!

 Jay





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




RE: [PHP] Re: File Retrieval, unusual

2002-06-25 Thread Jay Blanchard

[snip]
Do you really need the quotation marks when you are simply using
php to spit out your HTML?

Unless it is absolutely necessary php still spits out the correct
HTML code without uneccessary quotations...

echo a href= $address;

I am quite sure this should work for the link tag...  Correct me
if I am wrong but I know if works with the other HTML tags...
The EXTRA quotation marks usually aren't necessary...

Spike...
[/snip]

Did you reply to the wrong message?

Jay Blanchard [EMAIL PROTECTED] wrote in message
001401c21c3c$1c98b2e0$8102a8c0@niigziuo4ohhdt">news:001401c21c3c$1c98b2e0$8102a8c0@niigziuo4ohhdt...
 I am in the process of analyzing the following situation and wanted to see
 if any of you might have done this or something similar before...

 Each day we have a person who is responsible for going to a secure web
site
 ,logging in, (which redirects to) a JAVA applet. This JAVA applet has a
set
 of tabs across the top, one of which is labeled 'Daily Records'. The tab
is
 clicked on and then a set of zip files is listed for download.

 All done manually every day.

 What we would like to do is develop some sort of automated method to do
this
 file retrieval using PHP (as a stand alone executable run by a CRON job)
 since it has excellent file handling functions. We could use PERL too.

 Unfortunately the company we retrieve these files from will not make them
 available in a more convenient manner because if we do it for you, we
have
 to do it for everyone. My arguement was that we already had access, there
 was no need for a JAVA applet layer of abstraction. The arguement fell on
 deaf ears, leaving me in this position.

 Does anyone have any ideas? I am trying some things, but looking for
 'eye-openers' and 'ah-ha's!'

 TIA!

 Jay





--
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] appending to XML file before closing tag

2002-06-25 Thread William S.

This works pretty well to append content to
an XML file. However, I need to keep the
closing tag where it belongs: at the end of
the file. This only appends to the end and
doesn't work.
 
I use ...
 
$myecho = Hello World;
$file_name = file.xml;
$file_pointer = fopen($file_name, a);
fwrite($file_pointer, $myecho);
fclose($file_pointer);
 
I know I need to introduce: fread() and fseek().
but not sure how to put it all together.
Anyone?

-- 
Bill
Amsterdam, NL

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




Re: [PHP] Re: File Retrieval, unusual

2002-06-25 Thread Kondwani Spike Mkandawire

Jay Blanchard [EMAIL PROTECTED]
wrote in message 001601c21c4b$67cfc5f0$8102a8c0@niigziuo4ohhdt">news:001601c21c4b$67cfc5f0$8102a8c0@niigziuo4ohhdt...

--- Did you reply to the wrong message?

Nope, You posted your question in someone else's
Reply Section... (Martin Johansson's function echo question)...

Spike...



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




RE: [PHP] Re: File Retrieval, unusual

2002-06-25 Thread Jay Blanchard

[snip]
Jay Blanchard [EMAIL PROTECTED]
wrote in message 001601c21c4b$67cfc5f0$8102a8c0@niigziuo4ohhdt">news:001601c21c4b$67cfc5f0$8102a8c0@niigziuo4ohhdt...

--- Did you reply to the wrong message?

Nope, You posted your question in someone else's
Reply Section... (Martin Johansson's function echo question)...
[/snip]

Must have some goofy header problem this morning, drat!

Jay


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




Re: [PHP] how to get names of files...

2002-06-25 Thread Martin Smetak

 (if there's a.gif in the folder then I want $first to be a.gif, IF
 there's also a na.jpg then I want then it should be $second .. if you
 know what I mean)

well, i think you don't want to have variable like $twentyfifth,
$hundredandthirtyfirst etc...
don't you rather use some array?

but try to use ${'variablename'}=$val

ex.:
for($i=0;$i100;$i++)
{  $name='name'.$i;
${$name}=$i;   }

You should get variables
$name0$name99 with values 0..99.

But I'm writing w/o testing

ByE,
Minca


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




Re: [PHP] appending to XML file before closing tag

2002-06-25 Thread Erik Price



On Tuesday, June 25, 2002, at 09:31  AM, William S. wrote:

 I know I need to introduce: fread() and fseek().
 but not sure how to put it all together.

If you know for a fact that the ending tag for each file is consistent 
and always that same tag, here's an idea.  Determine or specify the 
length of the ending tag (in other words /html would be a length of 
7 [characters]).  Now move your file pointer to (file's total 
characters - length) so that it is immediately before the ending tag.  
Append your data, then manually append the ending tag.

If you will deal with varying ending tags, then you'll have to come up 
with a creative method for capturing them and storing them, then 
dynamically determining their length and do the same thing, then append 
the ending tag (whatever it may be).  I would use regexes to do this 
part.


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]



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




[PHP] check if a foreach loop has successfully run

2002-06-25 Thread Jule Slootbeek

Hey list,
How do i check if my script has successfully run through an entire foreach() loop
do i just go

if (foreach ($answer as $a) { echo $a })
{
return TRUE;
} else {
return FALSE;
}

thanks in advance.

Jule
-- 
Jule Slootbeek  
[EMAIL PROTECTED] 

http://blindtheory.cjb.net 



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




[PHP] very strange behaviour under https

2002-06-25 Thread gilles

i've been having strange behaviour from php since i run my code from behind 
https.

i made a forum with PHP and MySQL (who didn't?), and it runs without any 
problems.
about 10 people worked with it for a month or three and it ran just fine 
all that time.

but now i decided to place that same forum behind https (apache + mod_ssl) 
and i get strange behaviour.

what happens is that occasionally some get/post variabeles seem to get lost 
(i think)

this all seems to occur very randomly so it is very hard to reproduce at 
any given time.

just to make sure the problem isn't within my code also made virtual 
directory without https accessing exactly the same code and there are no 
such errors.

what could be going on here?



config:
redhat 6.2
mysql-3.23.39
Apache/1.3.26
PHP/4.2.1
mod_perl/1.27
mod_ssl/2.8.9
OpenSSL/0.9.6c

php configure command:
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-imap' 
'--with-mysql' '--enable-track-vars' '--with-openssl=/usr/local/ssl' 
'--enable-sockets' '--with-xml' '--with-zlib' 
'--with-java=/usr/local/j2sdk1.4.0' '--with-pgsql'


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




Re: [PHP] function echo ' '

2002-06-25 Thread Martin Johansson

Thanks all for your replies!

For my code, this is the best way to view variables in echo functions

? echo 'a href='.$address.''; ?

It is nice and easy to read while going through a lot of code.
/mj



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




Re: [PHP] check if a foreach loop has successfully run

2002-06-25 Thread Jason Wong

On Tuesday 25 June 2002 22:18, Jule Slootbeek wrote:
 Hey list,
 How do i check if my script has successfully run through an entire

When it's finished looping when it's finished looping.

  foreach ($doo as $dah) { 
echo $dah; 
  }
  echo Finished;


 foreach() loop do i just go

 if (foreach ($answer as $a) { echo $a })
 {
   return TRUE;
 } else {
   return FALSE;
 }

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

/*
Electrocution, n.:
Burning at the stake with all the modern improvements.
*/


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




[PHP] Re: check if a foreach loop has successfully run

2002-06-25 Thread Kondwani Spike Mkandawire


Jule Slootbeek [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 if (foreach ($answer as $a) { echo $a })
 {
 return TRUE;
 } else {
 return FALSE;
 }

Seems about right, however by default output is printed to a Page
unless you are running your script in the command prompt what you
might want to do to avoid messiness is redirect every printout confirmation
of your for loop to the std.error (I am not too sure what the path
is: it should be in the manuals though - php.net)...  Or alternatively
to a file using the fopen(fileName, w+); then using puts() or fwrite
to write the output contents...

Spike...



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




[PHP] Downloading Files

2002-06-25 Thread Francis

I want to protect files from being downloaded and only allow people to
download files which they have access too. I've done all the access control
etc... but whats the best way for the user to download the file... Can you
paste the file directly into the header? (get the file from the
filesystem, mime encode it and put it in the header?) or copying the file to
a web viewable temp dir to allow the user to download it? (dont really want
to do this).

Thanks



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




[PHP] Automated Downloads WAS File Retrieval, unusual

2002-06-25 Thread Jay Blanchard

After further research I have found that the JAVA problem is non-existant,
so here is what I am left with:

On a remote https server;

1. Access the login page with 3 pieces of information to be passed.
Unfortunately this information cannot be passed via URL.
2. Activate login which creates a session id (JSP pages)
3. Retrieve list of files from a page to compare against files already
downloaded (no problem here)
4. Retrieve files via download (zip format). I believe I can accomplish this
with fopen or fsockopen.

I hope to do this via a stand alone PHP executable called by a CRON on a
daily basis. Any ideas for passing the three variables to the login page and
activating the login?

Thanks!

Jay



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




Re: [PHP] Downloading Files

2002-06-25 Thread Justin French

Either of these options will work fine.  There was MASSIVE disscussions
about this a few weeks back -- check for threads started by myself in the
archives.

Justin French




on 26/06/02 12:35 AM, Francis ([EMAIL PROTECTED]) wrote:

 I want to protect files from being downloaded and only allow people to
 download files which they have access too. I've done all the access control
 etc... but whats the best way for the user to download the file... Can you
 paste the file directly into the header? (get the file from the
 filesystem, mime encode it and put it in the header?) or copying the file to
 a web viewable temp dir to allow the user to download it? (dont really want
 to do this).
 
 Thanks
 
 


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




[PHP] recursive menus

2002-06-25 Thread electroteque

hi i have been trying to sought out a recursive hierarchical menu populated
from mysql how is this possible ? i have tried this but doesnt work
   $result = $db-query(SELECT * FROM mainsection ms LEFT JOIN subsections
ss ON ms.sectionID=ss.mainsectionID ORDER BY ms.sectionID,ss.subsectionID);
while ($menu = $result-fetchRow(DB_FETCHMODE_ASSOC)) {
   $section = $menu[section];
   $sectionID = $menu[sectionID];
   $subsection = $menu[subsection];
   $subsectionID = $menu[subsectionID];
   $mainsectionID = $menu[mainsectionID];
   if ($mainsectionID=$sectionID) echo $sectionbr$subsectionBR;  else
echo $sectionbr;
 }





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




Re: [PHP] appending to XML file before closing tag

2002-06-25 Thread William S.

Yes, that worked. Nice and effective solution.
Thank you.

On Tue, Jun 25, 2002 at 09:51:21AM -0400, Erik Price wrote:
snip
 
 If you know for a fact that the ending tag for each file is consistent 
 and always that same tag, here's an idea.  Determine or specify the 
 length of the ending tag (in other words /html would be a length of 
 7 [characters]).  Now move your file pointer to (file's total 
 characters - length) so that it is immediately before the ending tag.  
 Append your data, then manually append the ending tag.
 
snip
-- 
Bill
Amsterdam, NL

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




[PHP] multiple webserver

2002-06-25 Thread Anil Garg

hi,

This is a bit off topic but can anyone please point me to a link where i can
find a tutorial for setting multiple web server(by listening on different
ports) on one machine.

thanx
anil


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




Re: [PHP] multiple webserver

2002-06-25 Thread B i g D o g


You can set apache to listen on multiple ports or you can have different web
servers listening on ports that you configure it to listen on.

For example: I have apache on port 80 and throttle webserver listening on
8080...



B i g D o g


- Original Message -
From: Anil Garg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 9:20 AM
Subject: [PHP] multiple webserver


 hi,

 This is a bit off topic but can anyone please point me to a link where i
can
 find a tutorial for setting multiple web server(by listening on different
 ports) on one machine.

 thanx
 anil


 --
 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] Easy Date MySQL Question...

2002-06-25 Thread Doug Coning

Hi everyone,

I have searched the php.net and don't know where to look for the code I
need.  I have a MySQL date column that reads this way: 2002-06-25.  However,
in PHP I want to show it this way 06/25/2002.

Any assistance is greatly appreciated!!!

Thanks in advance.

Doug Coning
Coning Consulting
www.coning.com


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




Re: [PHP] Easy Date MySQL Question...

2002-06-25 Thread B i g D o g


Try looking at the date functions gmdate in the php.net manual


B i g D o g



- Original Message -
From: Doug Coning [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 9:06 AM
Subject: [PHP] Easy Date  MySQL Question...


 Hi everyone,

 I have searched the php.net and don't know where to look for the code I
 need.  I have a MySQL date column that reads this way: 2002-06-25.
However,
 in PHP I want to show it this way 06/25/2002.

 Any assistance is greatly appreciated!!!

 Thanks in advance.

 Doug Coning
 Coning Consulting
 www.coning.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] Automated Downloads WAS File Retrieval, unusual

2002-06-25 Thread Jay Blanchard

[snip]
After further research I have found that the JAVA problem is non-existant,
so here is what I am left with:

On a remote https server;

1. Access the login page with 3 pieces of information to be passed.
Unfortunately this information cannot be passed via URL.
2. Activate login which creates a session id (JSP pages)
3. Retrieve list of files from a page to compare against files already
downloaded (no problem here)
4. Retrieve files via download (zip format). I believe I can accomplish this
with fopen or fsockopen.

I hope to do this via a stand alone PHP executable called by a CRON on a
daily basis. Any ideas for passing the three variables to the login page and
activating the login?
[/snip]

More thoughts, could I pass the needed information in an HTTP header
function call from the stand alone script? Where is John when you need him?
:) That dad-gummed military takes up too much of his time! :)

Jay



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




Re: [PHP] Easy Date MySQL Question...

2002-06-25 Thread ej

as a quick hack you can use explode() to do this.

try this:
$date = explode(-,$mysqldate);
echo $date[1]./.$date[0]./.$date[2];

- Original Message -
From: Doug Coning [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 3:06 PM
Subject: [PHP] Easy Date  MySQL Question...


 Hi everyone,

 I have searched the php.net and don't know where to look for the code I
 need.  I have a MySQL date column that reads this way: 2002-06-25.
However,
 in PHP I want to show it this way 06/25/2002.

 Any assistance is greatly appreciated!!!

 Thanks in advance.

 Doug Coning
 Coning Consulting
 www.coning.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] Downloading Files

2002-06-25 Thread Francis

got it!! :)

$filename = backup.tar;
$download_file = /absolute/path/backup.tar;
$fh = fopen($download_file, r);
header(Content-Type: application/x-tar);
header(Content-Disposition: attachment; filename=$filename);
fpassthru($fh);
exit();

Thanks a lot!! :)

Justin French [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Either of these options will work fine.  There was MASSIVE disscussions
 about this a few weeks back -- check for threads started by myself in the
 archives.

 Justin French




 on 26/06/02 12:35 AM, Francis ([EMAIL PROTECTED]) wrote:

  I want to protect files from being downloaded and only allow people to
  download files which they have access too. I've done all the access
control
  etc... but whats the best way for the user to download the file... Can
you
  paste the file directly into the header? (get the file from the
  filesystem, mime encode it and put it in the header?) or copying the
file to
  a web viewable temp dir to allow the user to download it? (dont really
want
  to do this).
 
  Thanks
 
 




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




[PHP] Print a char from a variable number

2002-06-25 Thread guslist

Hello List,

I want to do something that I think it is very simple but I can´t get
working ! I´ve tryed fprint and works well but not with a random number.
printf(%'-6s, );
Here I print the '-' char 6 times.

In some where of my code a get a result from a math calculation and I want
to print this result as chars. Example:

10 - 7 = 3
I want to print the char '-' 3 times.
18 - 7 = 11
I want to print the char '-' 11 times.

Can anyone help me ?

Thank´s in advance,
Gus



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




Re: [PHP] multiple webserver

2002-06-25 Thread anilg

thanx for ur prompt reply
can u plz tell be some website where i can find the steps to do that.
thanx


B I G D O G wrote in message
news:03d401c21c5c$4501a5a0$[EMAIL PROTECTED]...   You can
set apache to listen on multiple ports or you can have different web 
servers listening on ports that you configure it to listen on.   For
example: I have apache on port 80 and throttle webserver listening on 
8080... B i g D o g- Original Message -  From:
Anil Garg  To:  Sent: Tuesday, June 25, 2002 9:20 AM  Subject:
[PHP] multiple webserver hi, This is a bit off topic but
can anyone please point me to a link where i  can   find a tutorial
for setting multiple web server(by listening on different   ports) on
one machine. thanx   anil   --   PHP General
Mailing List (http://www.php.net/)   To unsubscribe, visit:
http://www.php.net/unsub.php 



RE: [PHP] Easy Date MySQL Question...

2002-06-25 Thread John Holmes


 I have searched the php.net and don't know where to look for the code
I
 need.  I have a MySQL date column that reads this way: 2002-06-25.
 However,
 in PHP I want to show it this way 06/25/2002.

Do the formatting in your query. Use the MySQL function DATE_FORMAT().
Look it up in the MySQL manual, chapter 6: Date and Time Functions...

---John Holmes...


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




RE: [PHP] Downloading Files

2002-06-25 Thread John Holmes

 I want to protect files from being downloaded and only allow people to
 download files which they have access too. I've done all the access
 control
 etc... but whats the best way for the user to download the file... Can
you
 paste the file directly into the header? (get the file from the
 filesystem, mime encode it and put it in the header?) or copying the
file
 to
 a web viewable temp dir to allow the user to download it? (dont really
 want
 to do this).

Search the archives...

Download.php
?
Session_start();
If(isset($_SESSION['valid_user']))
{
  header(some file type content header);
  readfile($download_dir . $filename);
}
else
{ echo you're not a valid user; }
?

Adapt to your needs and don't even try this if you're not going to
validate the download directory and filename...

---John Holmes...




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




Re: [PHP] multiple webserver

2002-06-25 Thread B i g D o g

You can visit

www.apache.org

or any other webserver that you want to use.  You need to read the manual
for configuring the ports that they use.  So which ever webserver(s) you
want to use read their manual on configuration.

For apache you can configure the ports in the httpd.conf file.


B i g D o g



- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 9:46 AM
Subject: Re: [PHP] multiple webserver


 thanx for ur prompt reply
 can u plz tell be some website where i can find the steps to do that.
 thanx


 B I G D O G wrote in message
 news:03d401c21c5c$4501a5a0$[EMAIL PROTECTED]...   You can
 set apache to listen on multiple ports or you can have different web 
 servers listening on ports that you configure it to listen on.   For
 example: I have apache on port 80 and throttle webserver listening on 
 8080... B i g D o g- Original Message -  From:
 Anil Garg  To:  Sent: Tuesday, June 25, 2002 9:20 AM  Subject:
 [PHP] multiple webserver hi, This is a bit off topic but
 can anyone please point me to a link where i  can   find a tutorial
 for setting multiple web server(by listening on different   ports) on
 one machine. thanx   anil   --   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] Seperating presentation from logic

2002-06-25 Thread John Holmes

You really want a template system. Check out Smarty or patTemplate.
Devshed.com has a nice two part tutorial on patTemplate and I like how
it looks a little better than Smarty right now. Might want to evaluate
both and see which is faster or easier. 

I was going to give an example of patTemplate, but the devshed page
isn't coming up. Basically, like someone else said, you teach your HTML
designers to use custom tags that your template engine will recognize
and place the correct values for.

To make a loop, you'd tell your designers to do something like this

table
pattemplate:loop
trtda href='{download_link}'{filename}/a/td/tr
/pattemplate:loop

It's not exactly like that, mind you, but you get the idea. 

You can't ever completely separate you designers and programmers. What
you do is provide an easy to understand way for your designers to
include the programming elements. What's easier, teaching them to put
?=$_POST['name']? or {name} in the document???

---John Holmes...


 -Original Message-
 From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 25, 2002 3:50 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Seperating presentation from logic
 
 Thanks for the links. Hard to figure out what those things are just
from
 their web pages. They should work on making it easier to figure what
the
 projects are.
 
 I'll have a look but ...
 
 Maybe my message was too vague but what I meant is that my designers
 will come up with the site layout, colours, graphics etc ... I want
them
 to be able to do all their work without thinking about any
programming.
 
 If they want to make a page that lists in a table all the documents we
 have from 1999-2001, then they can can do this easily without worrying
 about me.
 
 And just as importantly I can code the scripts that will generate the
 table without worrying that maybe in the future the layout will
change.
 
 So I how can I do this? i.e. if the designers want to change the
 background colour on one page how can they do this without coming to
seem?
 
 Jc
 
 
 --
 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] Print a char from a variable number

2002-06-25 Thread John Holmes

Why not use str_repeat()?

www.php.net/str_repeat

---John Holmes...

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 25, 2002 11:45 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Print a char from a variable number
 
 Hello List,
 
 I want to do something that I think it is very simple but I can´t get
 working ! I´ve tryed fprint and works well but not with a random
number.
 printf(%'-6s, );
 Here I print the '-' char 6 times.
 
 In some where of my code a get a result from a math calculation and I
want
 to print this result as chars. Example:
 
 10 - 7 = 3
 I want to print the char '-' 3 times.
 18 - 7 = 11
 I want to print the char '-' 11 times.
 
 Can anyone help me ?
 
 Thank´s in advance,
 Gus
 
 
 
 --
 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] Automated Downloads WAS File Retrieval, unusual

2002-06-25 Thread John Holmes

 [snip]
 After further research I have found that the JAVA problem is
non-existant,
 so here is what I am left with:
 
 On a remote https server;
 
 1. Access the login page with 3 pieces of information to be passed.
 Unfortunately this information cannot be passed via URL.
 2. Activate login which creates a session id (JSP pages)
 3. Retrieve list of files from a page to compare against files already
 downloaded (no problem here)
 4. Retrieve files via download (zip format). I believe I can
accomplish
 this
 with fopen or fsockopen.
 
 I hope to do this via a stand alone PHP executable called by a CRON on
a
 daily basis. Any ideas for passing the three variables to the login
page
 and
 activating the login?
 [/snip]
 
 More thoughts, could I pass the needed information in an HTTP header
 function call from the stand alone script? Where is John when you need
 him?
 :) That dad-gummed military takes up too much of his time! :)

Who? 

I'm not sure how to do this at all. It's going to be complex because you
can't just pass variables through the URL and you have to maintain their
session. Depending on how they implement that is going to make it
difficult.

All I can suggest is that you read up on the cURL section of the manual
and any other documents about it you can find. I think that's the best
option to start on a project like this...

---John Holmes...


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




RE: [PHP] using variables in a function within a fuction

2002-06-25 Thread John Holmes

 ?
 function test1()
 {$hello=hello;}
 
 function test2()
 {test1();
 print $hello;}
 
 test2();
 
 ?
 This should print hello. But it does'nt work. Any idea?

Read here to find out why:

http://www.php.net/manual/en/language.variables.scope.php

---John Holmes...


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




Re: [PHP] Print a char from a variable number

2002-06-25 Thread guslist

Yea !! It worked... I was looking for some thing like that !!
Thank you very much !

Gus


- Original Message -
From: John Holmes [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 1:03 PM
Subject: RE: [PHP] Print a char from a variable number


 Why not use str_repeat()?

 www.php.net/str_repeat

 ---John Holmes...

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, June 25, 2002 11:45 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Print a char from a variable number
 
  Hello List,
 
  I want to do something that I think it is very simple but I can´t get
  working ! I´ve tryed fprint and works well but not with a random
 number.
  printf(%'-6s, );
  Here I print the '-' char 6 times.
 
  In some where of my code a get a result from a math calculation and I
 want
  to print this result as chars. Example:
 
  10 - 7 = 3
  I want to print the char '-' 3 times.
  18 - 7 = 11
  I want to print the char '-' 11 times.
 
  Can anyone help me ?
 
  Thank´s in advance,
  Gus
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


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




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




Re: [PHP] odbc

2002-06-25 Thread Analysis Solutions

On Tue, Jun 25, 2002 at 04:05:10PM +0700, sonjaya wrote:
 i just newbie how to use odbc in php i have ready craete odbc in window
 like this

Step 1:  http://www.php.net/manual/en/function.odbc-connect.php
Step 2:  http://www.php.net/manual/en/function.odbc-exec.php
Step 3:  http://www.php.net/manual/en/function.odbc-fetch-array.php

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] php JavaScript

2002-06-25 Thread Jim lucas

check out the reply he sent to my last message.  it had the code as an
attachment.

Jim Lucas
- Original Message -
From: David Freeman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 2:25 PM
Subject: RE: [PHP] php  JavaScript


  I've tried to include a simple javascript in a .php file,
   but couldn't get it to work.
  
   Actually not even the php code worked at all...
  
   Is there any specific configuration flag that needs to be
   set up in the Apache server so that the javascripts work
   correctly?

 Not particularly, but if you could show some sample code of what you're
 doing...

 FWIW, I include javascript stuff in my php all the time.

 CYA, Dave




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




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




Re: [PHP] Re: PHP 4.2

2002-06-25 Thread James Clifford

On Mon, Jun 24, 2002 at 09:24:13PM +0100, Peter wrote:
 If you want an all in one solution without having to have two versions,
 can't you read the status of register_globals from the config file and base
 the rest of the script on this?
 eg
 if (register_globals == 'on') {
 $name = _POST['name'];
 $address = _GET['address'];
 }
 
 then you can access the variables as if register_globals = on even if it
 isn't

That's the type of solution that I took on one of our servers where I had
deliberately turned off register_globals (prior to PHP 4.1 or whenever the
default was changed), though I just used a loop:

foreach($HTTP_POST_VARS as $var = $val) {
$$var = $val;
}

// repeat for the other relevant $HTTP_*_VARS

The result was a short script that could be require_once'd at the
top of every script that depended on register_globals being off. 



 Simon Troup [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I've written a small freeware script that gets installed on a variety of
  different platforms running various PHP versions.
 
  I've read through the manual about the super global arrays and how post
 and
  get vars are no longer registered by default, but am confused about when
 it
  would be a good idea to upgrade the script.
 
  If I change everything in the script and use $_GET and $_POST etc. then
  those people who are still using earlier versions won't be able to
 upgrade.
 
  Does anyone know what the uptake of the latest version is? What is
 everyone
  else doing about this? If I were developing for one client it wouldn't be
 a
  problem as obviously you'd know what you were developing for.
 
  I'd just like some feedback on when would be a good time to upgrade the
  scripts while causing the minimum disruption and maintaining maximum happy
  users.
 
  Thanks
 
  Zim
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
James Clifford
[EMAIL PROTECTED]


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




[PHP] Gradients in PHP GD

2002-06-25 Thread Ville Mattila

Hello,

Does anybody have an idea where could I find a code library or code snippet
to create gradients to images with PHP and GD?

Thank you,
Ville Mattila
Ikaalinen, Finland



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




RE: [PHP] Seperating presentation from logic

2002-06-25 Thread SP

There are a ton of template systems.  Look here for performance benchmarks:
http://www.phpinsider.com/benchmarks_phemplate

Unfortunately pattemplate isn't tested so I don't know how it rates.



-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: June 25, 2002 12:02 PM
To: 'Jean-Christian Imbeault'; [EMAIL PROTECTED]
Subject: RE: [PHP] Seperating presentation from logic


You really want a template system. Check out Smarty or patTemplate.
Devshed.com has a nice two part tutorial on patTemplate and I like how
it looks a little better than Smarty right now. Might want to evaluate
both and see which is faster or easier.

I was going to give an example of patTemplate, but the devshed page
isn't coming up. Basically, like someone else said, you teach your HTML
designers to use custom tags that your template engine will recognize
and place the correct values for.

To make a loop, you'd tell your designers to do something like this

table
pattemplate:loop
trtda href='{download_link}'{filename}/a/td/tr
/pattemplate:loop

It's not exactly like that, mind you, but you get the idea.

You can't ever completely separate you designers and programmers. What
you do is provide an easy to understand way for your designers to
include the programming elements. What's easier, teaching them to put
?=$_POST['name']? or {name} in the document???

---John Holmes...


 -Original Message-
 From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 25, 2002 3:50 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Seperating presentation from logic

 Thanks for the links. Hard to figure out what those things are just
from
 their web pages. They should work on making it easier to figure what
the
 projects are.

 I'll have a look but ...

 Maybe my message was too vague but what I meant is that my designers
 will come up with the site layout, colours, graphics etc ... I want
them
 to be able to do all their work without thinking about any
programming.

 If they want to make a page that lists in a table all the documents we
 have from 1999-2001, then they can can do this easily without worrying
 about me.

 And just as importantly I can code the scripts that will generate the
 table without worrying that maybe in the future the layout will
change.

 So I how can I do this? i.e. if the designers want to change the
 background colour on one page how can they do this without coming to
seem?

 Jc


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



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




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




Re: [PHP] Re: PHP 4.2

2002-06-25 Thread James Clifford

 foreach($HTTP_POST_VARS as $var = $val) {
   $$var = $val;
 }
 
 // repeat for the other relevant $HTTP_*_VARS
 
 The result was a short script that could be require_once'd at the
 top of every script that depended on register_globals being off. 

Er, I mean 'that depended on register_globals being *on*'. =/

-- 
James Clifford
[EMAIL PROTECTED]

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




[PHP] php not remembering a session

2002-06-25 Thread Phil Schwarzmann

I just setup php/apache/mysql on a win98 machine and everything is
working great except session control.
 
It won't record a session or any session variables.  Everything else is
working well.
 
It was giving me an error because i didn't have a tmp folder on the
root of my C drive. 
 
Now I don't get any errors, it just won't start a session.
 
I'm sure it has something to do with my php.ini file
 
Any help?
 
Thanks!!!



[PHP] forms question

2002-06-25 Thread M.E. Suliman

Hi

I'm busy with an order form in php.  How would I display a text field only
if a checkbox is checked.  The reason for this is that if the user selects
the product in the form and, how would I get to display the quantity field
corresponding to that checkbox

Any help would be appreciated.

Thanks

Mohamed


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




[PHP] char function

2002-06-25 Thread Leo

i want a logical function (true or false) that search a character into a
string.(like indexOf() in javascript)
example: i want to find char '@ ' in the string [EMAIL PROTECTED]

leo



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




Re: [PHP] char function

2002-06-25 Thread Erik Price


On Tuesday, June 25, 2002, at 06:23  AM, Leo wrote:

 i want a logical function (true or false) that search a character into a
 string.(like indexOf() in javascript)
 example: i want to find char '@ ' in the string [EMAIL PROTECTED]

$str = '[EMAIL PROTECTED]';
if (preg_match('/@/', $str)) {
print $str does contain the '@' symbol.\n;
}

Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




[PHP] upgrading phpmyadmin...

2002-06-25 Thread Phil Schwarzmann

Is it pretty easy to upgrade phpmyadmin from 2.1 to the latest version? 
Anyone run in to any difficulty?



RE: [PHP] Seperating presentation from logic

2002-06-25 Thread Jerome Houston

Is there a particular reason everyone is skipping over the idea of using 
XML/XSLT?  What you're talking about is EXACTLY what XSLT was designed for.  
You can write scripts that access the DB, and output XML.  Then you just use 
XSL files written by your designers to translate your XML into HTML.  they 
get to choose EVERYTHING about what the page looks like.

Granted, your designers need to learn a little XSL, but it sounds like, for 
what you're doing, they wouldn't need to learn much.  If you're going to 
teach them to use something proprietary like pattemplate (as mentioned 
below), why not spend that time teaching them to use XSL, which is easy to 
use and isn't proprietary, it's actually W3 specified.

for info on how to get it working with php, go to:
http://www.webmasterbase.com/article/602

some people may disagree.

-jerome

Basically, like someone else said, you teach your HTML
designers to use custom tags that your template engine will recognize
and place the correct values for.

To make a loop, you'd tell your designers to do something like this
table
pattemplate:loop
trtda href='{download_link}'{filename}/a/td/tr
/pattemplate:loop

It's not exactly like that, mind you, but you get the idea.

You can't ever completely separate you designers and programmers. What
you do is provide an easy to understand way for your designers to
include the programming elements. What's easier, teaching them to put
?=$_POST['name']? or {name} in the document???


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: [PHP] char function

2002-06-25 Thread Evan Nemerson

php.net/strstr

Will return the string instead of true, but it will probably work for whatever 
you want to do...

if ( strstr($string1, $string2) )

works perfectly well





On Tuesday 25 June 2002 03:23 am, Leo wrote:
 i want a logical function (true or false) that search a character into a
 string.(like indexOf() in javascript)
 example: i want to find char '@ ' in the string [EMAIL PROTECTED]

 leo

-- 
To Believe without evidence and demonstration is an act of ignorance and 
folly.

Volney


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




Re: [PHP] forms question

2002-06-25 Thread Evan Nemerson

If you want to do it from PHP, then the forms will have to be seperate (PHP is 
server side...) You assign a value to a checkbox, then in the page you submit 
to, use something like

if ( $_POST[$checkbox_name] == checked_value )
{
...
}


On Tuesday 25 June 2002 10:30 am, M.E. Suliman wrote:
 Hi

 I'm busy with an order form in php.  How would I display a text field only
 if a checkbox is checked.  The reason for this is that if the user selects
 the product in the form and, how would I get to display the quantity field
 corresponding to that checkbox

 Any help would be appreciated.

 Thanks

 Mohamed

-- 
To Believe without evidence and demonstration is an act of ignorance and 
folly.

Volney


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




[PHP] [php] How to get request url string and server hostname

2002-06-25 Thread Harriet Xing

Hi,

Would anyone know how to get the http request url string in php?
i.e., if the request is http://www.myserver.com/test.php?param1=123;, how can I 
obtain this string in test.php?

Thank you,
Harriett

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




Re: [PHP] upgrading phpmyadmin...

2002-06-25 Thread Devrim GUNDUZ


Hi,

On Tue, 25 Jun 2002, Phil Schwarzmann wrote:

 Is it pretty easy to upgrade phpmyadmin from 2.1 to the latest version? 
 Anyone run in to any difficulty?


Just untar the newest version and edit config.php 

-- 

Devrim GUNDUZ

[EMAIL PROTECTED]
[EMAIL PROTECTED]

Web : http://devrim.oper.metu.edu.tr
-



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




Re: [PHP] [php] How to get request url string and server hostname

2002-06-25 Thread 1LT John W. Holmes

A combination of $_SERVER['SERVER_NAME'], $_SERVER['SCRIPT_NAME'], and
$_SERVER['QUERY_STRING'] should get you what you want.

Check out a phpinfo() page for more variables, or do a print_r($_SERVER);

---John Holmes...

- Original Message -
From: Harriet Xing [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 2:56 PM
Subject: [PHP] [php] How to get request url string and server hostname


Hi,

Would anyone know how to get the http request url string in php?
i.e., if the request is http://www.myserver.com/test.php?param1=123;, how
can I obtain this string in test.php?

Thank you,
Harriett

--
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 not remembering a session

2002-06-25 Thread 1LT John W. Holmes

Put a valid path in your session.save_path in php.ini. Something like
c:\windows\temp or whatever...

---John Holmes...

- Original Message -
From: Phil Schwarzmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 1:54 PM
Subject: [PHP] php not remembering a session


 I just setup php/apache/mysql on a win98 machine and everything is
 working great except session control.

 It won't record a session or any session variables.  Everything else is
 working well.

 It was giving me an error because i didn't have a tmp folder on the
 root of my C drive.

 Now I don't get any errors, it just won't start a session.

 I'm sure it has something to do with my php.ini file

 Any help?

 Thanks!!!



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




Re: [PHP] [php] How to get request url string and server hostname

2002-06-25 Thread Jason Wong

On Wednesday 26 June 2002 02:56, Harriet Xing wrote:
 Hi,

 Would anyone know how to get the http request url string in php?
 i.e., if the request is http://www.myserver.com/test.php?param1=123;, how
 can I obtain this string in test.php?

Look through the $_SERVER (or $HTTP_SERVER_VARS) variable.

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

/*
The District of Columbia has a law forbidding you to exert pressure on
a balloon and thereby cause a whistling sound on the streets.
*/


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




  1   2   >