RE: [PHP] From static to dynamic

2001-11-19 Thread Steven Katz

I've been asked by a few to explain further what I'd like to do.

I'd like to accomplish the entire 183-page site with 2 pages: the 
home page and a catalog template.

The home page, which features an item-of-the-day from the catalog 
and past 3 featured items, would choose a random item from the 
database once each day. The past 3 featured items would be 
updated accordingly. Following any of the 20 links to various 
sections of the catalog would return page 1 of x pages of that 
section of the catalog. Each catalog page would display a maximum 
of 9 items with Next and Back buttons when needed. The basic 
layout of the catalog template is a 3x3 table.

Additional questions:

3. I'd rather not spend the time developing an administrative 
interface for managing the content of the catalog right now. How 
difficult will it be for me, a typical customer of a typical web 
hosting service, to manage the content by other means? Can the 
database reside within my html docs dir, where I can access it? 
If so, can I download, modify, and upload it as needed?

4. Am I likely to find anyone here that might be interested in 
taking this on in exchange for a brand-new color Casio 
Wrist-Camera? Anyone interested in seeing (sent privately) some 
pictures I took with the older black & white model? It's so cool.

Steven


-Original Message-
From: Steven Katz <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 7:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] From static to dynamic


I have a site which consists of a few hundred catalog pages. The 
items in the catalog are pictured 9 to a page with accompanying 
descriptions. The homepage features an item-of-the-day, as well 
as the past 3 featured items. The entire site is static and 
regularly updated manually by me. I don't believe it'll take much 
to fully automate the site, which is what I plan to do, or have 
done, over the next week or so. Now for my questions:

1. The dynamically-generated pages must remain indexable by 
search engines. That is, indexing robots must be able to crawl 
the entire site by following the various links to all of the 
catalog pages. Do the strings that are passed through the URL 
appear to search engines as dynamic, and therefore get ignored?

2. It's important that the site remain easily portable from one 
host to another. I have no plans to move it, but it would be nice 
to know that it would be a simple matter of plunking it down 
somewhere else if I needed to. Is there any advantage to using a 
flat file over mysql in terms of portability? How significantly 
would performance be affected, considering that it's not likely 
there will ever be more than 1000 catalog items (rows)?

I'd be interested in hearing how you'd put this together.

Steven


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MS Exchange

2001-11-19 Thread Kurt Lieber

On Monday 19 November 2001 10:19 pm, Benj Arriola wrote:
> On the php.ini, if there is no SMTP server
> and MS Exchange is used, what changes are needed
> to be done on the php.ini file?

MS Exchange has supported SMTP since (at least) version 4.0 and possibly even 
since the old MS Mail days.  

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-WIN] Re: Read Session in ASP in PHP

2001-11-19 Thread George Pitcher

> Sorry, I'm a PHP newbie.  The only way I know you can pass values to a php
> script is the normal way, through the URL, as in:  a
> href=yourscript.php?var1=value&var2=value... etc.

Not strictly true.

I am primarily a Lasso developer and I can pass values (and do) using Form,
URL and Cookies. In Lasso Cookies are not set in the headers or as part of
an explicit session instruction, but rather just like setting a global
variable, but obviously linked to the user's session.

George, also a php newbie, but constantly wowed by what appears possible
with it

"anch.org" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Sorry, I'm a PHP newbie.  The only way I know you can pass values to a php
> script is the normal way, through the URL, as in:  a
> href=yourscript.php?var1=value&var2=value... etc.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] MS Exchange

2001-11-19 Thread Benj Arriola

Hello Guys!

On the php.ini, if there is no SMTP server
and MS Exchange is used, what changes are needed
to be done on the php.ini file?

thanks,

Benj


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: SV: [PHP] fopen "r+" not working - how to add to beginning of txt file

2001-11-19 Thread David Robley

On Tue, 20 Nov 2001 14:41, Brian Tully wrote:
> not sure I know how to do this...
>
> do you mean to open the file twice? once to read it and put it into a
> variable and then close the file and open it again, this time for
> writing?
>
> I'm confused. this seems so much harder than it would be with Perl. But
> I really want to stick with PHP. Can anyone help me out here? I've
> looked the manual over and over, and checked the php.net website, but
> nothing covers the situation where you want to add text to the TOP of a
> file. fopen with the r+ option is not working the way it should.
>
> I'd be eternally grateful...
>
> brian

I think you misunderstand the r+ flag. You said
> >> What happens is that the line does get written to the top of the
> >> page but it
> >> overwrites or deletes some of the existing text. Even though the r+
> >> option is supposed to put the pointer at the beginning of the file
> >> and add to it as
> >> opposed to overwriting it doesn't seem to be working for me.

"r+’ - Open for reading and writing; place the file pointer at the 
beginning of the file."

Now, nowhere does the docs say 'and add to it'; what happens is that the 
pointer is placed at the beginning of the file _and anything written to 
the file is overwritten there_. You just can't insert lines in a file 
like that; and that isn't a restriction of PHP, it's the way OSes in 
general work. So if you want to add a line at the beginning of the file, 
you need to read the entire file into a variable, prepend the stuff you 
want to add and then write out the whole lot to the file.

You could probably simplify the process a bit by using file() to read the 
file into an array, then adding that array to the array of stuff you want 
at the beginning of the file and then writing the whole array out to 
file; that way you only have to do one fopen.

I dunno how you would do it in PERL, but the principle is the same at the 
coalface - perhaps PERL hides a bit of the work from you??

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Darth Vader sleeps with a Teddywookie.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: SV: [PHP] fopen "r+" not working - how to add to beginning of txt file

2001-11-19 Thread David Robley

On Tue, 20 Nov 2001 14:41, Brian Tully wrote:

> On 11/19/01 6:45 PM, "Phelps" <[EMAIL PROTECTED]> wrote:
> > load the content of the file into an variable first and then add the
> > new text part into it.
> >
> > something like this:
> >
> > $text = $newtext + $text;
> >
> > then save it... It should work...
> >
> > P.
> >
> >> -Ursprungligt meddelande-
> >> Från: Brian Tully [mailto:[EMAIL PROTECTED]]
> >> Skickat: den 19 november 2001 22:03
> >> Till: PHP
> >> Ämne: [PHP] fopen "r+" not working - how to add to beginning of txt
> >> file
> >>
> >>
> >> hey there -
> >>
> >> i've been going crazy trying to figure out how to add news items
> >> to the top
> >> of an already existing txt file containng previous news posts. While
> >> I'd love to change the system so everything is database-driven (as
> >> most of the rest of the site is), this news area has so much news
> >> posts that it would take forever to convert the info the database.
> >>
> >> SO... i want to just create a simple script that adds text to the
> >> beginning
> >> of an existing text file, without overwriting any previous text
> >> in the file.
> >> The manual and php site refer to using the fopen function with
> >> the r+ option
> >> - which i've done, BUT some if the text still gets overwritten
> >> with the new
> >> next.
> >>
> >> here's what I'm using:
> >>
> >>  >>
> >> $today = getdate();
> >> $month = $today[month];
> >> $mday = $today[mday];
> >> $year = $today[year];
> >>
> >>
> >> if ($fp = fopen("/home/foo/www/whats_new/whats_new2.txt", "r+")) {
> >>
> >> fwrite($fp, "this is the new line of text I want to add to the
> >> top of the page");
> >>
> >> fclose($fp);
> >>
> >> print "success!";
> >>
> >> }
> >>
> >> else {
> >>
> >> print "Could not open What\'s New file for updating.";
> >>
> >> }
> >>
> >> ?>
> >>
> >>
> >> What happens is that the line does get written to the top of the
> >> page but it
> >> overwrites or deletes some of the existing text. Even though the r+
> >> option is supposed to put the pointer at the beginning of the file
> >> and add to it as
> >> opposed to overwriting it doesn't seem to be working for me.
> >>
> >> What am I doing wrong?
> >>
> >> Is there a better way to accomplish what I'm trying to do?
> >>
> >> any help would be GREATLY appreciated!
> >>
> >> regards,
> >> brian
> not sure I know how to do this...
>
> do you mean to open the file twice? once to read it and put it into a
> variable and then close the file and open it again, this time for
> writing?
>
> I'm confused. this seems so much harder than it would be with Perl. But
> I really want to stick with PHP. Can anyone help me out here? I've
> looked the manual over and over, and checked the php.net website, but
> nothing covers the situation where you want to add text to the TOP of a
> file. fopen with the r+ option is not working the way it should.
>
> I'd be eternally grateful...
>
> brian
>-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   (C) 1992 Wild Bill's Machine Gun Shop and House of Wax.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: SV: [PHP] fopen "r+" not working - how to add to beginning oftxt file

2001-11-19 Thread Brian Tully

not sure I know how to do this...

do you mean to open the file twice? once to read it and put it into a
variable and then close the file and open it again, this time for writing?

I'm confused. this seems so much harder than it would be with Perl. But I
really want to stick with PHP. Can anyone help me out here? I've looked the
manual over and over, and checked the php.net website, but nothing covers
the situation where you want to add text to the TOP of a file. fopen with
the r+ option is not working the way it should.

I'd be eternally grateful...

brian



On 11/19/01 6:45 PM, "Phelps" <[EMAIL PROTECTED]> wrote:

> load the content of the file into an variable first and then add the new
> text part into it.
> 
> something like this:
> 
> $text = $newtext + $text;
> 
> then save it... It should work...
> 
> P.
> 
>> -Ursprungligt meddelande-
>> Från: Brian Tully [mailto:[EMAIL PROTECTED]]
>> Skickat: den 19 november 2001 22:03
>> Till: PHP
>> Ämne: [PHP] fopen "r+" not working - how to add to beginning of txt file
>> 
>> 
>> hey there -
>> 
>> i've been going crazy trying to figure out how to add news items
>> to the top
>> of an already existing txt file containng previous news posts. While I'd
>> love to change the system so everything is database-driven (as most of the
>> rest of the site is), this news area has so much news posts that it would
>> take forever to convert the info the database.
>> 
>> SO... i want to just create a simple script that adds text to the
>> beginning
>> of an existing text file, without overwriting any previous text
>> in the file.
>> The manual and php site refer to using the fopen function with
>> the r+ option
>> - which i've done, BUT some if the text still gets overwritten
>> with the new
>> next.
>> 
>> here's what I'm using:
>> 
>> > 
>> $today = getdate();
>> $month = $today[month];
>> $mday = $today[mday];
>> $year = $today[year];
>> 
>> 
>> if ($fp = fopen("/home/foo/www/whats_new/whats_new2.txt", "r+")) {
>> 
>> fwrite($fp, "this is the new line of text I want to add to the top of
>> the page");
>> 
>> fclose($fp);
>> 
>> print "success!";
>> 
>> }
>> 
>> else {
>> 
>> print "Could not open What\'s New file for updating.";
>> 
>> }
>> 
>> ?>
>> 
>> 
>> What happens is that the line does get written to the top of the
>> page but it
>> overwrites or deletes some of the existing text. Even though the r+ option
>> is supposed to put the pointer at the beginning of the file and
>> add to it as
>> opposed to overwriting it doesn't seem to be working for me.
>> 
>> What am I doing wrong?
>> 
>> Is there a better way to accomplish what I'm trying to do?
>> 
>> any help would be GREATLY appreciated!
>> 
>> regards,
>> brian
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> 
> 
> 
> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] floating point exception after php 4 upgrade on raq 2

2001-11-19 Thread Paul Schreiber

Old config:
Apache/1.3.12 (Unix) mod_auth_pam/1.0a PHP/3.0.15 configured

New config:
Apache/1.3.22 (Unix) mod_auth_pam/1.0a PHP/4.0.6 configured

>From /var/log/httpd/error:
[Mon Nov 19 19:53:19 2001] [notice] child pid 30261 exit signal Floating 
point exception (8)
[Mon Nov 19 19:53:34 2001] [notice] child pid 30263 exit signal Floating 
point exception (8)
[Mon Nov 19 19:53:40 2001] [notice] child pid 30264 exit signal Floating 
point exception (8)
[Mon Nov 19 19:53:41 2001] [notice] child pid 30262 exit signal Floating 
point exception (8)

# uname -a
Linux www 2.0.34 #1 Thu Feb 25 21:04:19 PST 1999 mips unknown

# gcc -v
Reading specs from /usr/lib/gcc-lib/mipsel-redhat-linux/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)


What's going on / how do I fix this / what other information do you need?


Paul

 shad 96c / uw cs 2001 / mac activist / eda / fumbler
fan of / jewel / sophie b. / sarah slean / steve poltz / emm gryner /
   / x-files / buffy / dawson's creek / habs / bills / 49ers /
 
 t h i n k  d i f f e r e n t.

"I've heard about your witness protection program -- it's called
 woodlawn cemetary." -- as heard on Law & Order


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: \|/ $PHP_SELF

2001-11-19 Thread Fred


Gerry Figueroa Anadon <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does $PHP_SELF always get's the path of the document it resides in even if
the document is an include?

$PHP_SELF will always give the name and path of the main file, even if the
variable is set in an included file.  The reason is that the included file
is included before the variable is evaluated.

Fred



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] \|/ $PHP_SELF

2001-11-19 Thread Gerry Figueroa Anadon

Does $PHP_SELF always get's the path of the document it resides in even if the 
document is an include?

I'm trying to set one of those breadcrumb path navigation scripts and I don't want to 
copy the
script to every directory, I just want to include it in my header.inc.

As a result I only get the home directory link that way.

I tryed using a variable like  $string=$PHP_SELF; then in the script I replaced the 
line:

$str=$PHP_SELF; with $str=$string; , but it turn out as an empty variable.

Here is the original unaltered php:

$site = "http://".$HTTP_HOST."/";; 
 //$site = "http://site.com";; 
 
$str=$PHP_SELF;

ereg("^(.+)/.+\\..+$", $str, $part); 
$str = $part[1]; 
$str = substr($str, 1); 

$label =  array("home"=>"Home",
"anunciate"=>"Anunciate", 
 "encuentreMedico"=>"Encuentre un Medico", 
 "anunciateHospital"=>"Anunciate Hospital", 
 "anunciateMedico"=>"Anunciate Medico", 
 "article"=>"Article", 
 "encuentreHospital"=>"Encuentre un Hospital"); 
 
if (ereg('/', $str)){ 
$arr = split("/", $str); 
$num = count($arr); 
for($i=0; $i < $num; ++$i){ 
echo(" > ".$label[$arr[$i]].""); 
$site = $site . $arr[$i] ."/"; 
} 
}elseif (ereg("[a-zA-Z_]{1,}$",$str)){ 
$arr = $str; 
echo(" > http://".$HTTP_HOST."/".$arr."/\";>".$label[$arr].""); 
}else{ 
echo(""); 
} 

Thanks:

Gerry Figueroa
Dynamic Intermedia

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange variable.....

2001-11-19 Thread Gerard Samuel

That explains it all.  Thanks

David Robley wrote:

> On Tue, 20 Nov 2001 14:13, Gerard Samuel wrote:
> 
>>Hey all.  Im debugging a script that was written by someone else, and
>>alot of the variable has 2 '$$' in it.  For example a varible is
>>intialised and used as $$string.  I haven't been using php for that
>>long, but I haven't seen anything like this.  Whats the story with
>>variables with $$ in them??
>>Thanks..
>>
> 
> They are variable variables. Check out 
> http://www.php.net/manual/en/language.variables.variable.php for more info
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Strange variable.....

2001-11-19 Thread Fred

Look in the Manual under Variable Variables.

Fred

Gerard Samuel <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey all.  Im debugging a script that was written by someone else, and
> alot of the variable has 2 '$$' in it.  For example a varible is
> intialised and used as $$string.  I haven't been using php for that
> long, but I haven't seen anything like this.  Whats the story with
> variables with $$ in them??
> Thanks..
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general@lists.php.net

2001-11-19 Thread Fred


> Anything coming via get/post is a string, regardless of what it looks
> like :-).
>
That is the conclusion I have drawn.  However, the variables are
automatically transformed based on the context in which they are used.
Mathmatic operators and functions work flawlessly with numbers passed via
GET without the need for casting.  That is just not the case with the
bitwise operators.

Fred



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Strange variable.....

2001-11-19 Thread David Robley

On Tue, 20 Nov 2001 14:13, Gerard Samuel wrote:
> Hey all.  Im debugging a script that was written by someone else, and
> alot of the variable has 2 '$$' in it.  For example a varible is
> intialised and used as $$string.  I haven't been using php for that
> long, but I haven't seen anything like this.  Whats the story with
> variables with $$ in them??
> Thanks..

They are variable variables. Check out 
http://www.php.net/manual/en/language.variables.variable.php for more info
-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   People are more than fun than anybody.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] configure problem

2001-11-19 Thread David Robley

On Tue, 20 Nov 2001 13:39, Chip wrote:
> On Monday 19 November 2001 15:54, David Robley wrote:
> > On Tue, 20 Nov 2001 01:11, Chip wrote:
> > > I am setting up a new system for a friend and am getting the
> > > following error when running ./configure -
> > >
> > > /usr/libexec/elf/ld: cannot find -lgd.
> > > error code 1
> > >
> > > This machine is a default install of FreeBSD4.4, Apache-1.3.22,
> > > MySQL-3.23.44 and PHP-4.0.6. I have set this same system up on
> > > several other machines and have never come across this error.
> > > What am I missing that is causing this problem?
> > > --
> > > Chip W.
> >
> > It would appear that you don't have gd on that machine, or it is not
> > where the config is expecting to find it.
>
> Well it's working now, and not because I didn't have gd installed, I
> did, do. I downloaded php-4.0.5 and ran the exact same ./configure line
> as in 4.0.6 and it installed just fine, had no problem finding
> everything. Could there be a problem in 4.0.6 I wonder?
> --
> Chip W.

FWIW Rasmus posted this about gd 2.01 and 4.0.6 a while back:

Build gd-2.0.1 with these two lines in your GD2 Makefile:

CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE
LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm

Don't install the lib anywhere, just leave them in the gd-2.0.1 directory.

Then build PHP using:

--with-gd=/home//gd-2.0.1
--with-freetype-dir=/usr
--enable-gd-native-ttf   (note there was a typo in 4.0.6 on this one)
use: --enable-gd-native-tt  if you are using 4.0.6
--enable-gd-imgstrttf
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-xpm-dir=/usr/X11R6

This assumes that you have freetype2 installed along with the libjpeg and
libpng libs under /usr

-Rasmus

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   "Dinna wave that axe aboot, Jimmy!" said Tom heedlessly.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Strange variable.....

2001-11-19 Thread Gerard Samuel

Hey all.  Im debugging a script that was written by someone else, and 
alot of the variable has 2 '$$' in it.  For example a varible is 
intialised and used as $$string.  I haven't been using php for that 
long, but I haven't seen anything like this.  Whats the story with 
variables with $$ in them??
Thanks..


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: From static to dynamic

2001-11-19 Thread Fred

To answer your first question, some search engines, such as Google,  will
crawl URLs that contain GET variables.  Others will not.  There is a way
around this by creating links such as index.php?/Men/Shirts/Blue/XLarge and
using the $PATH_INFO variable to parse the URL and spit out the needed
variables.

As for your second question, I can think of no legitimate reason to use flat
files rather than a database.  If you switch hosts you can easily transfer
the database as well as the scripts.  Most hosts have MySQL and if they
don't they just are not worth using.  Hosts are a dime a dozen these days
and you can easily find some that have MySQL.


Steven Katz <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a site which consists of a few hundred catalog pages. The
> items in the catalog are pictured 9 to a page with accompanying
> descriptions. The homepage features an item-of-the-day, as well
> as the past 3 featured items. The entire site is static and
> regularly updated manually by me. I don't believe it'll take much
> to fully automate the site, which is what I plan to do, or have
> done, over the next week or so. Now for my questions:
>
> 1. The dynamically-generated pages must remain indexable by
> search engines. That is, indexing robots must be able to crawl
> the entire site by following the various links to all of the
> catalog pages. Do the strings that are passed through the URL
> appear to search engines as dynamic, and therefore get ignored?
>
> 2. It's important that the site remain easily portable from one
> host to another. I have no plans to move it, but it would be nice
> to know that it would be a simple matter of plunking it down
> somewhere else if I needed to. Is there any advantage to using a
> flat file over mysql in terms of portability? How significantly
> would performance be affected, considering that it's not likely
> there will ever be more than 1000 catalog items (rows)?
>
> I'd be interested in hearing how you'd put this together.
>
> Steven
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general@lists.php.net

2001-11-19 Thread David Robley

On Tue, 20 Nov 2001 13:12, Fred wrote:
> OK, it seems as though I was on the right track.  I cast the variables
> as integers and all is well.  Thanks to Rasmus and his msg:
> http://www.phpbuilder.com/mail/php-developer-list/199901/0485.php
>
> A question remains: why are variables that are initially set to numbers
> not cast as integers?
>
> According to the manual variables are initially cast as integers if
> they are created with an assignment to an integer number.  While this
> is the case with variables assigned in code (i.e. $One = 16) it appears
> not to be the case with GET variables passed via the URL.

Anything coming via get/post is a string, regardless of what it looks 
like :-).

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   "This is the Netherlands," Tom stated flatly.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] From static to dynamic

2001-11-19 Thread Steven Katz

I have a site which consists of a few hundred catalog pages. The 
items in the catalog are pictured 9 to a page with accompanying 
descriptions. The homepage features an item-of-the-day, as well 
as the past 3 featured items. The entire site is static and 
regularly updated manually by me. I don't believe it'll take much 
to fully automate the site, which is what I plan to do, or have 
done, over the next week or so. Now for my questions:

1. The dynamically-generated pages must remain indexable by 
search engines. That is, indexing robots must be able to crawl 
the entire site by following the various links to all of the 
catalog pages. Do the strings that are passed through the URL 
appear to search engines as dynamic, and therefore get ignored?

2. It's important that the site remain easily portable from one 
host to another. I have no plans to move it, but it would be nice 
to know that it would be a simple matter of plunking it down 
somewhere else if I needed to. Is there any advantage to using a 
flat file over mysql in terms of portability? How significantly 
would performance be affected, considering that it's not likely 
there will ever be more than 1000 catalog items (rows)?

I'd be interested in hearing how you'd put this together.

Steven


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] configure problem

2001-11-19 Thread Chip

On Monday 19 November 2001 15:54, David Robley wrote:
> On Tue, 20 Nov 2001 01:11, Chip wrote:
> > I am setting up a new system for a friend and am getting the following
> > error when running ./configure -
> >
> > /usr/libexec/elf/ld: cannot find -lgd.
> > error code 1
> >
> > This machine is a default install of FreeBSD4.4, Apache-1.3.22,
> > MySQL-3.23.44 and PHP-4.0.6. I have set this same system up on several
> > other machines and have never come across this error.
> > What am I missing that is causing this problem?
> > --
> > Chip W.
>
> It would appear that you don't have gd on that machine, or it is not
> where the config is expecting to find it.

Well it's working now, and not because I didn't have gd installed, I did, do. 
I downloaded php-4.0.5 and ran the exact same ./configure line as in 4.0.6 
and it installed just fine, had no problem finding everything. Could there be 
a problem in 4.0.6 I wonder?
--
Chip W.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP4 sessions and Netscape 4.75/Mac

2001-11-19 Thread jimmy elab

> Dennis Moore wrote:
> > 
> Any ideas or clues?
> 

Turn on cookies

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general@lists.php.net

2001-11-19 Thread Fred

OK, it seems as though I was on the right track.  I cast the variables as
integers and all is well.  Thanks to Rasmus and his msg:
http://www.phpbuilder.com/mail/php-developer-list/199901/0485.php

A question remains: why are variables that are initially set to numbers not
cast as integers?

According to the manual variables are initially cast as integers if they are
created with an assignment to an integer number.  While this is the case
with variables assigned in code (i.e. $One = 16) it appears not to be the
case with GET variables passed via the URL.

It may appear that GET variables passed via the URL are cast as integers if
you do simple arithmatic or comparison, however it seems to me that they are
cast as integers because of the context of the math or comparison operators.

The bitwise operators, on the other hand, do not seem to cast the GET
variables as integers and require that they be cast before the expected
result can be had.  I am not sure if this was intentional, but it certainly
is confusing.  I think a blurb in the manual would be very helpful.

Fred



Fred <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have 17 boolean variables which need to be stored in a MySQL database.
I
> created a SET Column to store each of the boolean values as bits in the
> column.  I should be able to test for the truth of a particular variable
by
> checking if the corresponding bit is set.
>
> For example, if the first four variables are set (i.e. Column = a,b,c,d)
> then the numeric value of the column is 15 or . To test for c I would
> check to see if the third bit (4 or 100) is set.
>
> I chose to do the check this way:
>
> if ($One & $Two == $One) echo "True";
>
> This does not seem to work in many instances.  Take the example above:
> 4 and 15 should equal 4
> 0100 and
>  equals
> 0100
>
> For some reason, my script gives  as the result of 0100 and .  It
is
> fairly clear that this is not the correct behavior of the bitwise &
> operator.
>
> Oddly enough, in some instances is works as expected:
> 16 and 17 should equal 16
> 1 and
> 10001 equals
> 1
>
> My script has no problem generating the expected result here.
>
> Perhaps this problem arises from the loosely typed nature of PHP
variables,
> but I do not see how it could.  Any pointers would be appreciated.
>
> Fred
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP4 sessions and Netscape 4.75/Mac

2001-11-19 Thread Dennis Moore



Has anyone run into the following?
 
 
I have set up a site using PHP4.0.6 sessions.  
Everything runs fine with IE and Netscape on PC and UNIX.  However, I 
lose the session when using Netscape 4.75 on Mac. 
 
Any ideas or clues?
 
Thx...
   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP] IP Address Converted to Computer Name

2001-11-19 Thread David Robley

On Tue, 20 Nov 2001 11:38, Ben Clumeck wrote:
> Thanks for your response David.  I am new to PHP.  Are you saying that
> the code would look like this:
>  gethostname for $IPADDR;
> if $HOSTNAME = $IPADDR
> print "$HOSTNAME"
> ?>
> Would I then put the $HOSTNAME into my mail() script.  Sorry for the
> trouble.
>
> Ben
>
> -Original Message-
> From: David Robley [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 19, 2001 4:29 PM
> To: Ben Clumeck; [EMAIL PROTECTED]
> Subject: Re: [PHP] IP Address Converted to Computer Name
>
> On Tue, 20 Nov 2001 04:08, Ben Clumeck wrote:
> > I am trying to convert an ip address to a computer name.  Then I am
> > putting it into the mail() script.  However, when I do this it come
> > up blank.  I am putting $r_hostname in the mail() script.  Can anyone
> > tell me why its not working?  The script I am using is:
> >  > $r_hostname = gethostbyaddr($REMOTE_ADDR);
> > if ($REMOTE_ADDR == "$r_hostname");
> > echo "$r_hostname";
> > ?>
> >
> > Thanks,
> >
> > Ben
>
> Remember that not all IP adrresses will resolve to a hostname. That
> said, there may be a flaw in your logic in the code snippet above :-)
>
> What you are saying is:
>
> gethostname for IPADDR;
> if HOSTNAME = IPADDR
> print HOSTNAME
>
> which will only work if the resolved hostname is the same as the IP
> address; I suspect that is not what you want?

When you reply, can you put your response at the bottom? Makes it ieasier 
to read the chronological story. Yes, I know Outhouse puts you at the top 
- another 'feature' from MS.

No, I am not saying the code should look like that; what I wrote is 
pseudocode that just tells what the flow of logic is.

To put it simply, you are only asking for $r_hostname to be echoed, in 
that particular code snippet, if the value in $r_hostname is the same as 
the IP address. And I notice there is a syntax error or three in your 
snippet.

Now I guess that what you want to do is to add the remote hostname to the 
email only if it resolves and you get back a hostname rather than an IP 
address? If that is the case, then you want something like:



Note the curly brackets around the contents of the IF.

If you substitute the IP addresses 129.96.218.127 and 129.96.218.27 for 
$REMOTE_ADDR you'll see the first returns a hostname and the second 
returns just the IP address, so the first will print a hostname and the 
second won't.


-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   NEWS! Stolen painting found by tree

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general@lists.php.net

2001-11-19 Thread Fred

I have 17 boolean variables which need to be stored in a MySQL database.  I
created a SET Column to store each of the boolean values as bits in the
column.  I should be able to test for the truth of a particular variable by
checking if the corresponding bit is set.

For example, if the first four variables are set (i.e. Column = a,b,c,d)
then the numeric value of the column is 15 or . To test for c I would
check to see if the third bit (4 or 100) is set.

I chose to do the check this way:

if ($One & $Two == $One) echo "True";

This does not seem to work in many instances.  Take the example above:
4 and 15 should equal 4
0100 and
 equals
0100

For some reason, my script gives  as the result of 0100 and .  It is
fairly clear that this is not the correct behavior of the bitwise &
operator.

Oddly enough, in some instances is works as expected:
16 and 17 should equal 16
1 and
10001 equals
1

My script has no problem generating the expected result here.

Perhaps this problem arises from the loosely typed nature of PHP variables,
but I do not see how it could.  Any pointers would be appreciated.

Fred



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Link Request

2001-11-19 Thread Stone Reuning


We at SEO Advantage have chosen to include your web site in the SEO Advantage 
Directory.

While that was not done contingent upon your linking to our web site, we would really 
appreciate it if you would link to www.seoadvantage.com.  We will be happy to provide 
you with any information you need and we do appreciate your consideration.


We have added your website's listing to the SEO Advantage Directory.  You will find 
our link to your web site here:
http://www.seoadvantage.com/links/themeindex.html.

The listing is in the Web Development category at this page:
http://seoadvantage.com/links/webdevelopment.html.

Our website is:
http://seoadvantage.com/.

Please let us know if you will be able to link back to us.  When we can confirm your 
link to our web site, we will upgrade you to Partner status!

Thanks so much for your consideration.

Regards,
Stone Reuning
[EMAIL PROTECTED]
http://seoadvantage.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] IP Address Converted to Computer Name

2001-11-19 Thread Ben Clumeck

Thanks for your response David.  I am new to PHP.  Are you saying that the
code would look like this:

Would I then put the $HOSTNAME into my mail() script.  Sorry for the
trouble.

Ben

-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 4:29 PM
To: Ben Clumeck; [EMAIL PROTECTED]
Subject: Re: [PHP] IP Address Converted to Computer Name


On Tue, 20 Nov 2001 04:08, Ben Clumeck wrote:
> I am trying to convert an ip address to a computer name.  Then I am
> putting it into the mail() script.  However, when I do this it come up
> blank.  I am putting $r_hostname in the mail() script.  Can anyone tell
> me why its not working?  The script I am using is:
>  $r_hostname = gethostbyaddr($REMOTE_ADDR);
> if ($REMOTE_ADDR == "$r_hostname");
> echo "$r_hostname";
> ?>
>
> Thanks,
>
> Ben

Remember that not all IP adrresses will resolve to a hostname. That said,
there may be a flaw in your logic in the code snippet above :-)

What you are saying is:

gethostname for IPADDR;
if HOSTNAME = IPADDR
print HOSTNAME

which will only work if the resolved hostname is the same as the IP
address; I suspect that is not what you want?

--
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

   Bald: follicularly challenged.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] IP Address Converted to Computer Name

2001-11-19 Thread David Robley

On Tue, 20 Nov 2001 04:08, Ben Clumeck wrote:
> I am trying to convert an ip address to a computer name.  Then I am
> putting it into the mail() script.  However, when I do this it come up
> blank.  I am putting $r_hostname in the mail() script.  Can anyone tell
> me why its not working?  The script I am using is:
>  $r_hostname = gethostbyaddr($REMOTE_ADDR);
> if ($REMOTE_ADDR == "$r_hostname");
> echo "$r_hostname";
> ?>
>
> Thanks,
>
> Ben

Remember that not all IP adrresses will resolve to a hostname. That said, 
there may be a flaw in your logic in the code snippet above :-)

What you are saying is:

gethostname for IPADDR;
if HOSTNAME = IPADDR
print HOSTNAME

which will only work if the resolved hostname is the same as the IP 
address; I suspect that is not what you want?

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Bald: follicularly challenged.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] exporting

2001-11-19 Thread Matthew Loff


I always stick with PHP for web apps, but I am in a similar situation, I
have to write a script that generates statistics and item reports from a
database... The client wanted them in Excel format... I could have done
CSV, but for the sake of aesthetics, I decided to go with a native Excel
export... The best way of doing it is writing it in Perl with the
SpreadSheet::WriteExcel module.

Take a look at it...  I was quite impressed.


-Original Message-
From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 19, 2001 5:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP] exporting


hey guys..

does anyone have any ideas on how to export information from a mysql
database to microsoft word, excel, access, note pad or any other such
application?


Regards,
Kunal Jhunjhunwala


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] [newbie] passing variables

2001-11-19 Thread Kodrik

you have 


You have twice "action" and are missing the "method".
In your case, I guess it would be "get".

I didn't read on, so you might have more errors.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] configure problem

2001-11-19 Thread David Robley

On Tue, 20 Nov 2001 01:11, Chip wrote:
> I am setting up a new system for a friend and am getting the following
> error when running ./configure -
>
> /usr/libexec/elf/ld: cannot find -lgd.
> error code 1
>
> This machine is a default install of FreeBSD4.4, Apache-1.3.22,
> MySQL-3.23.44 and PHP-4.0.6. I have set this same system up on several
> other machines and have never come across this error.
> What am I missing that is causing this problem?
> --
> Chip W.

It would appear that you don't have gd on that machine, or it is not 
where the config is expecting to find it.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   "Someone removed all the twos from this deck," Tom deduced.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mail charset conversion

2001-11-19 Thread Martín Marqués

On Lun 19 Nov 2001 17:45, you wrote:
> I have a small script that recieves mails and does some work with it. What
> it has to do, it does it great, for now. The problem is that some lines
> come in encoded (at least thats my thought). For example:
>
> Martín Marqués -> =?iso-8859-1?q?Mart=EDn=20Marqu=E9s?=

Unfortunetly, I have to responde to my own mail. :-)

The function I was looking for is quoted_printable_decode(string str), but if 
I apply it to all the string, I don't get what I want. Shouldn't this 
function see the =?iso-8859-1?q? and decode from there on, or do I have to do 
by hand with regular expressions?

By the way, isn't it different if the charset used is different? I mean, it's 
crear that I'm using iso-8859-1 here, but some one else could be using some 
other charset. Does it make a difference?

Saludos... :-)

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] phptriad / apache on windows question

2001-11-19 Thread Brian Clark

Hi Christian,

@ 6:15:59 PM on 11/19/2001, christian calloway wrote:

cc> I just downloaded phptriad, which installs apache/php/mysql/perl on a win
cc> system. Im not sure on the language, but I want to be able to define virtual
cc> directories. Currently everything under /apache/htdocs/ is accessible from
cc> the browser, ie test.php located at c:\apache\htdocs\test.php can be
cc> accessed on the browser url at http://localhost/test.php. Now if I wanted to
cc> define say the directory web located at d:\code\web so that I could type
cc> http://localhost/web/somephpfile.php in my browser how would I go about
cc> making that association. Thanks,

Try this after your main document root  in httpd.conf:


Options Indexes
AllowOverride None
Order allow,deny
Allow from all


Alias /web "D:/code/web"

Been a while but I think that'll do it. If you don't want the
directory listing take out Options Indexes.

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] [newbie] passing variables

2001-11-19 Thread Dean Householder

Well for one

> echo "\t  value='".stripslashes($first)."'>\n";
> echo "\t  value='".stripslashes($last)."'>\n";

Both of these fields are called 'first' instead of 'first' and 'last' so the
last name is actually overwriting your first name.
Secondly, you are not using proper php variables into
delete_entry_confirm.php.  I'm guessing that this is an .html file because I
don't see an 'echo' statement in front, so the only way to send the
variables without using php code is to populate data in a form using hidden
input fields and a submit button called delete, or to use php and send the
variables like this:

echo 'DELETE';

Good luck.
Dean Householder
http://www.daylightcreations.com


"pjc" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I just started playing with PHP and MySQL and am building an online
> phonebook for myself.
>
> From my 'view_all_numbers.php' I have a link that looks something like
this:
> 
href="delete_entry_confirm.php?first=yourfirstname&last=yourlastname">DELETE
> 
>
> Here is the code from delete_entry_confirm.php
>  echo "Are you sure you want to delete ";
> echo "".$first." ".$last."";
> echo "from the phonebook?\n\n";
> echo "\n";
> echo "\t  value='".stripslashes($first)."'>\n";
> echo "\t  value='".stripslashes($last)."'>\n";
> echo "";
> echo "  onclick='javascript:history.back();'>";
> echo "";
> ?>
> ===
> And here's the code from my delete_entry.php
>  if(!$last || !$first) {
>  echo "Something's fucked up with yo script ya
> herd...";
>  exit;
> }
>
> $db = @mysql_connect("localhost","login","pass");
>
> if (!$db)
>  {
>  echo "Database ain't workin dawg!!";
>  exit;
>  }
>
> mysql_select_db("paultest");
> $query = "delete from phonebook where last='".$last."' and
> first='".$first."'";
> $result = mysql_query($query);
> if($result)
>  echo "".mysql_affected_rows()." record(s) deleted.";
> ?>
> ===
>
> This link does work though:  href="delete_entry.php?first=yourfirstname&last=yourlastname">YES I WANT
TO
> DELETE
>
> The error that I am getting on delete_entry.php is that my variables
aren't
> there. Any suggestions folks?
>
> Thank you in advance.
> -p
>
> --
>
> Paul C
> [EMAIL PROTECTED]
> ICQ:68274240
>
> "You can't put a bag over someone's personality."
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Form results sent to file

2001-11-19 Thread Brian Clark

Hi Ben,

@ 6:08:20 PM on 11/19/2001, Ben Clumeck wrote:

BC> Does anybody have an easy script that send form results to a .txt file in
BC> comma separated format.

Be careful with commas in any of the fields. You may want to separate
the fields with something like | or :: instead.





--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] [newbie] passing variables

2001-11-19 Thread Dean Householder


- Original Message -
From: "pjc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 5:59 PM
Subject: [PHP] [newbie] passing variables


> I just started playing with PHP and MySQL and am building an online
> phonebook for myself.
>
> From my 'view_all_numbers.php' I have a link that looks something like
this:
> 
href="delete_entry_confirm.php?first=yourfirstname&last=yourlastname">DELETE
> 
>
> Here is the code from delete_entry_confirm.php
>  echo "Are you sure you want to delete ";
> echo "".$first." ".$last."";
> echo "from the phonebook?\n\n";
> echo "\n";
> echo "\t  value='".stripslashes($first)."'>\n";
> echo "\t  value='".stripslashes($last)."'>\n";
> echo "";
> echo "  onclick='javascript:history.back();'>";
> echo "";
> ?>
> ===
> And here's the code from my delete_entry.php
>  if(!$last || !$first) {
>  echo "Something's fucked up with yo script ya
> herd...";
>  exit;
> }
>
> $db = @mysql_connect("localhost","login","pass");
>
> if (!$db)
>  {
>  echo "Database ain't workin dawg!!";
>  exit;
>  }
>
> mysql_select_db("paultest");
> $query = "delete from phonebook where last='".$last."' and
> first='".$first."'";
> $result = mysql_query($query);
> if($result)
>  echo "".mysql_affected_rows()." record(s) deleted.";
> ?>
> ===
>
> This link does work though:  href="delete_entry.php?first=yourfirstname&last=yourlastname">YES I WANT
TO
> DELETE
>
> The error that I am getting on delete_entry.php is that my variables
aren't
> there. Any suggestions folks?
>
> Thank you in advance.
> -p
>
> --
>
> Paul C
> [EMAIL PROTECTED]
> ICQ:68274240
>
> "You can't put a bag over someone's personality."
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] phptriad / apache on windows question

2001-11-19 Thread christian calloway

Hi everyone,

I just downloaded phptriad, which installs apache/php/mysql/perl on a win
system. Im not sure on the language, but I want to be able to define virtual
directories. Currently everything under /apache/htdocs/ is accessible from
the browser, ie test.php located at c:\apache\htdocs\test.php can be
accessed on the browser url at http://localhost/test.php. Now if I wanted to
define say the directory web located at d:\code\web so that I could type
http://localhost/web/somephpfile.php in my browser how would I go about
making that association. Thanks,

Christian



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] query works in mysql, but not from php

2001-11-19 Thread Steve Cayford

You don't need to put in the final semi-colon when running a query from 
php. Take that out and you should be fine.

-Steve

On Monday, November 19, 2001, at 04:58  PM, Olav Drageset wrote:

> Hi
>
> $sql = "SELECT user FROM persons WHERE user = '$firstName' and domain = 
> '$domainName' ; ";
> $result = mysql_query($sql,$connection ) or die(mysql_error());
>
> Calling above lines from php returns: You have an error in SQL 
> syntax near ';'  at line 1
>
> Issuing the command
>
> SELECT user FROM persons WHERE user = 'fred' AND domain = 
> 'company.net' ;
>
> in mysql give a proper result.
>
> Can anyone explain what might be causing the error???
> regards Olav
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Form results sent to file

2001-11-19 Thread Ben Clumeck

Does anybody have an easy script that send form results to a .txt file in
comma separated format.

Thanks,

Ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] query works in mysql, but not from php

2001-11-19 Thread Christian Dechery

remove the ";" at the end...

mysql_query() doesn't need it... since it only executes on atomic command, 
the ";" is useless..

that's what's causing the error...

At 22:58 19/11/01 +, Olav Drageset wrote:
>Hi
>
>$sql = "SELECT user FROM persons WHERE user = '$firstName' and domain = 
>'$domainName' ; ";
>$result = mysql_query($sql,$connection ) or die(mysql_error());
>
>Calling above lines from php returns: You have an error in SQL syntax 
>near ';'  at line 1
>
>Issuing the command
>
>SELECT user FROM persons WHERE user = 'fred' AND domain = 'company.net' ;
>
>in mysql give a proper result.
>
>Can anyone explain what might be causing the error???
>regards Olav
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


_
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] query works in mysql, but not from php

2001-11-19 Thread Martín Marqués

On Lun 19 Nov 2001 19:58, Olav Drageset wrote:
> Hi
>
> $sql = "SELECT user FROM persons WHERE user = '$firstName' and domain =
> '$domainName' ; "; $result = mysql_query($sql,$connection ) or
> die(mysql_error());
>
> Calling above lines from php returns: You have an error in SQL syntax
> near ';'  at line 1

Through away the semicolon (;), that only tells the MySQL interpreter that 
the quiery should be executed.
In PHP, each call to the query function executes it.

Saludos... :-)

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] [newbie] passing variables

2001-11-19 Thread Brian Clark

Hi pjc,

@ 7:59:51 PM on 11/19/2001, pjc wrote:

p> The error that I am getting on delete_entry.php is that my variables aren't
p> there. Any suggestions folks?

Copy and paste the exact error message and repost it here.

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] query works in mysql, but not from php

2001-11-19 Thread Brian Clark

Hi Olav,

@ 5:58:14 PM on 11/19/2001, Olav Drageset wrote:

OD> Hi

OD> $sql = "SELECT user FROM persons WHERE user = '$firstName' and domain = 
'$domainName' ; ";

Remove the semi-colon:

$sql = "SELECT user FROM persons WHERE user = '$firstName' and domain = '$domainName'";

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] [newbie] passing variables

2001-11-19 Thread pjc

I just started playing with PHP and MySQL and am building an online
phonebook for myself.

>From my 'view_all_numbers.php' I have a link that looks something like this:
DELETE


Here is the code from delete_entry_confirm.php
Are you sure you want to delete ";
echo "".$first." ".$last."";
echo "from the phonebook?\n\n";
echo "\n";
echo "\t \n";
echo "\t \n";
echo "";
echo " ";
echo "";
?>
===
And here's the code from my delete_entry.php
Something's fucked up with yo script ya
herd...";
 exit;
}

$db = @mysql_connect("localhost","login","pass");

if (!$db)
 {
 echo "Database ain't workin dawg!!";
 exit;
 }

mysql_select_db("paultest");
$query = "delete from phonebook where last='".$last."' and
first='".$first."'";
$result = mysql_query($query);
if($result)
 echo "".mysql_affected_rows()." record(s) deleted.";
?>
===

This link does work though: YES I WANT TO
DELETE

The error that I am getting on delete_entry.php is that my variables aren't
there. Any suggestions folks?

Thank you in advance.
-p

--

Paul C
[EMAIL PROTECTED]
ICQ:68274240

"You can't put a bag over someone's personality."






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] query works in mysql, but not from php

2001-11-19 Thread Olav Drageset

Hi

$sql = "SELECT user FROM persons WHERE user = '$firstName' and domain = '$domainName' 
; ";
$result = mysql_query($sql,$connection ) or die(mysql_error()); 

Calling above lines from php returns: You have an error in SQL syntax near ';'  at 
line 1

Issuing the command

SELECT user FROM persons WHERE user = 'fred' AND domain = 'company.net' ; 

in mysql give a proper result.

Can anyone explain what might be causing the error???
regards Olav


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strip (s) from the end of the string

2001-11-19 Thread Brian Clark

Hi Justin,

@ 5:51:23 PM on 11/19/2001, Justin French wrote:

JF> Sorry, yeah, there are other 's in the string... I only want to chop
JF> the trailing ones.

>> $string = preg_replace('/()+$/i','',$string);

^^^ that'll do it then.

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strip (s) from the end of the string

2001-11-19 Thread Justin French

Sorry, yeah, there are other 's in the string... I only want to chop
the trailing ones.

Justin


Brian Clark wrote:
> 
> Hi Justin,
> 
> @ 5:20:15 PM on 11/19/2001, Justin French wrote:
> 
> JF> Some RegExp help here would be great... how do I strip one (or more)
> JF> 's from the END of a string?
> 
> Are they always at the end of the string? No more anywhere else on the
> line?
> 
> $string = str_replace('','',$string);
> $string = str_replace('','',$string);
> 
> Or maybe..
> 
> $string = preg_replace('/()+$/i','',$string);
> 
> (untested)
> 
> --
>  -Brian Clark | PGP is spoken here: 0xE4D0C7C8
>   Please, DO NOT carbon copy me on list replies.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] use PHP as a module in Apache on win9x

2001-11-19 Thread Brian Clark

Hi Gary,

@ 4:42:20 PM on 11/19/2001, Gary wrote:

G> Has anyone been able to run PHP 4.06 as a module on windows 98? Every 
G> time I have tried, using the install directions I get an error on 
G> starting Apache.It tells me it take two arguments, a module name and 
G> shared object file what am I doing wrong?

Where did you get the packages from?

Try php4win which has Apache+PHP4 with a bunch of other support
built-in. It should work `out of the box' on windows:



--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] transfer parameters

2001-11-19 Thread Brian Clark

Hi Astenios,

@ 5:35:28 PM on 11/19/2001, astenios wrote:

a> I'm trying to transfer a variable from one web-page to another

a> The source page (http://astenios.hn.org/php/wall.php) is like

a> echo '  >';
a> echo '', $row[1], '   ';

Try:






--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: OOP support

2001-11-19 Thread Chris Lee

this is fine as any of a place to ask OOP questions :)

--

  Chris Lee
  [EMAIL PROTECTED]


"Roko Roic" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I don't know if this is the right place to ask this (there is no
.news.admin
> group on news.php.net), but where is the right place to look for support
for
> OOP PHP programming.
>
> Any newsgroups, mailing lists?
>
> Maybe opening a group in this hierarchy named php.oop?? Where is the right
> place to ask for group opening?
>
> I believe there are a lot of us OOProgrammers using PHP in an OOP manner
who
> would like to share ideas, solutions and troublshooting.
>
>
> Roko
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strip (s) from the end of the string

2001-11-19 Thread Brian Clark

Hi Justin,

@ 5:20:15 PM on 11/19/2001, Justin French wrote:

JF> Some RegExp help here would be great... how do I strip one (or more)
JF> 's from the END of a string?


Are they always at the end of the string? No more anywhere else on the
line?

$string = str_replace('','',$string);
$string = str_replace('','',$string);

Or maybe..

$string = preg_replace('/()+$/i','',$string);

(untested)

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem with PARSE ERROR

2001-11-19 Thread Brian Clark

Hi Nicolas,

@ 5:26:44 PM on 11/19/2001, Nicolas Llamosas wrote:

NL> line 21à$link = mysql_connect ("localhost", "my_user", "my_pass") {
NL> or die ("Could not connect");
NL> }
NL> print ("Connected successfully");
NL> mysql_close ($link);

You want:

$link = mysql_connect ("localhost", "my_user", "my_pass") or die ("Could not connect");
print ("Connected successfully");
mysql_close ($link);

(Lose the curly braces)

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] transfer parameters

2001-11-19 Thread astenios

Hi
I'm trying to transfer a variable from one web-page to another

The source page (http://astenios.hn.org/php/wall.php) is like

echo '  ';
echo '', $row[1], '   ';

and target(http://astenios.hn.org/php/detall.php) catch it by:

$codi = urldecode($codi);
echo 'codi = ', $codi;

This do not work.

isset($codi) returns TRUE
empty($codi) returns TRUE

Something similar ocurrs with:



It seems like the variables doesn't store the values.

What I'm doing wrong??

Thank's in advance and sorry for my english.

Astenios



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: diferent data on diferent columns...

2001-11-19 Thread Romeo Manzur

I found the way...
$i = 0;
$result = mysql_query("SELECT * FROM sometable");
echo "   \n";
while($row = mysql_fetch_array($result)){
echo "".$row[id]."\n";
 if($i % 2 == 1){
  echo "  \n";
  echo "  \n";
 }
$i++;
}
echo "  \n";

I hope that this can help to somebody...

Romeo Manzur wrote:

> Hi, I wonder how could I do a script for print direfent data on
> diferents columns from a table...
> I mean this
> $result = mysql_query("SELECT * FROM xxx");
> while(($row = mysql_fetch_array($result)){
> echo "
> echo "
> echo "".$row[id]."\n";//id for the firt record ex:1
> echo "".$row[id]."\n";//id for the second record ex: 2
> echo "\n";
> echo "\n";
>
> if I do this it prints the same record value...
>
> please I need help...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Download File Problem - text not appearing on downloaded file

2001-11-19 Thread Chris Lee

I dont know if Im pointing out the obvious or if you orgot to post more
code.



--

  Chris Lee
  [EMAIL PROTECTED]



"Joe Van Meer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there. I managed to get the prompt for a file download when a user
clicks
> on a text link. The file downloads properly to the client machine, howevr,
> when I open up the file there is no content. What do I have to add to the
> following code to get the content sent back to the user?
>
> Thx Joe :)
>
> 
> header("Content-type: application/octet-stream");
> header("Content-Disposition: attachment; filename=file.txt");
>
> ?>
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with PARSE ERROR

2001-11-19 Thread Nicolas Llamosas

My browser show the message
“Parse error: parse error in C:\apache\htdocs\prueba\prueba.php on 
line 21”
when i try to connect to a mysql server (v.3.23) using the follow syntax:



I read the php manual and the mysql manual, but I can’t find the 
solution.

My server run under w98. (I installed the php triad)

Thank you

Nicolás Llamosas – Rio Cuarto, Argentina -



_
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: diferent data on diferent columns...

2001-11-19 Thread Chris Lee

echo "".$row[id]."\n";//id for the firt record ex:1
echo "".$row[name]."\n";//id for the second record ex: 2

or

echo "".$row[0]."\n";//id for the firt record ex:1
echo "".$row[1]."\n";//id for the second record ex: 2

is that what you mean?

--

  Chris Lee
  [EMAIL PROTECTED]



"Romeo Manzur" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi, I wonder how could I do a script for print direfent data on
> diferents columns from a table...
> I mean this
> $result = mysql_query("SELECT * FROM xxx");
> while(($row = mysql_fetch_array($result)){
> echo "
> echo "
> echo "".$row[id]."\n";//id for the firt record ex:1
> echo "".$row[id]."\n";//id for the second record ex: 2
> echo "\n";
> echo "\n";
>
> if I do this it prints the same record value...
>
> please I need help...
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] strip (s) from the end of the string

2001-11-19 Thread Justin French

Hi,

Some RegExp help here would be great... how do I strip one (or more)
's from the END of a string?

Many thanks,

Justin French

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] exporting

2001-11-19 Thread Jason Murray

> I need something that will do a direct transfer to word or 
> excel or the others.. not something via a cvs method..

Excel loads comma separated (CSV - CVS is something else entirely)
files happily.

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] exporting

2001-11-19 Thread Kunal Jhunjhunwala

I need something that will do a direct transfer to word or excel or the
others.. not something via a cvs method..
Regards,
Kunal Jhunjhunwala
- Original Message -
From: "Joshua Hoover" <[EMAIL PROTECTED]>
To: "Kunal Jhunjhunwala" <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 3:39 AM
Subject: Re: [PHP] exporting


> You can use something like this from MySQL:
>
> SELECT * INTO OUTFILE 'data.txt'
> FIELDS TERMINATED BY ','
> FROM ...;
>
> This will give you a comma delimited file that you can then import into
> Excel, Access, etc.
>
> You can find more out on this at:
> http://www.mysql.com/doc/L/O/LOAD_DATA.html
>
> Hope that helps.
>
> Joshua Hoover
>
> > hey guys..
> >
> > does anyone have any ideas on how to export information from a mysql
> > database to microsoft word, excel, access, note pad or any other such
> > application?
> >
> >
> > Regards,
> > Kunal Jhunjhunwala
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] exporting

2001-11-19 Thread Kunal Jhunjhunwala

hey guys..

does anyone have any ideas on how to export information from a mysql
database to microsoft word, excel, access, note pad or any other such
application?


Regards,
Kunal Jhunjhunwala


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] diferent data on diferent columns...

2001-11-19 Thread Romeo Manzur

Hi, I wonder how could I do a script for print direfent data on
diferents columns from a table...
I mean this
$result = mysql_query("SELECT * FROM xxx");
while(($row = mysql_fetch_array($result)){
echo "
echo "
echo "".$row[id]."\n";//id for the firt record ex:1
echo "".$row[id]."\n";//id for the second record ex: 2
echo "\n";
echo "\n";

if I do this it prints the same record value...

please I need help...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re: [PHP] schedule a task

2001-11-19 Thread Gab

thanks,
That's what I did, and it works fine, was just hopping to find another way
than using cron, but still as a server-side script.
Gab


"Matthew Moreton" <[EMAIL PROTECTED]> wrote in message
018c01c1713f$d98f9ab0$0100a8c0@summy">news:018c01c1713f$d98f9ab0$0100a8c0@summy...
You can launch IE with an address as a paramater from task scheduler.

Example:

C:\PROGRA~1\INTERN~1\IEXPLORE.EXE
http://somehost.com/somepath/somescript.php

Matt.


"Gab" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'll check with the tech support but nothng is mentioned on the website.
> I can transform the method into GET on the form, and could call the
script.
> The only way I see so far is using thi URL as a default page in my Win
> browser and automate sschedule the task in windows, but i don't like that.
>
>
>
>
> "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> 007f01c1713a$2a18e140$[EMAIL PROTECTED]">news:007f01c1713a$2a18e140$[EMAIL PROTECTED]...
> > you need some way of automating the process, and without cron
> automatically
> > doing things for you, you're going to be pressed for a solution...i'm
not
> > sure what you could do because you need something to do this
> > automatically...your host doesn't provide perl scripts to be cronned or
> > anything like that? if not, i'm not sure what to tell you...
> >
> > jack
> > - Original Message -
> > From: "Gab" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, November 19, 2001 3:32 PM
> > Subject: Re: [PHP] schedule a task
> >
> >
> > > thanks for a quick response but I have a major problem with that:
> > > no shell access => can't use cron
> > >
> > > Any other idea?
> > > Gab
> > >
> > >
> > > "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> > > 005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
> > > > cron either a php script itself [if you've got it installed as a
cgi]
> or
> > a
> > > > lynx request of the page
> > > > check the archives as well [marc.theaimsgroup.com] because this
comes
> up
> > > > every week or so
> > > >
> > > > - Original Message -
> > > > From: "Gab" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Monday, November 19, 2001 3:15 PM
> > > > Subject: [PHP] schedule a task
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > I have a form (POST method), that creates a back-up of a MySQL
> > database
> > > as
> > > > > an SQL file when submited. I am looking for a way to automate this
> > task
> > > > (ie
> > > > > on a daily basis at midnight).
> > > > > Any idea on how to do it in PHP? (if it is possible)
> > > > >
> > > > > Thanks
> > > > >
> > > > > Gab
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] use PHP as a module in Apache on win9x

2001-11-19 Thread Gary

Has anyone been able to run PHP 4.06 as a module on windows 98? Every 
time I have tried, using the install directions I get an error on 
starting Apache.It tells me it take two arguments, a module name and 
shared object file what am I doing wrong?

Gary


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re: [PHP] schedule a task

2001-11-19 Thread Matthew Moreton

You can launch IE with an address as a paramater from task scheduler.

Example:

C:\PROGRA~1\INTERN~1\IEXPLORE.EXE http://somehost.com/somepath/somescript.php

Matt.


"Gab" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'll check with the tech support but nothng is mentioned on the website.
> I can transform the method into GET on the form, and could call the script.
> The only way I see so far is using thi URL as a default page in my Win
> browser and automate sschedule the task in windows, but i don't like that.
> 
> 
> 
> 
> "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> 007f01c1713a$2a18e140$[EMAIL PROTECTED]">news:007f01c1713a$2a18e140$[EMAIL PROTECTED]...
> > you need some way of automating the process, and without cron
> automatically
> > doing things for you, you're going to be pressed for a solution...i'm not
> > sure what you could do because you need something to do this
> > automatically...your host doesn't provide perl scripts to be cronned or
> > anything like that? if not, i'm not sure what to tell you...
> >
> > jack
> > - Original Message -
> > From: "Gab" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, November 19, 2001 3:32 PM
> > Subject: Re: [PHP] schedule a task
> >
> >
> > > thanks for a quick response but I have a major problem with that:
> > > no shell access => can't use cron
> > >
> > > Any other idea?
> > > Gab
> > >
> > >
> > > "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> > > 005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
> > > > cron either a php script itself [if you've got it installed as a cgi]
> or
> > a
> > > > lynx request of the page
> > > > check the archives as well [marc.theaimsgroup.com] because this comes
> up
> > > > every week or so
> > > >
> > > > - Original Message -
> > > > From: "Gab" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Monday, November 19, 2001 3:15 PM
> > > > Subject: [PHP] schedule a task
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > I have a form (POST method), that creates a back-up of a MySQL
> > database
> > > as
> > > > > an SQL file when submited. I am looking for a way to automate this
> > task
> > > > (ie
> > > > > on a daily basis at midnight).
> > > > > Any idea on how to do it in PHP? (if it is possible)
> > > > >
> > > > > Thanks
> > > > >
> > > > > Gab
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



Re: [PHP] Re: $ENV{'REMOTE_ADDR'}

2001-11-19 Thread Danijel Tasov

Hello,

On Wed, Oct 31, 2001 at 03:26:44PM -0500, Liz Fulghum wrote:
> if ($REMOTE_ADDR=="127.0.0.1") {
> do something
> } elseif ($REMOTE_ADDR=="remote.somewhere.com") {
> do something else
> } else {
> eeks! its the end
> }

But how to easily accessing the whole environment. For example,
can you port this to PHP?

  print map { "$_=$ENV{$_}\n" } sort keys %ENV;

bye,
Da.Ta.

-- 
ooo   oo   o oo   |  Danijel Tasov, [EMAIL PROTECTED]
o  o o  oo  o  o  |  00 3A 65 0C 47 66 46 27  E2 AF 3A C4 1C 2E E8 EE
o  o o    |  http://www.camelot.de/news/
ooo  o  o.   o  o  o. |  # fortune: No such file or directory



msg40507/pgp0.pgp
Description: PGP signature


[PHP] fopen "r+" not working - how to add to beginning of txt file

2001-11-19 Thread Brian Tully

hey there - 

i've been going crazy trying to figure out how to add news items to the top
of an already existing txt file containng previous news posts. While I'd
love to change the system so everything is database-driven (as most of the
rest of the site is), this news area has so much news posts that it would
take forever to convert the info the database.

SO... i want to just create a simple script that adds text to the beginning
of an existing text file, without overwriting any previous text in the file.
The manual and php site refer to using the fopen function with the r+ option
- which i've done, BUT some if the text still gets overwritten with the new
next.

here's what I'm using:

 


What happens is that the line does get written to the top of the page but it
overwrites or deletes some of the existing text. Even though the r+ option
is supposed to put the pointer at the beginning of the file and add to it as
opposed to overwriting it doesn't seem to be working for me.

What am I doing wrong?

Is there a better way to accomplish what I'm trying to do?

any help would be GREATLY appreciated!

regards,
brian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Username:Password??? (Using fsockopen...)

2001-11-19 Thread Scott Fletcher

Hi!

How do I send the username and password to the port and recieve a
response saying hte username & password is accepted or fail???


Thanks,
 Scott



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mail charset conversion

2001-11-19 Thread Martín Marqués

I have a small script that recieves mails and does some work with it. What it 
has to do, it does it great, for now. The problem is that some lines come in 
encoded (at least thats my thought). For example:

Martín Marqués -> =?iso-8859-1?q?Mart=EDn=20Marqu=E9s?=

Does somebody know which type of encoding is used here? And how do I dencode 
it?

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] schedule a task

2001-11-19 Thread Gab

I'll check with the tech support but nothng is mentioned on the website.
I can transform the method into GET on the form, and could call the script.
The only way I see so far is using thi URL as a default page in my Win
browser and automate sschedule the task in windows, but i don't like that.




"Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
007f01c1713a$2a18e140$[EMAIL PROTECTED]">news:007f01c1713a$2a18e140$[EMAIL PROTECTED]...
> you need some way of automating the process, and without cron
automatically
> doing things for you, you're going to be pressed for a solution...i'm not
> sure what you could do because you need something to do this
> automatically...your host doesn't provide perl scripts to be cronned or
> anything like that? if not, i'm not sure what to tell you...
>
> jack
> - Original Message -
> From: "Gab" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 19, 2001 3:32 PM
> Subject: Re: [PHP] schedule a task
>
>
> > thanks for a quick response but I have a major problem with that:
> > no shell access => can't use cron
> >
> > Any other idea?
> > Gab
> >
> >
> > "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> > 005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
> > > cron either a php script itself [if you've got it installed as a cgi]
or
> a
> > > lynx request of the page
> > > check the archives as well [marc.theaimsgroup.com] because this comes
up
> > > every week or so
> > >
> > > - Original Message -
> > > From: "Gab" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, November 19, 2001 3:15 PM
> > > Subject: [PHP] schedule a task
> > >
> > >
> > > > Hi,
> > > >
> > > > I have a form (POST method), that creates a back-up of a MySQL
> database
> > as
> > > > an SQL file when submited. I am looking for a way to automate this
> task
> > > (ie
> > > > on a daily basis at midnight).
> > > > Any idea on how to do it in PHP? (if it is possible)
> > > >
> > > > Thanks
> > > >
> > > > Gab
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] schedule a task

2001-11-19 Thread Boget, Chris

> thanks for a quick response but I have a major problem with that:
> no shell access => can't use cron

Your Windows task manager?  Just set it up to go to that page
every night at your (not the server's) midnight...

Chris



Re: [PHP] schedule a task

2001-11-19 Thread Jack Dempsey

you need some way of automating the process, and without cron automatically
doing things for you, you're going to be pressed for a solution...i'm not
sure what you could do because you need something to do this
automatically...your host doesn't provide perl scripts to be cronned or
anything like that? if not, i'm not sure what to tell you...

jack
- Original Message -
From: "Gab" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 3:32 PM
Subject: Re: [PHP] schedule a task


> thanks for a quick response but I have a major problem with that:
> no shell access => can't use cron
>
> Any other idea?
> Gab
>
>
> "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> 005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
> > cron either a php script itself [if you've got it installed as a cgi] or
a
> > lynx request of the page
> > check the archives as well [marc.theaimsgroup.com] because this comes up
> > every week or so
> >
> > - Original Message -
> > From: "Gab" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, November 19, 2001 3:15 PM
> > Subject: [PHP] schedule a task
> >
> >
> > > Hi,
> > >
> > > I have a form (POST method), that creates a back-up of a MySQL
database
> as
> > > an SQL file when submited. I am looking for a way to automate this
task
> > (ie
> > > on a daily basis at midnight).
> > > Any idea on how to do it in PHP? (if it is possible)
> > >
> > > Thanks
> > >
> > > Gab
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] schedule a task

2001-11-19 Thread Gab

thanks for a quick response but I have a major problem with that:
no shell access => can't use cron

Any other idea?
Gab


"Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
> cron either a php script itself [if you've got it installed as a cgi] or a
> lynx request of the page
> check the archives as well [marc.theaimsgroup.com] because this comes up
> every week or so
>
> - Original Message -
> From: "Gab" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 19, 2001 3:15 PM
> Subject: [PHP] schedule a task
>
>
> > Hi,
> >
> > I have a form (POST method), that creates a back-up of a MySQL database
as
> > an SQL file when submited. I am looking for a way to automate this task
> (ie
> > on a daily basis at midnight).
> > Any idea on how to do it in PHP? (if it is possible)
> >
> > Thanks
> >
> > Gab
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] schedule a task

2001-11-19 Thread Tyler Longren

Set up a crontab that uses wget to hit that page everyday at midnight.

You should use the flag in wget that tells it to delete the page that it
downloads.  I use that method sometimes.

Tyler

- Original Message -
From: "Gab" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 2:15 PM
Subject: [PHP] schedule a task


> Hi,
>
> I have a form (POST method), that creates a back-up of a MySQL database as
> an SQL file when submited. I am looking for a way to automate this task
(ie
> on a daily basis at midnight).
> Any idea on how to do it in PHP? (if it is possible)
>
> Thanks
>
> Gab
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] schedule a task

2001-11-19 Thread Jack Dempsey

cron either a php script itself [if you've got it installed as a cgi] or a
lynx request of the page
check the archives as well [marc.theaimsgroup.com] because this comes up
every week or so

- Original Message -
From: "Gab" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 3:15 PM
Subject: [PHP] schedule a task


> Hi,
>
> I have a form (POST method), that creates a back-up of a MySQL database as
> an SQL file when submited. I am looking for a way to automate this task
(ie
> on a daily basis at midnight).
> Any idea on how to do it in PHP? (if it is possible)
>
> Thanks
>
> Gab
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] schedule a task

2001-11-19 Thread Gab

Hi,

I have a form (POST method), that creates a back-up of a MySQL database as
an SQL file when submited. I am looking for a way to automate this task (ie
on a daily basis at midnight).
Any idea on how to do it in PHP? (if it is possible)

Thanks

Gab



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Web developer

2001-11-19 Thread John Monfort



 Where are you located?

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Mon, 19 Nov 2001, Peter Marrocco wrote:

> I am looking for someone to help maintain and work on our web page. We have
> several PHP pages and can't find anyone locally who knows php.
>
> Thanks,
> Peter
>
> 800.333.9302
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] File Download Inquiry

2001-11-19 Thread Douglas McKenzie

You can just link to the file eg
download file

just make sure the path is correct.

Joe Van Meer wrote:

> Hi there. How would I go about downloading a file off of the server. The
> filename will always be the same in my case. Say it is sitting in a
> directory called 'textfiles'. What method/function would I use to download
> it to a user's local system?
>
> Thx Joe:)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Dynamic Navigation w/PHP

2001-11-19 Thread Matthew Moreton

My website has a navigation menu that is written to the browser depending on
what vars are set in the php script.  I store all the link names in an
array, then simply do a 'foreach' loop to write the output.  This would
allow me to add another menu item by just adding it into the array.

Simple example:

foreach($linkname as $key => $value)
{
echo "{$linkname[$key]}\n";
}

You could do something similar to this, when you want a menu item to be
enabled you could append it to the array.

- Original Message -
From: "Andy Woolley" <[EMAIL PROTECTED]>
To: "Mike Elkins" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 4:51 PM
Subject: Re: [PHP] Dynamic Navigation w/PHP


> Hi,
>
> You could try using a DHTML menu like the one at
> http://www.milonic.co.uk/menu
>
> The array of elements needed can be generated using PHP based on certain
> criteria.
>
> Let me know if you or anybody else would like a PHP script creating so
that
> you could generate menus based on values that you have in PHP.
>
> Regards
> Andy.
>
>
> - Original Message -
> From: "Mike Elkins" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 19, 2001 4:17 PM
> Subject: [PHP] Dynamic Navigation w/PHP
>
>
> > Hello All,
> >
> > I am looking for example code demonstrating the ability to dynamically
> > modify website navigation based upon data in a database. Specifically
what
> I
> > am trying to figure out is how to control what pages are available based
> > upon whether they have been "enabled" in the database. I am developing a
> > template driven website, with content controlled by the database which
> > indicates what the customer has opted for. While ten pages might be
> > available and part of the web site template, a given customer may have
> only
> > paid for four, thus when his site is hit, only those four pages will be
> > available in the navigation elements. Should the customer care to
request
> an
> > additional feature (page), simply accessing the database and enabling it
> > would make it immediately available.
> >
> > Any suggestions or pointers would be greatly appreciated.
> >
> > Michael
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Version Contol for PHP site

2001-11-19 Thread John S. Huggins

On 19 Nov 2001, Jeff Bearer wrote:

>-Is anybody doing something like this with their PHP development?  Any
>-direction from a working implementation would be great. And what do you
>-think about the VNC idea that I just came up with?
>-
VNC in a fine tool, but I think not needed for this.  Here is what I do
using WinCVS and Windows work stations.

I have three servers: one live web server, one development web server and
one completely seperate CVS server. Both web servers carry the same
Apache/PHP/MySQL setup.

At a work station (Windows for me) I checkout whatever (PHP, INC, HTML)
from the CVS server to my local drive.  I then edit it in Ultraedit and
save it via FTP to the development server.  Then I work, work, work,
crashing, banging, fixing with my browser pointing at the development
server.  Edits complete, I then "save as" to the local file name, do a CVS
commit and call it done.

Every so often, I will CVS Update the latest changes from the CVS
repository directly into the live web server and evaluate the web site. 
If things bomb, I will obtain a previous tagged-as-stable version of the
whole site (HTML,PHP,graphics) into the web directory and continue working
towards the next stable release.  If the development release works just
fine, I will tag the whole CVS repository with a new release description. 

CVS is proving quite effective at managing this stuff.

**

John Huggins
VANet
7101 Oriole Avenue
Springfield, VA 22150
703-912-6453
703-912-4831 fax

[EMAIL PROTECTED]
http://www.va.net/

**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Version Contol for PHP site

2001-11-19 Thread Chris Bailey

I'm maybe a little unclear on exactly what you want.  It says Version
Control in the subject, but then PHP debugging and such is discussed below.
To me the two are independent subjects.  So, some more general info...

For version control I'd suggest either CVS or Perforce, depending on budget
:)  CVS is obviously free, and is quite good.  You definitely want to run
the server portion of it on a UNIX/Linux box, but you can use it quite
easily from Windows with WinCVS or you can probably integrate CVS commands
into your editor (depending on your editor/IDE).  Perforce is a superb
source code management tool, but it costs money (although it's price is
reasonable).  It has some nice features over CVS (such as the whole atomic
checkin process, which once you use/work this way, you'll be bummed that
they don't all have it - I heard CVS 2 may do this if that ever happens).
You can get Perforce for free if you only have 2 (or less) users.  It works
very well on Windows and has a nice GUI.  You can also run the server on
Windows NT/2000.

Just about any version control system will work for your PHP, HTML, CSS, and
any other source code you have.  Basically they're all text files, and
that's where these systems work best because they can help with merges and
diffing and obviously keep track of differences between revisions.

You can do your development work on any platform and use typically
UNIX/Linux or Windows for a server for source control, deployment, etc.
Version control is just that, it is up to you how you employ it in terms of
your development environment.  I would think most people use it most
strictly for version control, and have scripts on their staging and/or
deployment system where they pull a snapshot of code down, do a "build"
(which may be compiling CGI scripts, or may just mean copying the files to
the appropriate place on the server), and then fire up the server.  Your
developers would do similar things, just on their own machine (I assume they
have a similar environment setup as the deployment, e.g. they're running a
web server with mod_php or whatever).

Hope that helps.

-Original Message-
From: John Lim [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 10:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Version Contol for PHP site


Hi Jeff

There is a Windows version of WinCVS (see http://wincvs.org/ ).

John

Jeff Bearer <[EMAIL PROTECTED]> wrote in message
1006195598.1407.7.camel@jbearer">news:1006195598.1407.7.camel@jbearer...
> Hello,
> I'm trying to come up with a workable solution to implement version
> control for our site.  I have developers that use windows, and don't
> know too much about the unix command line, so I'd prefer to use a
> windows client to work on the site if possible.
>
> I'm looking into CVS for the version control and I've found some
> directions on how to use it with websites.  But it only talks about
> static HTML development, it doesn't say how developers would debug PHP,
> CGI, etc.  This solution would not give them any ability to debug their
> code before checking it back in.
>
> I suppose if I could get them all comfortable with the UNIX command
> line, they could work on the development server, checking out the files
> to a working directory that is also a virtual host.
>
> A new idea that I just came up with would be to have the developers use
> VNC viewer to connect to an X server on the development box. The
> deveopers could use a X GUI for CVS to check it out, and edit files etc.
> and keep the working directory a virtual host like above.
>
> Is anybody doing something like this with their PHP development?  Any
> direction from a working implementation would be great. And what do you
> think about the VNC idea that I just came up with?
>
> --
> Jeff Bearer, RHCE
> Webmaster
> PittsburghLIVE.com
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Version Contol for PHP site

2001-11-19 Thread Joshua Hoover

John is right.  Use something like WinCVS.  Then you can either setup 
virtual hosts for each developer to have as their "sandbox" on the 
development server or you can allow the developer to run php on his/her 
own box and check in to the development server when they check into 
CVS.  There are pros and cons to each approach.  You have more central 
control with having the sandboxes on the dev server, but you might have 
an admin nightmare on your hands if configurations keep having to 
change, etc.  Letting the developer run PHP on his/her own box is very 
flexible, but may not mimic the production environment well enough.

Hope that helps...

Joshua Hoover

> Hi Jeff
>
> There is a Windows version of WinCVS (see http://wincvs.org/ ).
>
> John
>
> Jeff Bearer <[EMAIL PROTECTED]> wrote in message
> 1006195598.1407.7.camel@jbearer">news:1006195598.1407.7.camel@jbearer...
>> Hello,
>> I'm trying to come up with a workable solution to implement version
>> control for our site.  I have developers that use windows, and don't
>> know too much about the unix command line, so I'd prefer to use a
>> windows client to work on the site if possible.
>>
>> I'm looking into CVS for the version control and I've found some
>> directions on how to use it with websites.  But it only talks about
>> static HTML development, it doesn't say how developers would debug PHP,
>> CGI, etc.  This solution would not give them any ability to debug their
>> code before checking it back in.
>>
>> I suppose if I could get them all comfortable with the UNIX command
>> line, they could work on the development server, checking out the files
>> to a working directory that is also a virtual host.
>>
>> A new idea that I just came up with would be to have the developers use
>> VNC viewer to connect to an X server on the development box. The
>> deveopers could use a X GUI for CVS to check it out, and edit files 
>> etc.
>> and keep the working directory a virtual host like above.
>>
>> Is anybody doing something like this with their PHP development?  Any
>> direction from a working implementation would be great. And what do you
>> think about the VNC idea that I just came up with?
>>
>> --
>> Jeff Bearer, RHCE
>> Webmaster
>> PittsburghLIVE.com
>>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Version Contol for PHP site

2001-11-19 Thread John Lim

Hi Jeff

There is a Windows version of WinCVS (see http://wincvs.org/ ).

John

Jeff Bearer <[EMAIL PROTECTED]> wrote in message
1006195598.1407.7.camel@jbearer">news:1006195598.1407.7.camel@jbearer...
> Hello,
> I'm trying to come up with a workable solution to implement version
> control for our site.  I have developers that use windows, and don't
> know too much about the unix command line, so I'd prefer to use a
> windows client to work on the site if possible.
>
> I'm looking into CVS for the version control and I've found some
> directions on how to use it with websites.  But it only talks about
> static HTML development, it doesn't say how developers would debug PHP,
> CGI, etc.  This solution would not give them any ability to debug their
> code before checking it back in.
>
> I suppose if I could get them all comfortable with the UNIX command
> line, they could work on the development server, checking out the files
> to a working directory that is also a virtual host.
>
> A new idea that I just came up with would be to have the developers use
> VNC viewer to connect to an X server on the development box. The
> deveopers could use a X GUI for CVS to check it out, and edit files etc.
> and keep the working directory a virtual host like above.
>
> Is anybody doing something like this with their PHP development?  Any
> direction from a working implementation would be great. And what do you
> think about the VNC idea that I just came up with?
>
> --
> Jeff Bearer, RHCE
> Webmaster
> PittsburghLIVE.com
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Version Contol for PHP site

2001-11-19 Thread Jeff Bearer

Hello,
I'm trying to come up with a workable solution to implement version
control for our site.  I have developers that use windows, and don't
know too much about the unix command line, so I'd prefer to use a
windows client to work on the site if possible.  

I'm looking into CVS for the version control and I've found some
directions on how to use it with websites.  But it only talks about
static HTML development, it doesn't say how developers would debug PHP,
CGI, etc.  This solution would not give them any ability to debug their
code before checking it back in.

I suppose if I could get them all comfortable with the UNIX command
line, they could work on the development server, checking out the files
to a working directory that is also a virtual host.

A new idea that I just came up with would be to have the developers use
VNC viewer to connect to an X server on the development box. The
deveopers could use a X GUI for CVS to check it out, and edit files etc.
and keep the working directory a virtual host like above.
 
Is anybody doing something like this with their PHP development?  Any
direction from a working implementation would be great. And what do you
think about the VNC idea that I just came up with?

-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PEAR: nextID() mysql

2001-11-19 Thread Chris Dorr

My ignorance with databases will probably show here, but I haven't been 
able to solve this myself so I thought I'd post.

I'm working on converting a DB driven site using mysql specific commands 
to the PEAR DB method.

One of the fields I have in my mysql database is a auto_increment 
primary key (will show below).

On my php script I used to use mysql_insert_id to get the id (number) of 
my last insert so I can pass this to the next page (multiple tables).

When I tried to use nextID(), it kept creating "_seq" tables in my DB 
depending on what I specified as the sequence(argument). This causes a 
problem because it returns 1, because there's nothing previously in _seq 
table.  The real _seq or auto_increment is in my table chamber(described 
below).

My question is: is there anyway to make nextID() use the 
id/auto_increment in the table I've setup previously and have id/data in 
rather than having it create _seq and rewrite all of my code??

Hope I'm clear.  If not drop me an e-mail.


Thanks

Chris D.


mysql> describe chamber;
+--+--+--+-+-++
| Field| Type | Null | Key | Default | Extra 
   |
+--+--+--+-+-++
| id   | smallint(5) unsigned |  | PRI | NULL| 
auto_increment |
| company  | varchar(255) | YES  | | NULL| 
   |
| contact_name | varchar(100) | YES  | | NULL| 
   |
| address  | varchar(100) | YES  | | NULL| 
   |
| city | varchar(75)  | YES  | | NULL| 
   |
| state| varchar(50)  | YES  | | NULL| 
   |
| phone| varchar(100) | YES  | | NULL| 
   |
| fax  | varchar(100) | YES  | | NULL| 
   |
| category | varchar(100) | YES  | | NULL| 
   |
| email| varchar(100) | YES  | | NULL| 
   |
| company_url  | varchar(255) | YES  | | NULL| 
   |
| ad_url   | varchar(255) | YES  | | NULL| 
   |
+--+--+--+-+-++
12 rows in set (0.00 sec)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Adding *another* person to an e-mail *to:* address

2001-11-19 Thread Jason G.

"Bcc: [EMAIL PROTECTED],[EMAIL PROTECTED]"
Or
"Cc: [EMAIL PROTECTED],[EMAIL PROTECTED]"
Or
"To: [EMAIL PROTECTED],[EMAIL PROTECTED]"

Put a comma between email addresses.

-Jason Garber
IonZoft.com


At 01:00 PM 11/19/2001 -0600, Anthony Ritter wrote:
>Hi,
>Thanks to all that helped me out yesterday.
>
>I'm using PHP with Apache on a MS Windows 98 box.
>
>I would like to include a cc to another e-mail adresss when sending an
>e-mail.
>
>In addition I would like to *receive* and *also have the cc person receive*
>this e-mail as well.
>
>Right now, I am receiving an e-mail but not the other person using the
>following script.
>
>Using the variable and concatating the string to read:
>
>$to.="[EMAIL PROTECTED]";
>
>does not seem to work.
>
>How do I go about configuring this script so that both of us - the *to*
>person and the *cc* person can recieve the same e-mail?
>
>The script:
>
>
>
>$msg="Email sent from WWW site";
>$msg.="Sender's name:\t$sender_name\n";
>$msg.="Sender's email address:\t$sender_email\n";
>$msg.="Message:\t$message\n\n";
>$to="[EMAIL PROTECTED]";
>$other_email = "[EMAIL PROTECTED]";
>$subject="Web Site Feedback";
>$mailheaders="From: My Website<>\n";
>$mailheaders.="Cc: $other_email\n";
>$mailheaders.="Reply to: $sender_email\n";
>mail($to,$subject,$msg,$mailheaders);
>?>
>..
>
>In the above script:
>I received an e-mail but *not* the cc person - Linda.
>
>However, when I hit "reply" to that e-mail, both:
>
>[EMAIL PROTECTED]
>and
>[EMAIL PROTECTED]
>
>showed up with Linda's as the cc.
>
>O.K. That's half the riddle.
>
>I'm trying to have both myself *and Linda* receive
>an e-mail...not just me.
>
>So I tried the following script by concatating the string
>$to
>...
>
>
>$msg="Email sent from WWW site";
>$msg.="Sender's name:\t$sender_name\n";
>$msg.="Sender's email address:\t$sender_email\n";
>$msg.="Message:\t$message\n\n";
>mailto:$to="[EMAIL PROTECTED]";;
>$to.="[EMAIL PROTECTED]";
>$other_email = "[EMAIL PROTECTED]";
>$subject="Web Site Feedback";
>$mailheaders="From: My Website<>\n";
>$mailheaders.="Cc: $other_email\n";
>$mailheaders.="Reply to: $sender_email\n";
>mail($to,$subject,$msg,$mailheaders);
>?>
>
>Simple Feedback Form
>
>The following email has been sent:
>
>
>
>Your Name:
>
>
>Your email address:
>
>
>Message:
>
>.
>
>And after using *that* script neither of us receive an e-mail except that it
>gets bounced back as:
>
>[EMAIL PROTECTED]
>
>So, it seems that somewhere the string in
>
>$to
>
>is getting fouled up.
>
>Any ideas?
>
>Many thanks for your time and help.
>
>Kindest regards,
>Tony Ritter
>
>
>
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] Adding *another* person to an e-mail *to:* address

2001-11-19 Thread Anthony Ritter

Hi,
Thanks to all that helped me out yesterday.

I'm using PHP with Apache on a MS Windows 98 box.

I would like to include a cc to another e-mail adresss when sending an
e-mail.

In addition I would like to *receive* and *also have the cc person receive*
this e-mail as well.

Right now, I am receiving an e-mail but not the other person using the
following script.

Using the variable and concatating the string to read:

$to.="[EMAIL PROTECTED]";

does not seem to work.

How do I go about configuring this script so that both of us - the *to*
person and the *cc* person can recieve the same e-mail?

The script:



\n";
$mailheaders.="Cc: $other_email\n";
$mailheaders.="Reply to: $sender_email\n";
mail($to,$subject,$msg,$mailheaders);
?>
..

In the above script:
I received an e-mail but *not* the cc person - Linda.

However, when I hit "reply" to that e-mail, both:

[EMAIL PROTECTED]
and
[EMAIL PROTECTED]

showed up with Linda's as the cc.

O.K. That's half the riddle.

I'm trying to have both myself *and Linda* receive
an e-mail...not just me.

So I tried the following script by concatating the string
$to
...


mailto:$to="[EMAIL PROTECTED]";;
$to.="[EMAIL PROTECTED]";
$other_email = "[EMAIL PROTECTED]";
$subject="Web Site Feedback";
$mailheaders="From: My Website<>\n";
$mailheaders.="Cc: $other_email\n";
$mailheaders.="Reply to: $sender_email\n";
mail($to,$subject,$msg,$mailheaders);
?>


 Simple Feedback Form 


 The following email has been sent: 
Your Name:

Your email address:

Message:  



.

And after using *that* script neither of us receive an e-mail except that it
gets bounced back as:

[EMAIL PROTECTED]

So, it seems that somewhere the string in

$to

is getting fouled up.

Any ideas?

Many thanks for your time and help.

Kindest regards,
Tony Ritter








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTTPs ????

2001-11-19 Thread Scott Fletcher

Hi Everyone!

I have the HTTP reference book.  Honestly, I don't know a lot about HTTP
language or protocol.  I am supposely to write the HTTP script to connect to
the one of hte machine on the internet, then use authentication, then send
data and receive data, then close the connection.  It is a pretty basic
thing.  But I noticed it doesn't work at all.  I can write it in PHP using
hte PHP Header.  But the truth is it doesn't do anything.  So, I am lead to
believe that it meant I'm not finish with hte script.

So, anyone where can I find a good documentation on using HTTP in PHP
and making it work?  I looked around on the internet and it isn't very
reliable.  I checked out the book stores and no luck.  I appreciate all of
the help I can get on programming HTTP in PHP.  Here's the HTTP script in
PHP and not a bad start for a HTTP beginner.

-- demo script --
  $eq_one = "10xxx";
  $eq_two = "test";
  $eq_three = "DIAL999ZIDNT99xxxM3 J02";
  $post_string_len =
strlen("site_id=".$eq_one."&service_name=".$eq_two."&efx_request=".$eq_three
);

  header("POST eq_test.php HTTP/1.1");
  header("Content-Transfer-Encoding: base64");
  header("Content-Location:
http://transport5.ec.equifax.com/servlet/stspost";);
  header("Authorization: basic 10xxx:trwdwdxx");
//  header("Content-type: application/x-www-form-urlencoded");
  header("Content-length: $post_string_len");
  header("site_id=$eq_one&service_name=$eq_two&efx_request=$eq_three");

  echo "";
  echo "";
  echo "Testing!";
-- demo script end --

Thanks!
  Scott

P.S.  Just any helpful information will be useful.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] IP Address Converted to Computer Name

2001-11-19 Thread Ben Clumeck

I am trying to convert an ip address to a computer name.  Then I am putting
it into the mail() script.  However, when I do this it come up blank.  I am
putting $r_hostname in the mail() script.  Can anyone tell me why its not
working?  The script I am using is:


Thanks,

Ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Error running ./configure (c++ error)

2001-11-19 Thread Roy Sigurd Karlsbakk

> Do you have appropriate permissions in the directory you are runnning
> configure in for the user running configure??

Yes.
I'm r00t
--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA

Computers are like air conditioners.
They stop working when you open Windows.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] configure problem: --with-mysql=/what exactly?

2001-11-19 Thread James Green

Hi all,

I have Debian Sid, I have Apache installed by source, and am trying to
install the source of PHP4.0.6. For reasons I won't go into, I cannot
use the Debian packages of Apache or PHP.

The problem is when I come to configure PHP with mysql support. I have
MySQL debs installed: mysql-server, mysql-client, libmysqlclient10-dev.
I can see the mysql libs in /usr/lib/, and the headers in
/usr/include/mysql/.

I have tried the following, each time removing config.cache beforehand:

--with-mysql=/usr
--with-mysql=/usr/include
--with-mysql=/usr/include/mysql
--with-mysql=/usr/lib

According to a friend with mysql Debs installed it should be the first,
yet PHP tells me each time it's using the bundled MySQL version and to
be careful of running it with other mysql-using modules.

Any ideas why configure doesn't pick up my local MySQL installation? It
certainly picks up the currect socket path.

Many thanks,

James Green



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Dynamic Navigation w/PHP

2001-11-19 Thread Andy Woolley

Hi,

You could try using a DHTML menu like the one at
http://www.milonic.co.uk/menu

The array of elements needed can be generated using PHP based on certain
criteria.

Let me know if you or anybody else would like a PHP script creating so that
you could generate menus based on values that you have in PHP.

Regards
Andy.


- Original Message -
From: "Mike Elkins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 4:17 PM
Subject: [PHP] Dynamic Navigation w/PHP


> Hello All,
>
> I am looking for example code demonstrating the ability to dynamically
> modify website navigation based upon data in a database. Specifically what
I
> am trying to figure out is how to control what pages are available based
> upon whether they have been "enabled" in the database. I am developing a
> template driven website, with content controlled by the database which
> indicates what the customer has opted for. While ten pages might be
> available and part of the web site template, a given customer may have
only
> paid for four, thus when his site is hit, only those four pages will be
> available in the navigation elements. Should the customer care to request
an
> additional feature (page), simply accessing the database and enabling it
> would make it immediately available.
>
> Any suggestions or pointers would be greatly appreciated.
>
> Michael
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Web developer

2001-11-19 Thread Peter Marrocco

I am looking for someone to help maintain and work on our web page. We have
several PHP pages and can't find anyone locally who knows php. 

Thanks, 
Peter

800.333.9302

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Dynamic Navigation w/PHP

2001-11-19 Thread Julio Nobrega Trabalhando

  Well, I don't really get what is your problem here. :-)

  You said people must 'enable' pages to have it available. Is it not only a
matter of checking this 'enabled' flag? For example a database table with a
column named 'enabled', and others 'link' and 'text':

(example for mysql)





  The only thing I see different is the 'enabled' at the $sql command,
telling only to select links that were selected to be show. I guess you
would also want to put 'AND user = $some_user' to select only links for a
previous autheticaded user.

--

Julio Nobrega

No matter where you go, &this.

"Mike Elkins" <[EMAIL PROTECTED]> wrote in message
0A81AC3C2888D4119C9200A0C9A3179A1713C7@ramses">news:0A81AC3C2888D4119C9200A0C9A3179A1713C7@ramses...
> Hello All,
>
> I am looking for example code demonstrating the ability to dynamically
> modify website navigation based upon data in a database. Specifically what
I
> am trying to figure out is how to control what pages are available based
> upon whether they have been "enabled" in the database. I am developing a
> template driven website, with content controlled by the database which
> indicates what the customer has opted for. While ten pages might be
> available and part of the web site template, a given customer may have
only
> paid for four, thus when his site is hit, only those four pages will be
> available in the navigation elements. Should the customer care to request
an
> additional feature (page), simply accessing the database and enabling it
> would make it immediately available.
>
> Any suggestions or pointers would be greatly appreciated.
>
> Michael
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Dynamic Navigation w/PHP

2001-11-19 Thread Mike Elkins

Hello All,
 
I am looking for example code demonstrating the ability to dynamically
modify website navigation based upon data in a database. Specifically what I
am trying to figure out is how to control what pages are available based
upon whether they have been "enabled" in the database. I am developing a
template driven website, with content controlled by the database which
indicates what the customer has opted for. While ten pages might be
available and part of the web site template, a given customer may have only
paid for four, thus when his site is hit, only those four pages will be
available in the navigation elements. Should the customer care to request an
additional feature (page), simply accessing the database and enabling it
would make it immediately available.
 
Any suggestions or pointers would be greatly appreciated.
 
Michael



[PHP] POST files with PHP

2001-11-19 Thread Daniel Reichenbach

Hy,

I'm trying to post image files to a php script with another php script.
Don't ask why, it's a crazy project :)
Now the file is around 28000 bytes but the post receiver only gets
around
300 bytes. Has anybody experienced this behaviour?

I use the following script:

--- snap ---
http://www.server.com/post.php";; 

// the file to upload
$file = "/var/www/test/dummy.jpg"; // the file location 
$con_type = "image/jpg"; // the file mime type 
$content_file = join("",file($file)); 

// define boundary 
srand((double)microtime()*100); 
$boundary =
"---".substr(md5(rand(0,32000)),0,10);
$data = "--$boundary 
Content-Disposition: form-data; name=\"userfile\"; filename=\"$file\" 
Content-Type: $con_type 

$content_file"."--$boundary--\r\n\r\n"; 
$msg = 
"POST $remote_page HTTP/1.0 
Content-Type: multipart/form-data; boundary=$boundary 
Content-Length: ".strlen($data)."\r\n\r\n"; 

$f = fsockopen("www.server.com",80); 
fputs($f,$msg.$data); 
$result = fread($f,32000); 
fclose($f); 
print $result."\n"; 

?>
--- snap --



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Download File Problem - text not appearing on downloaded file

2001-11-19 Thread Joe Van Meer

Hi there. I managed to get the prompt for a file download when a user clicks
on a text link. The file downloads properly to the client machine, howevr,
when I open up the file there is no content. What do I have to add to the
following code to get the content sent back to the user?

Thx Joe :)






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] add system user using PHP & Apache

2001-11-19 Thread Mark Lo

Hi,

 I would like to know how to use PHP & Apache to add system user.  Eg. #
Adduser mark

I am seeking advice, so should I use suexec to perform the task or
others.


Thank you



Mark Lo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Apache 2.0.28 module

2001-11-19 Thread The Doctor

On Mon, Nov 19, 2001 at 11:34:41AM +0100, Sebastian Bergmann wrote:
> Jobarr wrote:
> > I need a build of PHP that can be used as a module with Apache 2.0.28 
> > beta.
> 
>   Please do not massively cross-post to the various php.net mailinglists
>   or newsgroups.
> 
> -- 
>   Sebastian Bergmann
>   http://sebastian-bergmann.de/ http://phpOpenTracker.de/
> 
>   Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/
>

Has the PHP group contected the Apache Group on this matter.

The Apache Group are a swell bunch of people.
 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
Member - Liberal International  On 11 Sept 2001 the WORLD was violated.
This is [EMAIL PROTECTED]   Ici [EMAIL PROTECTED]
Society MUST be saved! Extremists must dissolve.  
Merry Christmas 2001 and Happy New Year 2002.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Newbie Question about a counter

2001-11-19 Thread Jeff Williamson

I've modified a couple of php scripts that are working quite well.  They are
simple form/email scripts.

I have hit a road block with a counter that I need.

I need a counter that starts with i-1 and will increment by 1 after each
confirmation of a reservation form.

I don't necessarily have to store this in a database.  As long as the E-mail
is forwarded correctly the confirmation numbers are put into the PC
manually.

Can anyone point me to a script that I can modify to do this?  I've searched
the popular scripts archives but must be looking in the wrong categories.
If you can suggestion some categories that would help in my search, that
would be great too.

Thanks,

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >