Re: [PHP] RE: help, weird include problem with functions

2001-08-09 Thread Clayton Dukes

You need to include settings.php in functions.php.


- Original Message -
From: "Jaxon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 09, 2001 12:48 PM
Subject: [PHP] RE: help, weird include problem with functions


> oh, this still happens when I fix the missing () in the foo declaration :)
>
> cheers,
> jaxon
>
> > -Original Message-
> > From: Jaxon [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, August 09, 2001 12:34 PM
> > To: [EMAIL PROTECTED]
> > Subject: help, weird include problem with functions
> >
> >
> >
> > can anyone tell me why this doesn't work??
> > assuming I have these three files:
> >
> > settings.php is:
> > 
> >
> > page.php is:
> >  > require("settings.php");
> > echo "$bar from page.php"; //this works!!!
> > include "function.php";
> > ?>
> >
> >
> > function.php is:
> >  > function foo{
> > global $bar;
> > echo "$bar from foo"; //this does not work!!!
> > }
> > foo();
> > ?>
> >
> > for some reason the $bar in function foo() doesn't have a value... :(
> > calling page.php only returns the $bar from page.php
> >
> > thanks in advance!
> > jaxon
> >
>
> --
> 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: FAQ

2001-08-01 Thread Clayton Dukes

I have a question:
Does anyone know what PHP stands for?
It's not in any of the FAQ's I've looked at.

-Clayton


- Original Message -
From: "scott [gts]" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Wednesday, August 01, 2001 11:40 AM
Subject: RE: [PHP] Re: FAQ


> and adding a little explanation of the
> http://php.net/function syntax for searching
> the php.net site would be a big help too.
>
>
> > -Original Message-
> > From: Johnson, Kirk [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 01, 2001 11:32 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Re: FAQ
> >
> >
> > > I know of 3 php faqs (I know there are tons), maybe we should
> > > make a faq on how to
> > > find faqs? :)
> > >
> > > http://alt-php-faq.org/
> > > http://www.php.net/manual/en/faq.php
> > > http://php.faqts.com
> >
> > Rasmus, do you think there would be any value in adding these 3 links to
the
> > "PHP General Mailing List" trailer that is added to each post?
> >
> > Just a thought.
> >
> > Kirk
> >
> > --
> > 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] Find and Replace

2001-07-30 Thread Clayton Dukes

Hey Guys,
The numbers are read in binary, ie:

USER/GROUP/OTHER

so, to set read and execute for user only (r-x)
you count in binary from right to left (1 + 4)
so it would be chmod 500
or for all (user/group/other) read, write, execute it would be chmod 777 (1
+ 2 + 4)

Hope that helps :-)

--
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net




- Original Message -
From: "Matthew Loff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 3:47 PM
Subject: RE: [PHP] Find and Replace


>
> Instead of using numbers, I use this system:
>
> chmod a+rwx
> (all users read/write/execute)
>
> chmod u+rwx
> (owner of file read/write/execute)
>
> chmod g+rwx
> (group read/write/execute)
>
> chmod o+rwx
> (all users read/write/execute)
>
> The plus + can be substituted with a minus - to remove specific
> permissions, and any combination of r, w, and x can exist in there.
>
>
> - Original Message -
> From: "Shrout, Ryan" <[EMAIL PROTECTED]>
> To: "'Matt Kaufman'" <[EMAIL PROTECTED]>
> Sent: Monday, July 30, 2001 12:14 PM
> Subject: RE: [PHP] Find and Replace
>
>
> > Thanks!  Do you know what ownership properties only allow viewing by
> owner?
> >
> > chmod 600?  711? 555?
> >
> > Thanks!
> >
> > Ryan
> >
> > -Original Message-
> > From: Matt Kaufman [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 30, 2001 6:00 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Find and Replace
> >
> >
> > There are a lot of text editors that allow you to find and replace -
> > vi
> even
> > does.
> >
> > You can also CHMOD the *.inc files to allow only the owner to access
> them -
> > I don't even use the *.inc or *.inc.php function, you can do without
> > it
> (eg
> > include.php, settings.php instead of include.inc or settings.inc.php)
> >
> > Matt Kaufman
> > - Original Message -
> > From: "Shrout, Ryan" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, July 30, 2001 12:06 PM
> > Subject: [PHP] Find and Replace
> >
> >
> > > This isn't exactly PHP I need help with, but it relates to what I
> learned
> > > about security.  Up until now, I have been using *.inc extensions
> > > for my include files.  Well, I didn't realize until recently that
> > > anyone can
> view
> > > these files.  So, I want to rename them to *.inc.php.  BUT, in
> > > almost
> all
> > of
> > > my PHP pages, there are links to : include ('mydir/myfile.inc');
> > >
> > > Can someone tell me how to do a recursive find and replace to look
> > > for /myfile.inc and replace it with myfile.inc.php?  I am running
> > > Red Hat
> 7.1
> > >
> > > Thanks!
> > >
> > > Ryan
> > >
> > > --
> > > 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 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] Find and Replace

2001-07-30 Thread Clayton Dukes

Try this:

---cut---
###
# Finds all *.inc from current directory and rename then to *.inc.php
# then edit that file and replace all references to it as well
# I haven't tested this, but it should work, but don't be a dumbass and not
make a backup copy
# of your files before running it :-)
# Note: You may need to escape the $ symbols (\$) in the perl command (I
don't remember)

#!/bin/sh
for file in `find . -name '*.inc' | awk -F. {print $1}`
do
echo "Processing $file.inc"
mv $file.inc $file.inc.php
perl -i -pe 's/$file.inc/$file.inc.php/g' $file.inc.php
done
---cut---




- Original Message -
From: "Shrout, Ryan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 3:06 PM
Subject: [PHP] Find and Replace


> This isn't exactly PHP I need help with, but it relates to what I learned
> about security.  Up until now, I have been using *.inc extensions for my
> include files.  Well, I didn't realize until recently that anyone can view
> these files.  So, I want to rename them to *.inc.php.  BUT, in almost all
of
> my PHP pages, there are links to : include ('mydir/myfile.inc');
>
> Can someone tell me how to do a recursive find and replace to look for
> /myfile.inc and replace it with myfile.inc.php?  I am running Red Hat 7.1
>
> Thanks!
>
> Ryan
>
> --
> 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] GD library

2001-07-28 Thread Clayton Dukes

www.boutell.com


- Original Message - 
From: "Manu Verhaegen" <[EMAIL PROTECTED]>
To: "'Php-General (E-mail)" <[EMAIL PROTECTED]>
Sent: Saturday, July 28, 2001 12:51 PM
Subject: [PHP] GD library


> I want to install the GD library for PHP
> I seek libpng and zlib and jpeg-6b can you help me
> 
> Greetings,
> Manu Verhaegen
> 
> 
> -- 
> 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] Example high-profile PHP sites

2001-07-26 Thread Clayton Dukes

Well, you can use mine if you like,

http://www.gdd.net

I'm using the Nuke portal software.
More can be found at http://phpnuke.org

--
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net



- Original Message -
From: "Maurice Rickard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 12:35 PM
Subject: [PHP] Example high-profile PHP sites


> For a number of reasons, I need to offer a client a list of big,
> impressive-sounding, high-profile sites using PHP.  I went looking
> for the list on PHP.net, and the closest I could find is
> http://pt2.php.net/sites.php  which, as you'll see, is suffering from
> a fatal error.
>
> I did find a list at http://php.datalogica.com/sites.php which, while
> helpful,  seems a bit dated.  Does anyone have some favorite examples
> that aren't on this list?
>
> I've been preparing other arguments as well, but the "all the cool
> people are doing it" examples will help.
>
> Thanks!
> --
> Maurice Rickard
> http://mauricerickard.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] IE -> View Source

2001-07-26 Thread Clayton Dukes

Works fine for me...


- Original Message -
From: "Dennis Gearon" <[EMAIL PROTECTED]>
To: "PHP Mailing Listl (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 11:17 AM
Subject: Re: [PHP] IE -> View Source


> Please try to read any of the browser printed text in this URL(I can't do
it in
> NS):
> http://rwchat.com/DigiLink1/index.html
>
> Alexander Skwar wrote:
> >So sprach »Steve Haemelinck« am 2001-07-26 um 08:32:11 +0200 :
> >> Some sites are able to disable the source view in ie. How do you do
that?
> >
> >You can't.  You can make stupid games and disable right mouse button
> >clicks, but that's still not going to stop anyone to get the HTML
> >output.
> >
> >Alexander Skwar
>
> --
> 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] Syntax Eyes

2001-07-25 Thread Clayton Dukes

I have a row in sql that is binary data (a jpeg)
I need to echo that data to a table on the web page in the form of the
original jepg, when I echo it now, I just get the actual data stream.

How can I fix this?



- Original Message -
From: "Mark Roedel" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>; "Php-General"
<[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 9:58 AM
Subject: RE: [PHP] Syntax Eyes


> > -Original Message-
> > From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 24, 2001 10:53 PM
> > To: Matthew Loff; 'Php-General'
> > Subject: Re: [PHP] Syntax Eyes
> >
> >
> > Okay, I figured out the @header will actually reset the
> > headers, but it still just prints the raw data to the
> > screen instead of the actual image.  How can I fix this?
>
> Errr...actually, no it won't.
>
> @header(), as opposed to header(), simply says "If you run into any
> errors, don't bother telling me about them."  The fact that, as you say,
> the raw data gets printed instead of an image, should tell you that the
> header isn't having any effect.
>
> The general rule is that you can't send headers once you've started
> sending output to the browser.  In this case, I'm wondering why you want
> image data and html tags in the same file anyway...is that really what
> you intended?  (Remember, a web browser is basically going to be
> expecting a single file in response to a single request...)
>
>
> ---
> Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
> Systems Programmer / WebMaster  ||   My schedule is already full."
>  LeTourneau University  ||-- Henry Kissinger
>
>
>
> > echo "";
> >   if($db->f("bin_data"))
> >   {
> > /*
> > This doesn't help...
> > @header ("Content-disposition: filename=".$filename);
> > @header( "Content-type: image/jpeg" );
> > */
> >  $db->p("bin_data");
> >
> >
> >   } else {
> >  echo "No Picture Available";
> >
> >
> > -Clayton
> >
> >
> >
> > - Original Message -
> > From: "Matthew Loff" <[EMAIL PROTECTED]>
> > To: "'Clayton Dukes'" <[EMAIL PROTECTED]>; "'Php-General'"
> > <[EMAIL PROTECTED]>
> > Sent: Tuesday, July 24, 2001 11:20 PM
> > Subject: RE: [PHP] Syntax Eyes
> >
> >
> > >
> > > Output control functions will let you buffer the output, and you can
> > > decide to send a header instead of flushing the buffer to
> > the client:
> > >
> > > http://www.php.net/manual/en/ref.outcontrol.php
> > >
> > > ob_start() & flush()  should accomplish this all for you.
> > >
> > >
> > > -Original Message-
> > > From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, July 24, 2001 11:14 PM
> > > To: Php-General
> > > Subject: Re: [PHP] Syntax Eyes
> > >
> > >
> > > Nevermind, I got it...
> > >
> > > Now, how do you reset header information if you need to redclare the
> > > header(); 
> > >
> > > ie:
> > > Warning: Cannot add header information - headers already
> > sent by (output
> > > started at ...


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

2001-07-25 Thread Clayton Dukes



Can someone tell me why this doesn't work?

$home_street = ereg_replace (" " , "+" , $home_street);

The input is "123 happy trail"
I need the output to be "123+happy+trail"

Thanks,
Clayton




Re: [PHP] Syntax Eyes

2001-07-24 Thread Clayton Dukes

Okay, I figured out the @header will actually reset the headers, but it
still just prints the raw data to the screen instead of the actual image.
How can I fix this?

echo "";
  if($db->f("bin_data"))
  {
/*
This doesn't help...
@header ("Content-disposition: filename=".$filename);
@header( "Content-type: image/jpeg" );
*/
 $db->p("bin_data");


  } else {
 echo "No Picture Available";


-Clayton



- Original Message -
From: "Matthew Loff" <[EMAIL PROTECTED]>
To: "'Clayton Dukes'" <[EMAIL PROTECTED]>; "'Php-General'"
<[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 11:20 PM
Subject: RE: [PHP] Syntax Eyes


>
> Output control functions will let you buffer the output, and you can
> decide to send a header instead of flushing the buffer to the client:
>
> http://www.php.net/manual/en/ref.outcontrol.php
>
> ob_start() & flush()  should accomplish this all for you.
>
>
> -Original Message-
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 11:14 PM
> To: Php-General
> Subject: Re: [PHP] Syntax Eyes
>
>
> Nevermind, I got it...
>
> Now, how do you reset header information if you need to redclare the
> header(); 
>
> ie:
> Warning: Cannot add header information - headers already sent by (output
> started at ...
>
>
> -Clayton
>
>
> - Original Message -
> From: "Clayton Dukes" <[EMAIL PROTECTED]>
> To: "Php-General" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 24, 2001 10:54 PM
> Subject: [PHP] Syntax Eyes
>
>
> Hey, I need a set of extra eyes:
>
> $res_id = mysql_query ("update contacts_data set (
> description='$description',
>     data='$data',
> filename='$input_file_name',
> filesize='$input_file_size',
> filetype='$input_file_type'
> where uid='$uid'
> )");
>
> Can someone tell me why this is yeilding:
>
> MySQL Error: (1064) You have an error in your SQL syntax near '(
> 'Clayton Dukes', 'ÿØÿà\0JFIF\0\0H\0H\0\0ÿÛ\0C\0' at line 1
>
>
> ???
> TIA!
> --
> Clayton Dukes
> CCNA, CCDA, CCDP, CCNP
> (c) 904.477.7825
> (h) 904.292.1881
> Download Free Essays, Term Papers and Cisco Training from
> http://www.gdd.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]
>
>
> --
> 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] Syntax Eyes

2001-07-24 Thread Clayton Dukes

Nevermind, I got it...

Now, how do you reset header information if you need to redclare the
header(); 

ie:
Warning: Cannot add header information - headers already sent by (output
started at ...


-Clayton


- Original Message -
From: "Clayton Dukes" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 10:54 PM
Subject: [PHP] Syntax Eyes


Hey, I need a set of extra eyes:

$res_id = mysql_query ("update contacts_data set (
description='$description',
data='$data',
filename='$input_file_name',
filesize='$input_file_size',
filetype='$input_file_type'
where uid='$uid'
)");

Can someone tell me why this is yeilding:

MySQL Error: (1064) You have an error in your SQL syntax near '( 'Clayton
Dukes', 'ÿØÿà\0JFIF\0\0H\0H\0\0ÿÛ\0C\0' at line 1


???
TIA!
--
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.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]




[PHP] Syntax Eyes

2001-07-24 Thread Clayton Dukes

Hey, I need a set of extra eyes:

$res_id = mysql_query ("update contacts_data set (
description='$description',
data='$data',
filename='$input_file_name',
filesize='$input_file_size',
filetype='$input_file_type'
where uid='$uid'
)");

Can someone tell me why this is yeilding:

MySQL Error: (1064) You have an error in your SQL syntax near '( 'Clayton Dukes', 
'ÿØÿà\0JFIF\0\0H\0H\0\0ÿÛ\0C\0' at line 1


???
TIA!
--
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net





[PHP] Help with this-> pointers

2001-07-24 Thread Clayton Dukes

Hi everyone,
Forgive my ignorance, I'm trying to re-write an old contact databse that didn't work. 
I have everything written out, but the old code used pointers (ie: this->$db).

I'm not familiar with that type of code, how can I convert it?

---snip---
 $sql="select distinct site from contacts_data where site != '' order by site";
   $db->query($sql);
   while($db->next_record())
---snip---


And how can I rewrite it to work?

here's a copy of my table:

CREATE TABLE contacts_data (
  id bigint(20) DEFAULT '0' NOT NULL auto_increment,
  last_name varchar(40) DEFAULT '' NOT NULL,
  middle_initial char(1) DEFAULT '' NOT NULL,
  first_name varchar(40) DEFAULT '' NOT NULL,
  work_phone varchar(20),
  extension varchar(4),
  cell_phone varchar(20),
  job_desc varchar(80),
  department varchar(30),
  site varchar(30),
  cell_pre_email varchar(20),
  cell_post_email varchar(20),
  cell_unused varchar(20),
  email varchar(160),
  web varchar(160),
  home_phone varchar(20),
  home_street varchar(50),
  home_city varchar(20),
  home_state char(2),
  home_zip varchar(5),
  work_street varchar(50),
  work_city varchar(20),
  work_state char(2),
  work_zip varchar(5),
  notes varchar(255),
  PRIMARY KEY (id),
  UNIQUE id (id),
  UNIQUE last_name (last_name,middle_initial,first_name)
);



TIA!

-Clayton




Re: [PHP] GET Command

2001-07-17 Thread Clayton Dukes

MessageHi,
Here's what I'm trying to do:

I want to test an IIS server for an invulnerability. This is done by sending
a GET command to test for it.
Here's a blurb from the security advisory that I am working with:

---snip---
A scan is performed over some region of the Internet, searching for web
servers accepting TCP connections on port 80. A specially formed "HTTP GET"
request is then sent over the accepted connection to the server:
GET /scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+dir+c:\
---snip---

How can I do a simple page where, the user inputs the url (www.whatever.com)
And it runs this test, telling the user if it passes or fails, and returns
the output?

Btw, the security advisory comes from http://grc.com/dos/grcdos.htm which
outlines some very interesting things happening with IRC based DoS attacks,
in case your interested.


Thanks!


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: Matthew Loff
To: 'Clayton Dukes' ; [EMAIL PROTECTED]
Sent: Tuesday, July 17, 2001 2:11 PM
Subject: RE: [PHP] GEt Command



$site = fopen(http://www.whatever.com/, "r");
$contents = fread($site, 102400);
fclose($site);

-Original Message-
From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 2:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] GEt Command


Does anyone have a simple script that will GET a web page and return the
reply?

Something like this:

function getpage($host, $path, getstr) {
$getstr="whatever\r\n";
$host=www.whatever.com;

$hdr=sprintf("GET $getstr", $path);
$hdr .="Content-type: application/x-www-form-urlencoded\r\n";
$hdr .="Accept: text/html\r\nAccept: text/plain\r\n";
$hdr .="User-Agent: Mozilla/1.0\r\n\r\n";

$fp = fsockopen($host , 80, &$errno, &$errstr, 45);
if (!$fp) {
echo "$host open error: $errstr $errno .\n";
return(0);
} else {
fputs($fp,$hdr.$poststr);
return($fp);
}
}

while (!feof($fp)) {
$buff=fgets($fp, 1024);
//dofoo($buff);
echo "$buff";
}
fclose($fp);


TIA!

Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.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]




[PHP] GEt Command

2001-07-17 Thread Clayton Dukes



Does anyone have a simple script that will GET a 
web page and return the reply?
 
Something like this:
 
function getpage($host, $path, getstr) 
{$getstr="whatever\r\n";
$host=www.whatever.com;
 
    $hdr=sprintf("GET $getstr", 
$path);    $hdr .="Content-type: 
application/x-www-form-urlencoded\r\n";    $hdr .="Accept: 
text/html\r\nAccept: text/plain\r\n";    $hdr .="User-Agent: 
Mozilla/1.0\r\n\r\n";
 
    $fp = fsockopen($host , 80, 
&$errno, &$errstr, 45);    if (!$fp) 
{    echo "$host open error: $errstr 
$errno .\n";    
return(0);    } else 
{    
fputs($fp,$hdr.$poststr);    
return($fp);    }}
 
while (!feof($fp)) {    
$buff=fgets($fp, 1024);    
//dofoo($buff);    echo 
"$buff";}fclose($fp);
 
 
TIA!
 
Clayton DukesCCNA, CCDA, CCDP, CCNP(c) 
904.477.7825(h) 904.292.1881Download Free Essays, Term Papers and Cisco 
Training from http://www.gdd.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]


[PHP] Wget and PHP

2001-07-15 Thread Clayton Dukes



Is there a utility available that will get PHP 
based websites?
Wget doesn't do it
 
TIA!
 
Clayton DukesCCNA, CCDA, CCDP, CCNPDownload 
Free Essays, Term Papers and Cisco Training from http://www.gdd.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] Alternative to phpMyAdmin

2001-07-12 Thread Clayton Dukes

I'd like to cast my vote for Webmin :-)
www.webmin.com


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Matthew Loff" <[EMAIL PROTECTED]>
To: "'Steve Brett'" <[EMAIL PROTECTED]>; "'Steph'"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 2:07 PM
Subject: RE: [PHP] Alternative to phpMyAdmin


>
> I second that recommendation-- MySQL-Front is downright excellent!
>
> http://www.mysqlfront.de/
>
>
> -Original Message-
> From: Steve Brett [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 12, 2001 6:47 AM
> To: Steph; [EMAIL PROTECTED]
> Subject: RE: [PHP] Alternative to phpMyAdmin
>
>
> mysql front is by far my favourite
>
> available from mysql download section.
>
> Steve
>
> > -Original Message-
> > From: Steph [mailto:[EMAIL PROTECTED]]
> > Sent: 12 July 2001 05:01
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Alternative to phpMyAdmin
> >
> >
> > Hi all! I love phpMyAdmin, just makes life so easy :) But I
> > just moved my site, and phpMyAdmin isnt working on my server
> > yet, so does any one have any solid alternatives that I can install??
> >
> > Thanks, Steph
> >
>
> --
> 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] Question

2001-07-06 Thread Clayton Dukes

I'm no expert by any means, but couldn't you set a variable=now();
then when the user clicks again, set a variable2=now();
then subtract the difference and store the result?


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "James W Greene" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 11:02 AM
Subject: [PHP] Question


> Hello,
> I am in the need to do the following:
> A web form in which A user clicks on a timer button.  The after a certian
> amount of time the click a end timer button and the time is logged to a
> mysql dbase.  ANyone know how I could go about this.  I was thinking I
could
> store the start time in a cookie, and then when end timer button is
pressed
> I could read the value from the cookie, write it, and then destroy the
> cookie.  ANy ideas ?  Thanks
> Jim
>
>
> --
> 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] Removing Invalid Users

2001-07-04 Thread Clayton Dukes

Howdy folks,

How can I write code that will search the database and check the validity of
an email address, and if it's bad, to remove that entry from the database?

Here's a dump one of the tables:

INSERT INTO users VALUES
(1,'','username','[EMAIL PROTECTED]','','','001.gif','Jul 04,
2001','','title','location','text','',0,0,'','','','field',10,'',0,0,0,'',0,
'','Default',4096,0);

ie:
if the email field is bad (test using sendmail?)
remove that entry from the database.

How can I do this?

TIA!

Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.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] Getting Information from a CGI POST

2001-07-02 Thread Clayton Dukes

Don,
Thanks for the info.

I'm a bit confused,
When I call the function, what is the syntax as it applies to my form?

ie:
openpost ("dps2.usairways.com, /cgi-bin/fi, FltNum=2972 page=fi");

I know this doesn't work, but do you see what I mean?
Forgive my ignorance, I'm still learning :-)
Also, how do I set more than one NAME= VALUE= pair?

As a reference, here's the form I am getting the info from:

-
http://dps2.usairways.com/cgi-bin/fi";>
   
  

  
todayMonth = monthNames[today.getMonth() + 1];
document.write( '<option value=\"' + todayMonth + '
' + today.getDate() + '\">today</option>');
tomorrowMonth = monthNames[tomorrow.getMonth() + 1];
document.write( '<option value=\"' + tomorrowMonth +
' ' + tomorrow.getDate() + '\">tomorrow</option>');
yesterdayMonth = monthNames[yesterday.getMonth() +
1];
document.write( '<option value=\"' + yesterdayMonth
+ ' ' + yesterday.getDate() + '\">yesterday</option>');
  
   
  
-

TIA!
Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Don Read" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 12:01 AM
Subject: RE: [PHP] Getting Information from a CGI POST


>
> On 02-Jul-01 Clayton Dukes wrote:
> > Hi everyone,
> >
> > Is it possible to get information from a POST to a cgi and return the
value?
>
> Yes.
>
> function openpost($host, $path, $poststr) {
> $errno=0;
> $errstr='';
>
> $hdr=sprintf("POST /%s HTTP/1.0\r\nContent-Length: %d\r\n",
>   $path, strlen($poststr));
> $hdr .="Content-type: application/x-www-form-urlencoded\r\n";
> $hdr .="Accept: text/html\r\nAccept: text/plain\r\n";
> $hdr .="User-Agent: Mozilla/1.0\r\n\r\n";
>
> $fp = fsockopen($host , 80, &$errno, &$errstr, 45);
> if (!$fp) {
> echo "$host open error: $errstr $errno .\n";
> return(0);
> } else {
> fputs($fp,$hdr.$poststr);
> return($fp);
> }
> }
>
> while (!feof($fp)) {
> $buff=fgets($fp, 1024);
> dofoo($buff);
> }
> fclose($fp);
>
> > Isn't there a way to have PHP go and check this onec every x minutes and
> > return the status?
>
> Yep, there is.
>
> >
> > Can this be done?
>
> Yes.
>
> Regards,
> --
> Don Read   [EMAIL PROTECTED]
> -- It's always darkest before the dawn. So if you are going to
>steal the neighbor's newspaper, that's the time to do it.


-- 
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] Getting Information from a CGI POST

2001-07-01 Thread Clayton Dukes

Hi everyone,

Is it possible to get information from a POST to a cgi and return the value?
I want to try to get a script that will check on an airline's flight status,
and if it returns "cancelled", then send me an e-mail (to my cell or pager).

I wanna do this because I get tired of driving an hour to the airport only
to find that it's been cancelled, so I got to thinking, wouldn't it be cool
if you could have a script that would track this information for you?

Let's take for example, usairways.com
here's a copy of the form on thier page:

http://dps2.usairways.com/cgi-bin/fi";>
   
  

  
todayMonth = monthNames[today.getMonth() + 1];
document.write( '<option value=\"' + todayMonth + '
' + today.getDate() + '\">today</option>');
tomorrowMonth = monthNames[tomorrow.getMonth() + 1];
document.write( '<option value=\"' + tomorrowMonth +
' ' + tomorrow.getDate() + '\">tomorrow</option>');
yesterdayMonth = monthNames[yesterday.getMonth() +
1];
document.write( '<option value=\"' + yesterdayMonth
+ ' ' + yesterday.getDate() + '\">yesterday</option>');
  
   
  


Isn't there a way to have PHP go and check this onec every x minutes and
return the status?
I think it would be cool to have a dropdown of each of the major airlines,
then you just put your flight number, and time of departure (and stores it
into a database). Then on the day you leave, it checks every thirty minutes
or so starting a few hours before, and if there's any delay or cancellation,
it sends an email.


Can this be done?
If so, can someone point me in the right direction? Specifically, how to get
the CGI Post data returned from thier server?


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.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]




[PHP] Re: Regular Expression help

2001-06-29 Thread Clayton Dukes

Okay, here's what I have so far:

---snip---
if ((!$email)
   || ($email=="")
   || (!eregi("^[_\.0-9a-z-]+@domain.+[a-z]",$email))
   )
$stop = ""._ERRORINVEMAIL."";
---snip---

This works, but how can I add a second domain?
ie:

---snip---
if ((!$email)
   || ($email=="")
   || (!eregi("^[_\.0-9a-z-]+@domain.+[a-z]",$email))
   || (!eregi("^[_\.0-9a-z-]+@otherdomain.+[a-z]",$email))
   )
$stop = ""._ERRORINVEMAIL."";
---snip---

This doesn't work. (it returns the error no matter what I enter)

Thanks guys (and gals?)

Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Clayton Dukes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 9:08 AM
Subject: Regular Expression help


> Hi everyone,
>
> I have a new user function that checks e-mail addresses.
> I wish to only allow people from two different domains to register.
> How can I filter out all other e-mail addresses and return an error if
it's
> not from those domains.
>
> Here's what I have:
>
> if ((!$email) || ($email=="") ||
> (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$email)))
$stop
> = ""._ERRORINVEMAIL."";
>
> What this currently does is just makes sure it's a valid e-mail address.
> What I'd like it to do is if the user enters anything except @domain1.com
or
> @domain2.com it spits out the error (ERRORINVEMAIL)
>
> So (I think) It would look something like this:
>
> if ((!$email) || ($email=="") || (!eregi("^[_\.0-9a-z-]+@([DdOoMmAaIiNn1]
||
> (or statement???) [DdOoMmAaIiNn2-]+\.)+[a-z]{2,3}$",$email))) $stop =
> ""._ERRORINVEMAIL."";
>
>
> Of course, this doesn't work, but you get the point.
>
>
> Thanks!
> P.S.
> Thanks for the Awesome List!
>
> Clayton Dukes
> CCNA, CCDA, CCDP, CCNP
> Download Free Essays, Term Papers and Cisco Training from
http://www.gdd.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]




[PHP] Regular Expression help

2001-06-29 Thread Clayton Dukes

Hi everyone,

I have a new user function that checks e-mail addresses.
I wish to only allow people from two different domains to register.
How can I filter out all other e-mail addresses and return an error if it's
not from those domains.

Here's what I have:

if ((!$email) || ($email=="") ||
(!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$email))) $stop
= ""._ERRORINVEMAIL."";

What this currently does is just makes sure it's a valid e-mail address.
What I'd like it to do is if the user enters anything except @domain1.com or
@domain2.com it spits out the error (ERRORINVEMAIL)

So (I think) It would look something like this:

if ((!$email) || ($email=="") || (!eregi("^[_\.0-9a-z-]+@([DdOoMmAaIiNn1] ||
(or statement???) [DdOoMmAaIiNn2-]+\.)+[a-z]{2,3}$",$email))) $stop =
""._ERRORINVEMAIL."";


Of course, this doesn't work, but you get the point.


Thanks!
P.S.
Thanks for the Awesome List!

Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.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] converting Word documents to something sensible

2001-06-24 Thread Clayton Dukes

Hey folks,
Do you know if there is anything like this that works on PDF's and can
actually look decent?
Not pdf2htm or something like that, it sux :-)


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
(c) 904.477.7825
(h) 904.292.1881
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Zak Greant" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Justin Farnsworth" <[EMAIL PROTECTED]>
Cc: "php general" <[EMAIL PROTECTED]>
Sent: Sunday, June 24, 2001 1:42 PM
Subject: Re: [PHP] converting Word documents to something sensible


> Hi Phil,
>
> There are a few options that may meet your needs:
>
>   Word2x (http://word2x.alcom.co.uk/)
>
>   LAOLA  (http://user.cs.tu-berlin.de/~schwartz/pmh/)
>
>
> Good Luck!!
>
> --zak
>
>
> - Original Message -
> From: "Phil Driscoll" <[EMAIL PROTECTED]>
> To: "Justin Farnsworth" <[EMAIL PROTECTED]>
> Cc: "php general" <[EMAIL PROTECTED]>
> Sent: Sunday, June 24, 2001 11:39 AM
> Subject: Re: [PHP] converting Word documents to something sensible
>
>
> > On Sunday 24 June 2001 16:32, Justin Farnsworth wrote:
> > > Try the latest AbiWord...
> > I've just installed it, but I can't find any obvious way to invoke it at
> the
> > command line to load a Word file and save out html or rtf. Am I missing
> > something? Also, when I tested the software via its gui and load a Word
> file
> > from the project I'm working on, the software crashed and exited with a
> load
> > of panic messages :(
> >
> > Cheers
> > --
> > Phil Driscoll
> >
> > --
> > 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] Nuke

2001-06-20 Thread Clayton Dukes

Hey,
Is anyone here using Nuke?

I have a couple of q's, perhaps you can answer them :-)

1. On the Banner Administration:
 How do I include html banners with javascript in them and not just and
image url and click url?

2. My language (english) file is missing a whole bunch of variables for the
Banner admin page, does anyone have an update/better english language file?

3. Does anyone know how to incliude a themesidebox monthly view of the
calendar?

If you answer all these for me, I'll name my firstborn after you ;-)

TIA!!!

Clayton Dukes



-- 
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: Lists are back up

2001-06-18 Thread Clayton Dukes

Fair enough, I'll give you that :-)



-=]-Original Message-
-=]From: Alexander Skwar [mailto:[EMAIL PROTECTED]]
-=]Sent: Monday, June 18, 2001 6:01 PM
-=]To: Clayton Dukes
-=]Cc: bard; John Donagher; [EMAIL PROTECTED]
-=]Subject: Re: [PHP] Re: Lists are back up
-=]
-=]
-=]So sprach Clayton Dukes am Mon, Jun 18, 2001 at 05:38:26PM -0400:
-=]> Why not just set your filter to look for
-=][EMAIL PROTECTED] in the to
-=]> or cc line?
-=]
-=]Because not all filters support that, and it makes reading mails eg. via
-=]webmail interfaces easier?
-=]
-=]Alexander Skwar
-=]--
-=]How to quote:http://learn.to/quote (german)
-=]http://quote.6x.to (english)
-=]Homepage:http://www.digitalprojects.com   |   http://www.iso-top.de
-=]   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
-=] Uptime: 2 days 6 hours 21 minutes




RE: [PHP] Re: Lists are back up

2001-06-18 Thread Clayton Dukes

Why not just set your filter to look for [EMAIL PROTECTED] in the to
or cc line?

Clayton Dukes
MicroMuse, Inc.
CIC Product Engineer
CCNA, CCDA, CCDP, CCNP
(c) 904-631-4131
(o) 904-880-5996

-=]-Original Message-
-=]From: bard [mailto:[EMAIL PROTECTED]]
-=]Sent: Monday, June 18, 2001 6:00 PM
-=]To: John Donagher
-=]Cc: [EMAIL PROTECTED]
-=]Subject: [PHP] Re: Lists are back up
-=]
-=]
-=]ditto that.
-=]On Mon, 18 Jun 2001, John Donagher wrote:
-=]
-=]>
-=]> Any chance we can get the [LISTNAME] subject prefixing so all
-=]my filters
-=]> don't break? :)
-=]>
-=]> John
-=]>
-=]> On Mon, 18 Jun 2001, Rasmus Lerdorf wrote:
-=]>
-=]> > We have re-enabled the PHP mailing lists.  They are now
-=]running from a
-=]> > temporary machine sitting on the floor of my spare bedroom.  A more
-=]> > permanent home is in the works.
-=]> >
-=]> > -Rasmus
-=]> >
-=]> >
-=]>
-=]>
-=]--
-=]If society fits you comfortably enough, you call it freedom.
-=] -- Robert Frost




Re: [PHP] PHP-Nuke vs. PHP-BB vs. ???

2001-05-23 Thread Clayton Dukes

Try PHPWebsite, it's a cleaned up version of Nuke and runs very well.

http://phpwebsite.appstate.edu

Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net






- Original Message -
From: "Tyrone Mills" <[EMAIL PROTECTED]>
To: "PHPlist" <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 9:28 PM
Subject: [PHP] PHP-Nuke vs. PHP-BB vs. ???


> Hello All,
>
> I'm looking for input and/or advice on selecting a Portal System like
> PHP-Nuke or PHP-BB. I haven't used any of these products, so I don't
really
> have an opinion myself.
>
> Here's what I want to be able to do:
>
> - Modify the system, so it needs to be PHP based
> - Use MySQL as the backend
> - Have flexibility with user access levels
> - Have a reasonably secure/solid system
>
> I've seen a lot of posts on Bugtraq with regards to problems in PHP-Nuke.
> Does anyone have any experience with this? Any other systems anyone can
> recommend?
>
> Thanks in advance!
>
> 
> UNIX is user-friendly, it's just picky about who its friends are...
>
>
>
>
>






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

2001-05-19 Thread Clayton Dukes

Definately, thanks!


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Kurth Bemis" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, May 19, 2001 3:37 PM
Subject: Re: [PHP] Expense


>
> Clayton - I'm working on a similar time tracking tool myself...then it
> exports the data in CSV format.  I'm looking at having it complete next
> week.  I'll notify you when it done if your intrested.
>
> ~kurth
>
> On Sat, 19 May 2001, Clayton Dukes wrote:
>
> > I did actually look there first. Nothing listed
> >
> > Thanks anyways :-)
> >
> >
> > Clayton Dukes
> > CCNA, CCDA, CCDP, CCNP
> > Download Free Essays, Term Papers and Cisco Training from
http://www.gdd.net
> >
> >
> > - Original Message -
> > From: "Navid Yar" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, May 19, 2001 3:35 PM
> > Subject: [PHP] Expense
> >
> >
> > > Clayton, you might want to try hotscripts.com. They have a load of
scripts
> > > you can choose from, and it's all categorized as well. Good luck
> > >
> > > Navid Yar
> > >   -Original Message-
> > >   From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> > >   Sent: Saturday, May 19, 2001 2:22 PM
> > >   To: [EMAIL PROTECTED]
> > >   Subject: [PHP] Expense
> > >
> > >
> > >   Does anyone know where I can find some type of Expense
Report/Tracking
> > > system written in PHP?
> > >
> > >   I'm tired of tracking all my stuff in Excel and sending it in so I
> > thought
> > > I'd take a crack at making an online tracking system for multiple
> > employees
> > > that could possibly export to Excel if needed.
> > >
> > >   Thanks for any help :-)
> > >
> > >
> > >   Clayton Dukes
> > >   CCNA, CCDA, CCDP, CCNP
> > >   Download Free Essays, Term Papers and Cisco Training from
> > > http://www.gdd.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]
> >
> >


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

2001-05-19 Thread Clayton Dukes

I did actually look there first. Nothing listed

Thanks anyways :-)


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Navid Yar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 19, 2001 3:35 PM
Subject: [PHP] Expense


> Clayton, you might want to try hotscripts.com. They have a load of scripts
> you can choose from, and it's all categorized as well. Good luck
>
> Navid Yar
>   -----Original Message-
>   From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
>   Sent: Saturday, May 19, 2001 2:22 PM
>   To: [EMAIL PROTECTED]
>   Subject: [PHP] Expense
>
>
>   Does anyone know where I can find some type of Expense Report/Tracking
> system written in PHP?
>
>   I'm tired of tracking all my stuff in Excel and sending it in so I
thought
> I'd take a crack at making an online tracking system for multiple
employees
> that could possibly export to Excel if needed.
>
>   Thanks for any help :-)
>
>
>   Clayton Dukes
>   CCNA, CCDA, CCDP, CCNP
>   Download Free Essays, Term Papers and Cisco Training from
> http://www.gdd.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]




[PHP] Expense

2001-05-19 Thread Clayton Dukes



Does anyone know where I can find some type of 
Expense Report/Tracking system written in PHP?
 
I'm tired of tracking all my stuff in Excel and 
sending it in so I thought I'd take a crack at making an online tracking system 
for multiple employees that could possibly export to Excel if needed. 

 
Thanks for any help :-)
 
 
Clayton DukesCCNA, CCDA, CCDP, CCNPDownload 
Free Essays, Term Papers and Cisco Training from http://www.gdd.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] Commercial sites that use PHP

2001-04-10 Thread Clayton Dukes

I don't know if he'll be impressed, but I am :-)

http://www.gdd.net


Offers free Cisco Training as well as High School and College level essays.

Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

- Original Message -
From: "Phil Labonte" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 10, 2001 9:52 AM
Subject: [PHP] Commercial sites that use PHP


> Can anyone send me a list of large commercial web sites that use PHP?
>
> I am trying to move to PHP here at work but I need some examples to
impress
> the boss!!!
>
> 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 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] scramble the code -sneaky solution (redux)

2001-04-05 Thread Clayton Dukes

This is off topic, but I have a RAQ 2 for sale. If any of you are
interested, please e-mail me off this list.

Thanks :-)

Clayton Dukes
CCNA, CCDA, CCDP, CCNP
-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Steve Werby" <[EMAIL PROTECTED]>
To: "Lindsay Adams" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]>
Sent: Thursday, April 05, 2001 1:21 PM
Subject: Re: [PHP] scramble the code -sneaky solution (redux)


> "Lindsay Adams" <[EMAIL PROTECTED]> wrote:
> > This was the easiest way for me to do it, in PHP3. PHP3 was all that I
> could
> > get installed on a Qube2 at the time of install.
> >
> > I am working on getting 4.04pl1 on my Qube2, but, the hidden frame trick
> is
> > still quite handy ;)
>
> I have 4.03 installed on a RaQ2 and AFAIK it will install on a Qube2 since
> they share the same software.  I've yet to install 4.04 on a RaQ2 though.
>
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.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] Installation

2001-03-30 Thread Clayton Dukes

Actually, the "lite" only works with versions of Redhat lower than 7 (or
something like that).
The full version is only like 89 bux.

But it is an awesome product, only takes about 5 minutes to install and
works perfect.


Clayton Dukes
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net



- Original Message -
From: "Romeo Manzur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 11:37 AM
Subject: Re: [PHP] Installation


> www.abriasoft.com
> luck...
>
> Augusto Cesar Castoldi wrote:
>
> > I'm just installed php4 and apache 1.3 on my linux.
> >
> > Apache with html files is working fine, but php isn't.
> >
> > The browser are showing the code.
> >
> > what I do?
> >
> > thanks,
> >
> > Augusto
> >
> > --
> > 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]
>
> --
> --
> Romeo Manzur
> Web Application Developer
> iSilicom
> Av. 27 de Febrero 904-A Desp 1, Centro
> C.P.:86000
> Villahermosa, Tabasco, Mexico
> Tel.:(52)(9)3-12-4790
> --
>
>
>
> --
> 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] Help!

2001-03-29 Thread Clayton Dukes

I think I would have just killed myself if that were the case, I spent way
too long building this puppy to let it go so quickly :-)


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "David Robley" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 7:44 PM
Subject: Re: [PHP] Help!


> On Fri, 30 Mar 2001 09:20, Clayton Dukes wrote:
> > So, I went back through my command line history and found the culprit,
> > if anyone's interested
> >
> > I typed:
> > chmod 666 file.php *
> >
> > When I should have typed
> > chmod 666 file.php*
> >
> > Damn, I love Unix :-)
>
> Be thankful it was chmod, not something interesting like, say, rm -r :-)
>
> And imagine if you were also superuser, in the / directory :-) :-)
>
> --
> David Robley| WEBMASTER & Mail List Admin
> RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
> AusEinet| http://auseinet.flinders.edu.au/
> Flinders University, ADELAIDE, SOUTH AUSTRALIA


-- 
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] Help!

2001-03-29 Thread Clayton Dukes

So, I went back through my command line history and found the culprit, if
anyone's interested

I typed:
chmod 666 file.php *

When I should have typed
chmod 666 file.php*

Damn, I love Unix :-)


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net



- Original Message -
From: "Clayton Dukes" <[EMAIL PROTECTED]>
To: "Johnson, Kirk" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 6:28 PM
Subject: Re: [PHP] Help!


> Yes,
> I've got it now.
>
> Scared the crap out of me
> I must have typo'd on a perm change, man that'll ruin your friggin day!
>
>
> Clayton Dukes
> CCNA, CCDA, CCDP, CCNP
> Internetwork Solutions Engineer
> Internetwork Management Engineer
> Thrupoint, Inc.
> Tampa, FL
> (c) 904.477.7825
> (h) 904.292.1881
>
> - Original Message -
> From: "Johnson, Kirk" <[EMAIL PROTECTED]>
> To: "'Clayton Dukes'" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, March 29, 2001 6:24 PM
> Subject: RE: [PHP] Help!
>
>
> > Did the permissions get changed to something that nobody can no longer
> read?
> >
> > Kirk
> >
> > > - Original Message -
> > > From: Clayton Dukes
> > > To: [EMAIL PROTECTED]
> > > Cc: [EMAIL PROTECTED]
> > > Sent: Thursday, March 29, 2001 6:06 PM
> > > Subject: [PHP] Help!
> > >
> > >
> > > Arrrgh,
> > >
> > > Something went haywire with my site a little while ago,
> > > can somebody tell me why I'm getting:
> > >
> > > Warning: Failed opening 'themes/JET/theme.php' for
> > > inclusion
> > > (include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/w
> > > ebsites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/php
> > > weather') in /home/www/web/header.php on line 46
> > >
> > >
> > > I don't know why it doesn't see the file, it's there.
> > > I tried putting it in the include path even, no such luck.
> > >
> > > I'm dying here, please help asap :-)>
> >
> > --
> > 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] Help!

2001-03-29 Thread Clayton Dukes

Yes,
I've got it now.

Scared the crap out of me
I must have typo'd on a perm change, man that'll ruin your friggin day!


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

- Original Message -
From: "Johnson, Kirk" <[EMAIL PROTECTED]>
To: "'Clayton Dukes'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 6:24 PM
Subject: RE: [PHP] Help!


> Did the permissions get changed to something that nobody can no longer
read?
>
> Kirk
>
> > - Original Message -
> > From: Clayton Dukes
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Sent: Thursday, March 29, 2001 6:06 PM
> > Subject: [PHP] Help!
> >
> >
> > Arrrgh,
> >
> > Something went haywire with my site a little while ago,
> > can somebody tell me why I'm getting:
> >
> > Warning: Failed opening 'themes/JET/theme.php' for
> > inclusion
> > (include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/w
> > ebsites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/php
> > weather') in /home/www/web/header.php on line 46
> >
> >
> > I don't know why it doesn't see the file, it's there.
> > I tried putting it in the include path even, no such luck.
> >
> > I'm dying here, please help asap :-)>
>
> --
> 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] Help!

2001-03-29 Thread Clayton Dukes

Heh,
Thanks.

Btw, the web site I'm trying so frantically to fix has all the study materials for the 
Cisco Certs, free of course :-)

http://www.gdd.net


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

  - Original Message - 
  From: Kath 
  To: Clayton Dukes 
  Sent: Thursday, March 29, 2001 6:13 PM
  Subject: Re: [PHP] Help!


  > CCNA, CCDA, CCDP, CCNP

  Wow, those are some credentials!  

  I'm taking CCNA semester 2 right now...

  (Sorry I couldn't be of help, just wanted to tell you how 
  impressed I was)

  - Kath
- Original Message - 
From: Clayton Dukes 
To: [EMAIL PROTECTED] 
Cc: [EMAIL PROTECTED] 
Sent: Thursday, March 29, 2001 6:06 PM
Subject: [PHP] Help!


Arrrgh,

Something went haywire with my site a little while ago, can somebody tell me why 
I'm getting:

Warning: Failed opening 'themes/JET/theme.php' for inclusion 
(include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/websites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/phpweather')
 in /home/www/web/header.php on line 46


I don't know why it doesn't see the file, it's there.
I tried putting it in the include path even, no such luck.

    I'm dying here, please help asap :-)


Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881






-- 
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] Help!

2001-03-29 Thread Clayton Dukes



Arrrgh,
 
Something went haywire with my site a little while 
ago, can somebody tell me why I'm getting:
 
Warning: Failed opening 'themes/JET/theme.php' for 
inclusion 
(include_path='.:/etc/httpd/conf/php:/home/www/web:/home/www/websites/acxiom/phonebook/phplib/php:/home/www/web/plug-ins/phpweather') 
in /home/www/web/header.php on line 46
 
I don't know why it doesn't see the file, it's 
there.
I tried putting it in the include path even, no 
such luck.
 
I'm dying here, please help asap :-)
 
 
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
EngineerThrupoint, Inc.Tampa, FL(c) 904.477.7825(h) 
904.292.1881

-- 
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 uploading big (50MB) file

2001-03-29 Thread Clayton Dukes

This is set by max_execution_time, did you restart apache to re-read your
php.ini file?



Clayton Dukes
-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net







- Original Message -
From: "Gilles-Eric Descamps" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 4:06 PM
Subject: [PHP] problem uploading big (50MB) file


> Hi,
>
> I'm using IE 5.01 to upload a big (~50MB) file to a form.
>
> The form works well for small files.
> If I try a big file, IE timeout after 30 seconds
> saying "cannot find server or DNS error"
> This same exact php code works for small files...
>
> I've modified php.ini to
> max_execution_time = 120
> memory_limit = 104857600; Maximum amount of memory a
script
> may consume (100MB)
> post_max_size = 100M
> upload_tmp_dir  =/tmp   ; temporary directory for HTTP
> uploaded files (will use system default if not specified)
> /tmp has 1GB free
> upload_max_filesize = 104857600   ; 100 Meg default limit on file
> uploads
>
> I've verified this through the php info function.
>
> I'm running Apache/1.3.9 (Unix) PHP/4.0.3pl1 on a Solaris 2.6 sparc
server.
>
> MS Internet Explorer 5.01 keeps timing out after 30 seconds...
>
> Any ideas ?
>
> --
> Gilles-Eric DESCAMPS,   Voice: (408) 545-1130
> SILICON ACCESS NETWORKS   Fax: (419) 844-7467
> <Enabling the Future Internet   >
> 211 River Oaks Parkway  - San Jose, CA, 95134
> mailto:[EMAIL PROTECTED]
> "Sed quis custodiet ipsos custodes ?"
>
>
>
> --
> 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] Extracting just the filename from REQUEST_URI

2001-03-28 Thread Clayton Dukes

Better yet,

Here's what I'm trying to do:

If someone does a search in a search engine, let's say google...

The user does a search for "foo"

google returns my website with a link to "foo"
which no longer exists (because I've moved it).

How can I get the query string passed from google and put that into my search page?

ie:

User searches for "foo"
Google returns http://www.gdd.net/somedir/somedir/file.html

User clicks on the link and gets a 404.html page

The 404.html page gets the string that the user was searching on and passes that into 
a search form on my website.


Search: 

Where $SEARCH was the search that the user entered in Google.

How can I do this?


Clayton Dukes
-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


  - Original Message - 
  From: Clayton Dukes 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, March 28, 2001 12:11 PM
  Subject: [PHP] Extracting just the filename from REQUEST_URI



  I have a REQUEST_URI that comes in,

  REQUEST_URI=//training/olddata/file.htm

  How can I extract just the filename? ( $str=file.htm)


  Clayton Dukes
  -
  Download Free Essays, Term Papers and Cisco Training from http://www.gdd.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]



[PHP] Extracting just the filename from REQUEST_URI

2001-03-28 Thread Clayton Dukes



 
I have a REQUEST_URI that comes in,
 
REQUEST_URI=//training/olddata/file.htm
 
How can I extract just the filename? ( 
$str=file.htm)
 
 
Clayton 
Dukes-Download 
Free Essays, Term Papers and Cisco Training from http://www.gdd.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]


[PHP] eregi not working???

2001-03-20 Thread Clayton Dukes



 
I have a script that looks for  tags, 
but it doesn't seem to be picking up the titles, can anyone tell me 
why?
 
 
 Almost all of the web pages look like:  
 if(!isset($mainfile)) { include("mainfile.php"); 
} if(!isset($headers_sent)) { include("header.php"); 
} ?>   
Some Title       
   Here's my 
function:
 
 function 
getTitle(&$doc) { 
if (eregi("(.*)", $doc, 
$titlematch)) 
$title = trim(eregi_replace("[[:space:]]+", " " , 
$titlematch[1])); 
else 
$title = ""; if ($title == 
"") 
$title = "Untitled 
Document"; return 
$title; } it runs okay... But, when I use 
the function, everything is coming back as "Untitled Document".  
Any suggestions?   Clayton 
Dukes - Download 
Free Essays, Term Papers and Cisco Training from http://www.gdd.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] PHP/Perl/CGI Question

2001-03-20 Thread Clayton Dukes

I was afraid you were going to say that...
Anyone care to show me how to write that?

Clayton Dukes
-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net

- Original Message -
From: "Andrew Rush" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 2:33 PM
Subject: Re: [PHP] PHP/Perl/CGI Question


> on 3/20/01 02:21 PM, [EMAIL PROTECTED] splat open and thusly melted:
>
> > What am I doing wrong? Why is it printing the php tags instead of
executing
> > them?
>
> because the output of a CGI cannot then be run through the PHP parser. you
> could possibly write the PHP out to a new file (with the proper extension
> for the parser) and then send a location header() that sends the user to
> execute that page. i've never done this, so i can't vouch for it's
> workability, but there's nothing wrong with the idea in concept- at least
so
> far as i can see
>
> --
> :: Andrew Rush :: Lead Systems Developer :: MaineToday.com ::
> **
> "Crippled but free, blind all the time, i was learning to see"
>
> - J. Garcia / R. Hunter
> **
>
> The  views expressed herein are not necessarily those of my employer, but
> they let me have them anyway.


-- 
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() question

2001-03-20 Thread Clayton Dukes

$message .= $Info;
$message .="";
$message .=$Phone;
$message .="";
$message .=$Email;


This should append everything, but I could be wrong, I'm no Guru :-)


Clayton Dukes
-
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net


- Original Message -
From: "Wade DeWerff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 20, 2001 2:36 PM
Subject: [PHP] mail() question


is there a way to do this in a mail() ? I need to add the $Phone and $Email
variables too the $message, but I need to format it so that it is on a new
line in the emailI tried using  and /n, but it formats as text not
code function.


$message = $Info ."". $Phone ."". $Email;





-- 
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/Perl/CGI Question

2001-03-20 Thread Clayton Dukes



Howdy,
 
I have a search cgi form that has the following 
function:
 
sub 
header{    print "Content-type: 
text/html\n\n";    print "\n";    
print "\n";    
print "Search\n";}
 
When I use the function though, the web page 
(source) comes up as:
Search...datainclude("footer.php");?>
 
What am I doing wrong? Why is it printing the php 
tags instead of executing them?
 
Clayton 
Dukes-Download 
Free Essays, Term Papers and Cisco Training from http://www.gdd.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]


[PHP] escaping php syntax within perl

2001-03-20 Thread Clayton Dukes



Hey everyone,
 
Doesn anyone know how to escape the following 
line in a perl print statement?
 
if(!isset($mainfile)) { include("mainfile.php"); 
}
 
ie:
 
sub 
header{    print "\n";
}
 
What all needs to be escaped?
 
 
Thanks!
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
Engineer-Download 
Free Essays, Term Papers and Cisco Training from http://www.gdd.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]


[PHP] Searching multiple tables

2001-03-19 Thread Clayton Dukes



I'm having a hard time chasing down a 
bug.
 
I have themes installed on my website, the color 
choices are stored in the database.
I need to search all tables within the database for 
the word "red"
how can I do this?
 
Thanks :-)
 
 
 
Clayton Dukes

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

2001-03-18 Thread Clayton Dukes

Thanks :-)

- Original Message - 
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Clayton Dukes" <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 12:08 AM
Subject: RE: [PHP] headers_sent


> don't you need the () after headers_sent?
> if(!isset(headers_sent()){include("header.php");}
> haven't tried it but i'd think that would work
> 
> jack
>   -Original Message-
>   From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
>   Sent: Sunday, March 18, 2001 11:38 PM
>   To: [EMAIL PROTECTED]
>   Subject: [PHP] headers_sent
> 
> 
>   What's the proper syntax for headers_sent?
> 
>   I tried:
>   if(!isset(headers_sent)) { include("header.php"); }
> 
>   But I get:
>   Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
> /home/www/websites/pw/cisco/config/index.htm on line 3
> 
> 
> 
> 
>   Clayton Dukes
>   CCNA, CCDA, CCDP, CCNP
>   Internetwork Solutions Engineer
>   Internetwork Management Engineer
>   Thrupoint, Inc.
>   Tampa, FL
>   (c) 904.477.7825
>   (h) 904.292.1881
> 


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

2001-03-18 Thread Clayton Dukes



What's the proper syntax for 
headers_sent?
 
I tried:
if(!isset(headers_sent)) { include("header.php"); 
}
 
But I get:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' 
in /home/www/websites/pw/cisco/config/index.htm on line 
3
 
 
 
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
EngineerThrupoint, Inc.Tampa, FL(c) 904.477.7825(h) 
904.292.1881

-- 
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 post without pathinfo

2001-03-18 Thread Clayton Dukes

Yeah,
I just can't figure out how to do it.
Anyone care to enlighten me?
Clayton Dukes

- Original Message - 

From: Chris Anderson 
    To: Clayton Dukes 
Sent: Wednesday, March 14, 2001 1:04 PM
Subject: Re: [PHP] form post without pathinfo


Sounds like you just need to use $PHP_Self with your other variables after it, 
that way it gets the right settings
ex:
echo $PHP_SELF$color$etc
  - Original Message - 
  From: Clayton Dukes 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, March 17, 2001 4:57 PM
  Subject: [PHP] form post without pathinfo


  Hi :-)

  How can I convert from this:
  
  
  ...snip
  } elseif ($pathinfo == "/approve") {
  do something...


  to something that posts to itself without altering the path?
  My problem is, I'm using themes which are dependent on the path, so if I post 
using the method above, the path changes and screws up the images, colors, etc after 
the user submits.

  TIA!

  Clayton Dukes



--


  -- 
  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 post without pathinfo

2001-03-17 Thread Clayton Dukes



Hi :-)
 
How can I convert from this:


...snip
} elseif ($pathinfo == "/approve") {
do something...
 
 
to something that posts to itself without altering 
the path?
My problem is, I'm using themes which are dependent 
on the path, so if I post using the method above, the path changes and screws up 
the images, colors, etc after the user submits.
 
TIA!
 
Clayton Dukes

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

2001-03-17 Thread Clayton Dukes

Thanks :-)


Clayton Dukes


- Original Message - 
From: "Brett" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Saturday, March 17, 2001 9:17 AM
Subject: Re: [PHP] Headers


> > How do I do something like:
> > if headers_sent=false
> > include header.inc
> >
> 
> if (headers_sent() == false)include 'header.inc';
> 
> be sure and check the manual to make sure that "header_sent()" is the
> correct format.
> 
> Brett
> 
> 
> -- 
> 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] Headers

2001-03-17 Thread Clayton Dukes

Thanks,

How do I do something like:
if headers_sent=false
include header.inc

else

some other thing



Please forgive my inexperience, I'm still learning :-)



Clayton Dukes

- Original Message -
From: "Gianluca Baldo" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, March 17, 2001 8:55 AM
Subject: Re: [PHP] Headers


> Clayton,
> PHP has a function for that:
>
> headers_sent
> (PHP 3>= 3.0.8, PHP 4 >= 4.0b2)
> headers_sent -- Returns true if headers have been sent
> Description
> boolean headers_sent (void)
> This function returns true if the HTTP headers have already been sent,
false otherwise.
> See also header()
>
> Cheers,
>Gianluca
>
> CD> I'm sure everyone's seen the following:
>
> CD> Warning: Cannot add header information - headers already sent by
(output started
>
> CD> But,
> CD> How can I add check to see if the header information has not been sent
and add it if it hasn't (else just print without the header info)?
>
>
> CD> TIA!
> CD> Clayton Dukes
>
>
>
>
> --
> ALBASOFTWARE
> C/ Mallorca 186 - 3º 1ª
> 08036 Barcelona (Spain)
> Tel. +34 93454009 - +34 934549324
> Fax. +34 934541979
> @@ ICQ 47323154 @@
> [EMAIL PROTECTED]
> http://www.albasoftware.com
> http://www.phpauction.org
> http://www.gianlucabaldo.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] Headers

2001-03-17 Thread Clayton Dukes



I'm sure everyone's seen the 
following:
 
Warning: Cannot add header information - headers already 
sent by (output started 
 
But,
How can I add check to see if the header 
information has not been sent and add it if it hasn't (else just print 
without the header info)?
 
 
TIA!
Clayton Dukes

-- 
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] Call to undefined function

2001-03-15 Thread Clayton Dukes

it's an older app.

But I got it. Thanks :-)



Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

- Original Message - 
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 7:03 PM
Subject: Re: [PHP] Call to undefined function


> clayton, 
> 
> checking php.net for 'page_open()' gives me nothingalso, why is it
> .php3 if you're on php 4.04?
> 
> jack
> 
> > Clayton Dukes wrote:
> > 
> > Hey everyone,
> > 
> > I just upgraded from php v4.03pl1 to php 4.04pl.
> > Everything seems to work okay except my IMP/Webmail.
> > 
> > When I load the url, I get:
> > Fatal error: Call to undefined function: page_open() in
> > /home/www/websites/horde/imp/index.php3 on line 15
> > 
> > Is this something that is no longer available in php v4.04? has anyone
> > else seen this?
> > 
> > 
> > 
> > 
> > 
> > Clayton Dukes
> > CCNA, CCDA, CCDP, CCNP
> > Internetwork Solutions Engineer
> > Internetwork Management Engineer
> > Thrupoint, Inc.
> > Tampa, FL
> > (c) 904.477.7825
> > (h) 904.292.1881
> > 
> > ---
> > --
> > 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] Call to undefined function

2001-03-15 Thread Clayton Dukes

Nevermind.
The php.ini was replaced which changed my include path.






Clayton Dukes
CCNA, CCDA, CCDP, CCNP
Internetwork Solutions Engineer
Internetwork Management Engineer
Thrupoint, Inc.
Tampa, FL
(c) 904.477.7825
(h) 904.292.1881

  - Original Message - 
  From: Clayton Dukes 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, March 15, 2001 6:53 PM
  Subject: [PHP] Call to undefined function


  Hey everyone,

  I just upgraded from php v4.03pl1 to php 4.04pl.
  Everything seems to work okay except my IMP/Webmail.

  When I load the url, I get:
  Fatal error: Call to undefined function: page_open() in 
/home/www/websites/horde/imp/index.php3 on line 15


  Is this something that is no longer available in php v4.04? has anyone else seen 
this?





  Clayton Dukes
  CCNA, CCDA, CCDP, CCNP
  Internetwork Solutions Engineer
  Internetwork Management Engineer
  Thrupoint, Inc.
  Tampa, FL
  (c) 904.477.7825
  (h) 904.292.1881



--


  -- 
  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] Call to undefined function

2001-03-15 Thread Clayton Dukes



Hey everyone,
 
I just upgraded from php v4.03pl1 to php 
4.04pl.
Everything seems to work okay except my 
IMP/Webmail.
 
When I load the url, I get:
Fatal error: Call to undefined function: page_open() in 
/home/www/websites/horde/imp/index.php3 on line 15
 
Is this something that is no longer available in 
php v4.04? has anyone else seen this?
 
 
 
 
 
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
EngineerThrupoint, Inc.Tampa, FL(c) 904.477.7825(h) 
904.292.1881

-- 
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] Interactive Shells

2001-03-15 Thread Clayton Dukes



Can PHP work with interactive shells such as 
telnet like Expect does?
 
ie:
waitfor "ogin:"
put $login
waitfor "assword:"
put $password
 
 
etc.
 
 
TIA! :-)
 
 
 
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
EngineerThrupoint, Inc.Tampa, FL(c) 904.477.7825(h) 
904.292.1881

-- 
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] demo application suggestions

2001-03-08 Thread Clayton Dukes

Try IMP webmail


- Original Message -
From: Chad Cunningham <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 8:30 PM
Subject: [PHP] demo application suggestions


>
> I am going to be manning a booth on apache at a Linux trade show, and I'm
> looking for suggestions on a good php app to show off. Seeing as a
> webserver alone is not too exciting, I thought it would be better off to
> show off what you can do with the apache platform and some of the modules
> available. If anyone has any suggestions on any php apps that would
> impress business types, please let me know. I might as well try and drum
> up some interest in PHP while I'm there :)
>
> --
>
> Chad Cunningham
> [EMAIL PROTECTED]
>
> "Well, once again my friend, we find that science is a two-headed beast.
One
> head is nice, it gives us aspirin and other modern conveniences,...but the
> other head of science is bad! Oh beware the other head of science, Arthur,
it
> bites!"
>
>
> --
> 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] system() and stdout

2001-03-04 Thread Clayton Dukes


You have to have the output as part of the system or exec command,
Here's a ping function, maybe this will help:

  exec("/bin/ping -c3 $ipaddr", $output, $error);
echo "\n";
while (list(,$line) = each($output)){
echo $line, "\n";
}
if ($error){
die("OS Error: $error. Try using man ping, this also usually boils
down to
path/permissions.");
}



- Original Message -
From: "Michael Robbins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 04, 2001 11:53 AM
Subject: [PHP] system() and stdout


> I am trying to use system() to run an external command and have the output
> placed into a variable using:
>
> $output = system("/usr/local/bin/somecommand");
>
> the output is placed into $output, and it also places it instream with the
> HTML.  Anyone know why this is happening? or how to properly put data from
> STDOUT into a variable?
>
> Any help is appreciated.
>
> Mike Robbins
>
>
> --
> 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] Cutting long strings for tables

2001-03-01 Thread Clayton Dukes

Juan,

I'm not sure, but isn't there a wrap function?





- Original Message -
From: Juan Germano <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 01, 2001 6:29 PM
Subject: [PHP] Cutting long strings for tables


> Hi. I use this function with the strings I'll be showing in tables to cut
> strings too long without spaces.
> To make it clear:
>
> 
>
> The table will be 50px width if $str isn't too long. Let's say:
> $str=""
> The table goes to hell.
> So:
> function cut_text($res,$long=15,$max=20){
> if ($max<=$long){$max=$long+2;}
> $ant="";
> while ($res!=$ant){
>  $ant=$res;
>  $res=addslashes($res);
>  $res= preg_replace ("/(\w){".$max.",}/im","'.substr
(\\0,0,$long).'
> '.substr (\\0,$long,strlen('\\0')-$long).'",$res);
>  $res=" return '$res';";
>  $res=eval($res);
> }
> return $res;
> }
>
> For example:
> $str="Hello How  areee yyyooouu";
> echo cut_text($str,7,10);
> Results in:
> Hello How  are ee yyy ooouu
>
> The idea is:  any word longer than 20 chars will split into a chunk of 15
> and a chunk of 5. If you have a 45 chars string, it will leave you with
20,
> 20 and 5.
> It works fine with simple text, but with characters like  ", / , $,  etc.
> sometimes I have problems. I tried with quotemeta instead of addslashes
but
> the problem persists. Anyone have an idea?. If you want to test the code,
> just try with
> Testing \" quotes
>
> Thanks in advance
>
> Juan I. Germano
> [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] A small Q

2001-02-28 Thread Clayton Dukes

It can bee .poopoo if you want it to be :-)


- Original Message - 
From: "Harshdeep S Jawanda" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Wednesday, February 28, 2001 10:04 AM
Subject: [PHP] A small Q


> Hi,
> 
> Does the extension of files that are require()-d or include()-d in PHP
> have to be ".inc"? Can it be ".php"?
> 
> All examples seem to show this extension as ".inc". Could there be any
> problems if the extension is kept ".php"?
> 
> --
> Regards,
> Harshdeep Singh Jawanda.
> 
> 
> 
> -- 
> 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] Converting code to a function

2001-02-27 Thread Clayton Dukes

Thanks :-)



- Original Message -
From: "Simon Garner" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 9:59 PM
Subject: Re: [PHP] Converting code to a function


> Clayton,
>
> The problem is that some of your variables, e.g. $HOSTNAME, $DB_USER,
etc.,
> are not global variables, and so are not accessible from inside the
> function.
>
> I recommend making those settings define()s instead of variables, but if
you
> keep them as variables then you just need to add:
>
>
>  function viewdoc ($docid)
> {
> global $HOSTNAME, $DB_USER, ...;
> ...
> }
> ?>
>
>
> But to do them as constants instead, do:
>
>  define("HOSTNAME", "myhost.net");
> define("DB_USER", "myuser");
> define("DB_PASS", "jksajfeioe");
>
> function viewdoc ($docid)
> {
> ...
>     $dbh = mysql_connect(HOSTNAME, DB_USER, DB_PASS);
> ...
> }
> ?>
>
>
> Hope this helps.
>
>
> Cheers
>
> Simon Garner
>
>
> - Original Message -
> From: "Clayton Dukes" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, February 28, 2001 3:51 PM
> Subject: [PHP] Converting code to a function
>
>
> Hi everyone :-)
>
> I need help, how can I convert the following code into a function so that
I
> can just place it in a global include file and call it using
> viewdoc($docid); whenever necessary?
>
> ---START---
> if ($docid == "") {
>   echo "Fatal Error - DocID not supplied";
>   exit;
>   }
>
>   $dbh = mysql_connect("$HOSTNAME","$DB_USER","$DB_PASS");
>   mysql_select_db("$DATABASE");
>
>   $sth = mysql_query("SELECT docdata FROM documents WHERE docid like
>   '$docid'");
>
>   $row = mysql_fetch_array($sth);
>
>   if ($row[0] != "") {
>   echo "DocID: $docid\n\n";
> echo (wraptext($row[0],72));
>
>   } else {
>   echo "Fatal Error - Can't fetch docid";
>   }
> ---END---
>
> I tried to do this:
> function viewdoc($docid) {
> ...PASTE FROM ABOVE...
> }
>
> But then I get:
>
> Warning: Supplied argument is not a valid MySQL result resource in
> /home/www/websites/gdd/inc/funcs.inc on line 76
> Fatal Error - Can't fetch docid
>
> when I call it from a web page using:
>
> viewdoc($docid);
>
>
> What have I done wrong?
>
>
>
> TIA!
> Clayton Dukes
>
>
>
>
> --
--
> 
>
>
> > --
> > 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] Converting code to a function

2001-02-27 Thread Clayton Dukes



Hi everyone :-)
 
I need help, how can I convert the following code 
into a function so that I can just place it in a global include file and call it 
using viewdoc($docid); whenever necessary?
 
---START---
if ($docid == "") 
{  echo "Fatal Error - 
DocID not supplied";  
exit;  }
 
  $dbh = 
mysql_connect("$HOSTNAME","$DB_USER","$DB_PASS");  
mysql_select_db("$DATABASE");
 
  $sth = mysql_query("SELECT docdata FROM 
documents WHERE docid 
like  
'$docid'");
 
  $row = mysql_fetch_array($sth);
 
  if ($row[0] != "") 
{  echo "DocID: 
$docid\n\n";    echo 
(wraptext($row[0],72));
 
  } else 
{  echo "Fatal Error - 
Can't fetch docid";  }
---END---
 
I tried to do this:
function viewdoc($docid) {
...PASTE FROM ABOVE...
}
 
But then I get:
 
Warning: Supplied argument is not a valid MySQL result 
resource in /home/www/websites/gdd/inc/funcs.inc on line 
76Fatal Error - Can't fetch docid  
 
when I call it from a web page using: 
 
viewdoc($docid);
 
 
What have I done wrong?
 
 
 
TIA!
Clayton Dukes

-- 
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] search + sitemap scripts

2001-02-27 Thread Clayton Dukes

Try DGS Search, very easy and works great!

http://www.digitalgenesis.com/software/dgssearch.html



- Original Message -
From: "Ali" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 2:22 PM
Subject: [PHP] search + sitemap scripts


> could anybody help with links to a good search and sitemap script written
in
> php. Thanks
>
> Ali
>
>
> --
> 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] good ide?

2001-02-27 Thread Clayton Dukes

Ouch!
At $250.00, I'll stick to using Vim for free :-)


- Original Message -
From: "James Moore" <[EMAIL PROTECTED]>
To: "Luke Loeffler" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 2:14 PM
Subject: RE: [PHP] good ide?


> May I suggest the Zend IDE, at the moment it is the only one to really be
a
> full IDE with Debugger support etc. you can get a demo of it from
> http://www.zend.com/store/.
>
> James
>
> > -Original Message-
> > From: Luke Loeffler [mailto:[EMAIL PROTECTED]]
> > Sent: 27 February 2001 08:32
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] good ide?
> >
> >
> > Does anyone know of a good PHP ide?  I've tried PHP-Coder, but it has
bugs
> > stem to stern, not the least of which mysteriously deleted an
> > entire page of
> > code... PHP Script editor I've also tried, but it is barren and
> > in German...
> >
> > If only there were a Sun Forte for php :(
> >
> > Luke
> >
> >
> > --
> > 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] How to wrap output of formatted text

2001-02-26 Thread Clayton Dukes

Nevermind,
I got it :-)

I used:


function wraptext($text,$warp) {
$text = explode(" ", $text);
$i = 0; $length = 0;
while ($i <= count($text)) {
$length += strlen($text[$i]);
 if ($length <= $warp) {
$output .= $text[$i]." ";
$i++;
} else {
$output .= "\n";
$length = 0;
}
}
return $output;
}


Then in the php file:

  echo (wraptext($row[0],80));



I'm learning :-)






  - Original Message - 
  From: Clayton Dukes 
  To: [EMAIL PROTECTED] 
  Sent: Monday, February 26, 2001 9:59 PM
  Subject: [PHP] How to wrap output of formatted text


  Hi all,

  how can I tell the output from a mysql query to wrap the cols at 80 (or whatever)?

  here's what I have:

  $row = mysql_fetch_array($sth);

if ($row[0] != "") {
echo $row[0];

  prints the data, but some of the results are long strings of text that don't wrap in 
the browser, how can I force them to wrap at the edge of the browser?



  Thanks,
  Clayton Dukes



--


  -- 
  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] How to wrap output of formatted text

2001-02-26 Thread Clayton Dukes



Hi all,
 
how can I tell the output from a mysql query to 
wrap the cols at 80 (or whatever)?
 
here's what I have:
 
$row = mysql_fetch_array($sth);
 
  if ($row[0] != "") 
{  echo $row[0];
 
prints the data, but some of the results are long 
strings of text that don't wrap in the browser, how can I force them to wrap at 
the edge of the browser?
 
 
 
Thanks,
Clayton Dukes

-- 
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] Making a variable -Trim output

2001-02-26 Thread Clayton Dukes

Dan...
You are the man, thanks! :-)


- Original Message -
From: "Dan Olsen" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 12:30 PM
Subject: RE: [PHP] Making a variable -Trim output


>
> clayton-
>
> the only problems were syntactic.
>
> there was an extra $ on the filename for file.txt, and there were no $'s
on
> the loop variable i (happens to me all the time, switching from perl to
> java(script) to php depending on what day it is).
>
> this code compiles and runs fine.
>
> 
> $arrayoflines = file('file.txt');
> $arraysize   = sizeof($arrayoflines);
> $limit = $arraysize - 2;
> $output = "";
>
> for ( $i=0; $i<$arraysize; $i++) {
> if ( ($i>12) && ($i<$limit) ) {
> $output .= $arrayoflines[$i];
> }
> }
>
> print $output;
>
> ?>
>
> enjoy,
> DanO
>
>
>
> -Original Message-
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 26, 2001 9:08 AM
> To: Dan Olsen
> Subject: Re: [PHP] Making a variable -Trim output
>
>
> Thanks so much for your help Dan,
>
> here's what I get when I try it:
>
> Parse error:  parse error, expecting `';'' in - on line 7
>
> line 7 is:
> for (i=0; i<\$arraysize; i++) {
>
> any ideas?
>
>
> - Original Message -
> From: "Dan Olsen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 26, 2001 12:02 PM
> Subject: RE: [PHP] Making a variable -Trim output
>
>
> >
> > yes but you might want to use a for() loop instead since you know what
you
> > want.
> >
> > $arrayoflines = file("$file.txt");
> > $arraysize   = sizeof($arrayoflines);
> > $limit = $arraysize - 2;
> >
> > for (i=0; i<$arraysize; i++) {
> > if ( (i>12) && (i<$limit) ) {
> > $output .= $arrayoflines[i];
> > }
> > }
> >
> > you'll have to debug, but it should work.
> >
> > DanO
> >
> >


-- 
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] Making a variable -Trim output

2001-02-26 Thread Clayton Dukes

Thanks again,
Is there a way I can tell it to print all but the first 13 lines and the
last two lines of the text file?

-Clayton


- Original Message -
From: "Dan Olsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 11:39 AM
Subject: RE: [PHP] Making a variable


>
> you can concatentate the variable inside the foreach loop.
>
> foreach (file("$file.txt") as $line) {
> $data .=  ("" . trim(str_replace("'", "''", $line)) . "\n");
> }
>
>
>
> -Original Message-
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 26, 2001 8:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Making a variable
>
>
> How can I make this a variable?
>
> ie:
>
>  foreach (file("$file.txt") as $line) {
>print ("" . trim(str_replace("'", "''", $line)) . "\n");
>}
>
> changed to:
>
> $data = foreach (file("$file.txt") as $line) {
>print ("" . trim(str_replace("'", "''", $line)) . "\n");
>}
>
> Simply adding the $data = in front of it doesn't work, I assume it needs
to
> be enclosed by () or ; or something right?
>
>
> Thanks :-)
>
>
> Clayton Dukes
>
>
> --
> 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] Making a variable

2001-02-26 Thread Clayton Dukes

Thanks!


- Original Message -
From: "Dan Olsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 11:39 AM
Subject: RE: [PHP] Making a variable


>
> you can concatentate the variable inside the foreach loop.
>
> foreach (file("$file.txt") as $line) {
> $data .=  ("" . trim(str_replace("'", "''", $line)) . "\n");
> }
>
>
>
> -Original Message-
> From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 26, 2001 8:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Making a variable
>
>
> How can I make this a variable?
>
> ie:
>
>  foreach (file("$file.txt") as $line) {
>print ("" . trim(str_replace("'", "''", $line)) . "\n");
>}
>
> changed to:
>
> $data = foreach (file("$file.txt") as $line) {
>print ("" . trim(str_replace("'", "''", $line)) . "\n");
>}
>
> Simply adding the $data = in front of it doesn't work, I assume it needs
to
> be enclosed by () or ; or something right?
>
>
> Thanks :-)
>
>
> Clayton Dukes
>
>
> --
> 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] Making a variable

2001-02-26 Thread Clayton Dukes



How can I make this a variable?
 
ie:
 
 foreach (file("$file.txt") as $line) 
{   print ("" . trim(str_replace("'", "''", $line)) . 
"\n");   }
 
changed to:
 
$data =  foreach (file("$file.txt") as $line) 
{   print ("" . trim(str_replace("'", "''", $line)) . 
"\n");   }
 
Simply adding the $data = in front of it doesn't 
work, I assume it needs to be enclosed by () or ; or something 
right?
 
 
Thanks :-)
 
 
Clayton Dukes

-- 
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] PERL to PHP

2001-02-26 Thread Clayton Dukes

How?
I don't know perl all that well, I am just trying to convert some scripts.


- Original Message -
From: "kevin1" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 10:29 AM
Subject: Re: [PHP] PERL to PHP


> your can use the PCRE functions in php - much better than ereg and all
> that - if you know perl already...
>
> Clayton Dukes wrote:
>
> >
> >
> > Hi :-)
> >
> > Can someone tell me how to do the equivalant of this Perl script in PHP?
> >
> >
> >
> > ###
> > ### This function prints all lines between the dashes read in a text
file
> > ###
> >
> > ### The file looks like this:
> >
> >
> >
> > # -
> >
> > # Somedata:   something
> >
> > # Someother:  something else
> >
> > # --
> >
> > #
> >
> > # Several paragraphs
> >
> > # Several paragraphs
> >
> > # Several paragraphs
> >
> > # --END--
> >
> > #
> >
> >
> >
> >
> >
> >
> >
> > #!/usr/bin/perl -w
> > @rray = ;
> >
> >
> >
> >
> > $inside = 0;
> > foreach $line (@rray) {
> >   if ($line =~ /-/ig) {
> > $inside = 1;
> >   } elsif ($line =~ /-/gi) {
> > $inside = 0;
> >   }
> >
> >
> >
> >   if ($inside == 1) {
> >   print $line;
> > }
> > }
> >
> >
> >
> >
> >
> > TIA!
> >
> > Clayton Dukes
> > CCNA, CCDA, CCDP, CCNP
> > Internetwork Solutions Engineer
> > Internetwork Management Engineer
> > Thrupoint, Inc.
> > Tampa, FL
> > (c) 904.477.7825
> > (h) 904.292.1881
> >
> > attachment.txt
> >
> > Content-Type:
> >
> > text/plain
>
>
>
> --
> 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] PERL to PHP

2001-02-26 Thread Clayton Dukes



 
Hi :-)
Can someone tell me how to do the equivalant of 
this Perl script in PHP?
 
## This function prints all lines between 
the dashes read in a text file###
### The file looks like this:
 
# -
# Somedata:   
something
# Someother:  
something else
# --
#
# Several paragraphs
# Several paragraphs
# Several paragraphs
# --END--
#
 
 
 
#!/usr/bin/perl -w@rray = ;
 
$inside = 0;foreach $line (@rray) {  if ($line =~ 
/-/ig) {    $inside = 1;  } elsif ($line =~ 
/-/gi) {    $inside = 0;  }
 
  if ($inside == 1) {  print $line;}}
 
 
TIA!
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
EngineerThrupoint, Inc.Tampa, FL(c) 904.477.7825(h) 
904.292.1881

-- 
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] Printing long strings

2001-02-25 Thread Clayton Dukes



How can I get php to print a long string and ignore 
any of the characters in the string?
 
ie:
$string = "so
print $string;
 
isn't there some kind of command to use that keeps 
the string exactly as it is?
 
 
 
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
EngineerThrupoint, Inc.Tampa, FL(c) 904.477.7825(h) 
904.292.1881

-- 
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] Unwanted Characters

2001-02-25 Thread Clayton Dukes


This doesn't seem to work, have I done something wrong?



$sometext = "ThÀe cØar röøan over mÖy dog\n";
   $thread =  ereg_replace("[^[:alnum:][:space:]]", "", $sometext);
   echo $thread;

still prints:
ThÀe cØar röøan over mÖy dog


Thanks,
Clayton


- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Sent: Sunday, February 25, 2001 2:28 AM
Subject: Re: [PHP] Unwanted Characters


> Clayton Dukes wrote:
> >
> > How do I remove unwanted/unprintable characters from a variable?
> >
> > $sometext = "ThÀe cØar röøan over mÖy dog"
> > needs to be filtered and reprinted as:
> > "The car ran over my dog"
> >
> > Thanks :-)
> > Clayton Dukes
>
>  $sometext = "ThÀe cØar röøan over mÖy dog";
> $thread =  ereg_replace("[^[:alnum:][:space:]]", "", $sometext);
> echo $thread
> ?>
>
> will print what you asked - of course you may not want numbers but you
> get the idea.
> I do this check on all my user inputs to php scripts- I choose what is
> allowed not what to deny which makes it easier.
>
> --
> 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] Unwanted Characters

2001-02-24 Thread Clayton Dukes


How do I remove unwanted/unprintable characters from a variable?

$sometext = "ThÀe cØar röøan over mÖy dog"
needs to be filtered and reprinted as:
"The car ran over my dog"




Thanks :-)
Clayton Dukes




Re: [PHP] comparing numbers

2001-02-24 Thread Clayton Dukes

Ahh, cool, thanks :-)


- Original Message -
From: "Joe Stump" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 10:03 PM
Subject: Re: [PHP] comparing numbers


> just replace the [] with ()
>
> if($id <= 59)
> {
>   $id = 81;
> }
>
> --Joe
>
> On Sat, Feb 24, 2001 at 09:54:08PM -0500, Clayton Dukes wrote:
> >
> > How can I do something like the following shell script, in PHP? (I know
this won't work normally, but you get the idea).
> >
> > if [ $id <= 59 ]; then
> > $id=81
> >
> > TIA!
> > Clayton Dukes
> >
>
> --
>
> --
-
> Joe Stump, PHP Hacker,
 -o)
> http://www.miester.org http://www.care2.com
/\\
> "It's not enough to succeed. Everyone else must fail" -- Larry Ellison
_\_V
> --
-


-- 
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] comparing numbers

2001-02-24 Thread Clayton Dukes


How can I do something like the following shell script, in PHP? (I know this won't 
work normally, but you get the idea).

if [ $id <= 59 ]; then
$id=81

TIA!
Clayton Dukes




Re: [PHP] Help with mass import to MySQL using PHP

2001-02-24 Thread Clayton Dukes

the first field, ID, is just for keeping a standard sequence and isn't
called from any web pages. The second ($docid) is a random field which is
called from a web page, which makes it harder (if not impossible) to
guess/hack. This makes it a bit more secure.

A note about the old docid #'s, my intention is to replace the old $docid
with one in the new format. And, since the random docid is based (partly) on
the time at which it was generated, there's not much chance of it being
duplicated.

- Original Message -
From: "richard merit" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 2:30 PM
Subject: Re: [PHP] Help with mass import to MySQL using PHP


> No answer, but a question.  I noticed you're using, in
> effect, two id's for each entry, a id number and a doc
> id number.  The first is accomplished thru
> auto-increment.  Wouldn't it be easier to us just one
> id number, a=LAST_INSERT_ID(id+b) and reserve the
> first 10k numbers (b), whatever is needed for your old
> files then run a php code to format your old entries
> and increment those 1 - 10and forget about
> random numbers.  If I'm not mistaken, if you generate
> random numbers you'll have to check, to be on the safe
> side, to make sure the random number wasn't used for
> someother doc.
>
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.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] Help with mass import to MySQL using PHP

2001-02-24 Thread Clayton Dukes

1. Local Server
2. Either one, I'm trying to learn PHP
3. Yes, this is just a project for which I am not making any money, but I can pay 
someone in respect and admiration ;-)

  - Original Message - 
  From: Todd Pillars 
  To: Clayton Dukes 
  Sent: Saturday, February 24, 2001 2:25 PM
  Subject: RE: [PHP] Help with mass import to MySQL using PHP


  Hi,
   couple of questions:
 1.are you doing this on a local server or a server on the internet?
 2.are you looking for a direction to do this yourself or for someone to write the 
code?
 3.are you looking for free advice?...I am all for free source, but this is going 
to take some time and energy.

  Todd
-Original Message-
From: Clayton Dukes [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 24, 2001 1:38 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Help with mass import to MySQL using PHP


Hi everyone,

I'm working on converting my site to PHP/MySql.


I need to figure out a way to import several thousand text files into the database 
while applying certain PHP functions to them.


From now on, when a user submits a new document, it gets a random docid assigned 
to it using the following method:


  $time = time();
  $rand = Random_Password(5);
  $docid = $time . $rand;

Random_Password is defined as:

function Random_Password($length) {
mt_srand((double)microtime()*1000);
$possible_characters = "abcdefghijklmnopqrstuvwxyz";
$string = "";
while(strlen($string)<$length) {
$string .=

substr($possible_characters,(mt_rand()%(strlen($possible_characters))),1);
}
return($string);



After they fill in a form and paste thier document, the following fields are 
submitted to the database:

$query = "INSERT INTO documents VALUES ('$docid', '$category', '$subcategory', 
'$date', '$subject', '$title', '$author', '$email', '$language', '$grade', '$level', 
'$city', '$state', '$county', '$school', '$zip', '$authors_comments', 
'$teachers_comments', 'N', '$docdata')";



Now, the million dollar question is:
how do I import the several thousand text documents I already have while applying 
this formulae, aside from manually submitting each one ;-)?

Here's an example of one of the text documents:
Currently, all text documents have exactly the same format:
--
$docid
$subject
$title
$author
$email
$language
$grade
$school
$country
$author_comments
$teacher_comments
$date
--
The only thing that changes are the fields after the colon and the body itself.
I realize that the current text files do not have all of the information for the 
new database such as $subcategory, I'm going to have to grandfather the old text files 
in somehow.
Also, there are certain fields that are enums in the database, so I need to make 
sure that each field conforms to that, eg; one of the subject fields in the database 
only allows for "Computers and Internet" not Computer, so I need to rewrite that 
string before placing it in the database. I also need to change $grade from any alpha 
strings to a percentile grade, eg: [b-B]=92 (see database format below).

--
Document ID: 100
Subject: Computer
Title  : internet beyond human control
Author :
Email Address  :
Language   : english
Grade  : b
School System  : ohio state university
Country: USA
Author's Comments  : tom dodd
Teacher's Comments : well done
Date   : 5/96
--




The Internet Beyond Human Control
The Internet has started to change the way of the world during this decade.  More 
homes,
companies, and schools are getting hooked online with the Internet during the past 
few years.
This  change has started to become the new way of life present and future. The 
Internet system is



And here's the database format:
CREATE TABLE dox (
  id bigint(20) DEFAULT '0' NOT NULL auto_increment,
  docid varchar(20),
  category enum('Language Arts','Sciences','Humanities','Arts','Special 
Subjects','Other'),
  subcategory enum('Physics','Biology',

[PHP] Help with mass import to MySQL using PHP

2001-02-24 Thread Clayton Dukes



Hi everyone,
 
I'm working on converting my site to 
PHP/MySql.
 
 
I need to figure out a way to import several 
thousand text files into the database while applying certain PHP functions to 
them.
 
 
From now on, when a user submits a new document, it 
gets a random docid assigned to it using the following method:
 
  $time = 
time();  $rand = 
Random_Password(5);  
$docid = $time . $rand;
 
Random_Password is defined as:
 
function Random_Password($length) 
{    
mt_srand((double)microtime()*1000);    
$possible_characters = 
"abcdefghijklmnopqrstuvwxyz";    
$string = "";    
while(strlen($string)<$length) 
{    
$string 
.=    
substr($possible_characters,(mt_rand()%(strlen($possible_characters))),1);    
}    return($string);
 
 
 
After they fill in a form and paste thier document, the following fields 
are submitted to the database:
 
$query = "INSERT INTO documents VALUES ('$docid', '$category', 
'$subcategory', '$date', '$subject', '$title', '$author', '$email', '$language', 
'$grade', '$level', '$city', '$state', '$county', '$school', '$zip', 
'$authors_comments', '$teachers_comments', 'N', '$docdata')";
 
 
 
Now, the million dollar question is:
how do I import the several thousand text documents 
I already have while applying this formulae, aside from manually submitting each 
one ;-)?
 
Here's an example of one of the text 
documents:

Currently, all text documents have exactly the same 
format:
--
$docid
$subject
$title
$author
$email$language$grade$school$country$author_comments$teacher_comments$date--
The only thing that changes are the fields after the colon and the body 
itself.
I realize that the current text files do not have all of the information 
for the new database such as $subcategory, I'm going to have to grandfather the 
old text files in somehow.
Also, there are certain fields that are enums in the database, so 
I need to make sure that each field conforms to that, eg; one of the subject 
fields in the database only allows for "Computers and Internet" not Computer, so 
I need to rewrite that string before placing it in the database. I also need to 
change $grade from any alpha strings to a percentile grade, eg: [b-B]=92 (see 
database format below).
 
--Document 
ID    : 
100Subject    
: 
ComputerTitle  
: internet beyond human 
controlAuthor 
:Email Address  
:Language   : 
englishGrade  
: bSchool System  : ohio state 
universityCountry    
: USAAuthor's Comments  : tom doddTeacher's Comments : well 
doneDate   
: 
5/96--
 
 
 
The Internet Beyond Human ControlThe 
Internet has started to change the way of the world during this decade.  
More homes,companies, and schools are getting hooked online with the 
Internet during the past few years.This  change has started to become 
the new way of life present and future. The Internet system is
 
 
 
And here's the database format:
CREATE TABLE dox (  id bigint(20) DEFAULT 
'0' NOT NULL auto_increment,  docid varchar(20),  category 
enum('Language Arts','Sciences','Humanities','Arts','Special 
Subjects','Other'),  subcategory 
enum('Physics','Biology','Chemistry','Math','Computers and 
Internet','History','Economics','Geography','Law','Religion','Philosophy','Black 
Awareness','Countries','Drugs','Education','Environmental 
Awareness','Politics','Health','Sex and Sexuality','Female 
Awareness','Art','Movies or TV','Music','Sports','Charles 
Dickens','Shakespeare','Biography','Fictional 
Stories','Astronomy','Mythology'),  date varchar(10),  subject 
varchar(200),  title varchar(200),  author 
varchar(200),  email varchar(50),  language 
enum('English','Danish','Dutch','Finnish','German','Spanish'),  grade 
int(3),  level enum('High School','College','Other'),  city 
varchar(15),  state varchar(15),  county 
varchar(15),  school varchar(45),  zip smallint(5),  
authorcomments varchar(200),  teachercomments varchar(200),  
approve enum('Y','N'),  docdata text,  PRIMARY KEY 
(id),  UNIQUE id (id));
 
 
I realize that this is a lot, but from what I have 
read since being subscribed to this e-mail list, you guys have talents that are 
far above and beyond the scope of this. Thank you so much for your help (and 
wisdom!).
 
 
Regards,
Clayton DukesCCNA, CCDA, CCDP, 
CCNPInternetwork Solutions EngineerInternetwork Management 
Engineer

-- 
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] Help INSERTing to MySQL

2001-02-23 Thread Clayton Dukes

Thanks! :-)

Man, what a great list! You guys kick a$$



- Original Message -
From: "Kyndig" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>; "Philip Olson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, February 23, 2001 8:50 PM
Subject: Re: [PHP] Help INSERTing to MySQL


> On Fri, 23 Feb 2001, Clayton Dukes wrote:
> > Well sheesh,
> > If I knew I could get answers that easy here, I woudn't have worked on
this
> > for 20 hours :-)
> >
> > THANKS
> >
> > btw, field one is an ID field set to auto increment, how can I insert
that
> > if I don't know what it is?
> >
> You don't need to insert it. auto_increment will automatically
> increment every time you insert a record. In fact, you _really_
> don't want to ever set this field, as you would be modifying your
> primary key ( unless your modifying them all )
>
>  Note: You don't have to INSERT all fields mentioned below. If
> you have a 'default' value set..then it will default to that value,
> or in auto_increment case...it will automatically increment from
> the last record it reads.
>
> >
> > Here are the fields:
> > CREATE TABLE documents (
> >   id bigint(20) DEFAULT '0' NOT NULL auto_increment,
> >   docid varchar(20),
> >   category enum('Language Arts','Sciences','Humanities','Arts','Special
> > Subjects','Other'),
> >   subcategory enum('Physics','Biology','Chemistry','Math','Computers and
> >
Internet','History','Economics','Geography','Law','Religion','Philosophy','B
> > lack Awareness','Countries','Drugs','Education','Environmental
> > Awareness','Politics','Health','Sex and Sexuality','Female
> > Awareness','Art','Movies or TV','Music','Sports','Charles
> > Dickens','Shakespeare','Biography','Fictional
> > Stories','Astronomy','Mythology'),
> >   date varchar(10),
> >   subject varchar(200),
> >   title varchar(200),
> >   author varchar(200),
> >   email varchar(50),
> >   language
enum('English','Danish','Dutch','Finnish','German','Spanish'),
> >   grade int(3),
> >   level enum('High School','College','Other'),
> >   city varchar(15),
> >   state varchar(15),
> >   county varchar(15),
> >   school varchar(45),
> >   zip smallint(5),
> >   authorcomments varchar(200),
> >   teachercomments varchar(200),
> >   approve enum('Y','N'),
> >   docdata text,
> >   PRIMARY KEY (id),
> >   UNIQUE id (id)
> >
> >
> > - Original Message -
> > From: "Philip Olson" <[EMAIL PROTECTED]>
> > To: "Clayton Dukes" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Friday, February 23, 2001 8:31 PM
> > Subject: Re: [PHP] Help INSERTing to MySQL
> >
> >
> > >
> > > > Hello, This is my first attempt, so I'm prolly doing something
stupid,
> > > > but can someone tell me why this doesn't work? All it returns is
> > > > "Unable to INSERT to database"
> > >
> > > Change : or die("Unable to INSERT to database");
> > > To : or die(mysql_error());
> > >
> > > And see what it tells you.  Odds are there's a field not being
accounted
> > > for.  When not designating columns (just values) it's important to
make
> > > sure all columns are accounted for.  See :
> > >
> > > http://www.sqlcourse.com/
> > >
> > > It'll provide some basic SQL help.  It's recommended to write out
columns
> > > and values (easier to make sense of).
> > >
> > >
> > > Regards,
> > >
> > > Philip Olson
> > > http://www.cornado.com/
> > >
> > > >
> > > >
> > > > ---BEGIN---
> > > >  > > >$time = time();
> > > >$rand = Random_Password(5);
> > > >$docid = $time . $rand;
> > > >
> > > > if (isset($email) && isset($docid)) {
> > > > mysql_connect("$HOSTNAME", "$DB_USER", "$DB_PASS");
> > > >
> > > >$query = "INSERT INTO documents VALUES ('$docid', '$category',
> > > > '$subcategory', '$date', '$subject', '$title', '$author', '$email',
> > > > '$language', '$gr ade', '$level', '$city', '$state', '$county',
> > > > '$zip', '$authors_comments', '$teachers_comments', 'N',
'$docdata')";
> > > >
> > > >$result = mysql_db_query("$DATABASE", $query) or die("Unable to
> > > > INSERT to database");
> > > >
> > > > if ($result) {
> > > > echo "$docid was added to the database";
> > > > }
> > > > }
> > > > ?>
> > >
> > >
> > > --
> > > 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]
> --
> Kind Regards,
> ---
> Kyndig
> Online Text Game Resource Site:  http://www.kyndig.com
> ICQ# 10451240


-- 
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] Help INSERTing to MySQL

2001-02-23 Thread Clayton Dukes

Well sheesh,
If I knew I could get answers that easy here, I woudn't have worked on this
for 20 hours :-)

THANKS

btw, field one is an ID field set to auto increment, how can I insert that
if I don't know what it is?


Here are the fields:
CREATE TABLE documents (
  id bigint(20) DEFAULT '0' NOT NULL auto_increment,
  docid varchar(20),
  category enum('Language Arts','Sciences','Humanities','Arts','Special
Subjects','Other'),
  subcategory enum('Physics','Biology','Chemistry','Math','Computers and
Internet','History','Economics','Geography','Law','Religion','Philosophy','B
lack Awareness','Countries','Drugs','Education','Environmental
Awareness','Politics','Health','Sex and Sexuality','Female
Awareness','Art','Movies or TV','Music','Sports','Charles
Dickens','Shakespeare','Biography','Fictional
Stories','Astronomy','Mythology'),
  date varchar(10),
  subject varchar(200),
  title varchar(200),
  author varchar(200),
  email varchar(50),
  language enum('English','Danish','Dutch','Finnish','German','Spanish'),
  grade int(3),
  level enum('High School','College','Other'),
  city varchar(15),
  state varchar(15),
  county varchar(15),
  school varchar(45),
  zip smallint(5),
  authorcomments varchar(200),
  teachercomments varchar(200),
  approve enum('Y','N'),
  docdata text,
  PRIMARY KEY (id),
  UNIQUE id (id)


- Original Message -
From: "Philip Olson" <[EMAIL PROTECTED]>
To: "Clayton Dukes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, February 23, 2001 8:31 PM
Subject: Re: [PHP] Help INSERTing to MySQL


>
> > Hello, This is my first attempt, so I'm prolly doing something stupid,
> > but can someone tell me why this doesn't work? All it returns is
> > "Unable to INSERT to database"
>
> Change : or die("Unable to INSERT to database");
> To : or die(mysql_error());
>
> And see what it tells you.  Odds are there's a field not being accounted
> for.  When not designating columns (just values) it's important to make
> sure all columns are accounted for.  See :
>
> http://www.sqlcourse.com/
>
> It'll provide some basic SQL help.  It's recommended to write out columns
> and values (easier to make sense of).
>
>
> Regards,
>
> Philip Olson
> http://www.cornado.com/
>
> >
> >
> > ---BEGIN---
> >  >$time = time();
> >$rand = Random_Password(5);
> >$docid = $time . $rand;
> >
> > if (isset($email) && isset($docid)) {
> > mysql_connect("$HOSTNAME", "$DB_USER", "$DB_PASS");
> >
> >$query = "INSERT INTO documents VALUES ('$docid', '$category',
> > '$subcategory', '$date', '$subject', '$title', '$author', '$email',
> > '$language', '$gr ade', '$level', '$city', '$state', '$county',
> > '$zip', '$authors_comments', '$teachers_comments', 'N', '$docdata')";
> >
> >$result = mysql_db_query("$DATABASE", $query) or die("Unable to
> > INSERT to database");
> >
> > if ($result) {
> > echo "$docid was added to the database";
> > }
> > }
> > ?>
>
>
> --
> 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] Help INSERTing to MySQL

2001-02-23 Thread Clayton Dukes



Hello,
This is my first attempt, so I'm prolly doing 
something stupid, but can someone tell me why this doesn't work?
All it returns is "Unable to INSERT to database"
 
 
 
---BEGIN---
   $time = 
time();   $rand = Random_Password(5);   $docid = 
$time . $rand;
 
    if (isset($email) && 
isset($docid)) {    
mysql_connect("$HOSTNAME", "$DB_USER", "$DB_PASS");
 
   $query = "INSERT INTO documents VALUES 
('$docid', '$category', '$subcategory', '$date', '$subject', '$title', 
'$author', '$email', '$language', '$grade', '$level', '$city', '$state', 
'$county', '$zip', '$authors_comments', '$teachers_comments', 'N', 
'$docdata')";
 
   $result = mysql_db_query("$DATABASE", 
$query) or die("Unable to INSERT to database");
 
    if ($result) 
{    echo "$docid was added 
to the database";    }}?>
 
 Submit a new 
document to the 
database 
 Email Address: 
 
Category:  
Sub Category:  
Date Document was written:  
(xx-xx-) 
Document Subject:  
Document Title:  
Document Author:  
Document Language:  
Grade Received (Percentage):  
(xx/100) Grade 
Level of Paper: High 
SchoolCollegeOther 
City in which paper was submitted:  
State in which paper was submitted:  
County in which paper was submitted:  (County, not 
Country!) 
School at which paper was submitted:  ZIP 
code:  (Put your ZIP 
code in if you don't know your 
school's) 
Author's Comments:  
Teacher's Comments:  
Document (ASCII TEXT 
ONLY): 
Paste document text 
here 
 

 
-END-
 
 
 
TIA!
Clayton

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