RE: [PHP] Terrible Hosting Experience

2001-02-21 Thread Jeff Oien

I would agree. I've had clients hosted on pair for quite a while.
They are still using PHP 3 however.
Jeff Oien

> while we're on this topic, i'd suggest people take a look at pair networks:
> 
> http://www.pair.net
> 
> i've had some good experience with them, almost complete control of the 
> server (even on virtual hosts).
> they have the best support i have seen till date, and some of the best 
> connections i've seen in the industry.
> 
> cheers,
> Hrishi


-- 
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] Configuring PHP4 on pair.com

2001-02-21 Thread Jeff Oien

I went through this installation process to install PHP4 on a pair
server. When I try to run a PHP script I get an internal server error
with this: Premature end of script headers: /usr/www/users//cgi-bin/php4.cgi
What should I do from here? Thanks.
Jeff Oien

-- 
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] Configuring PHP4 on pair.com

2001-02-21 Thread Jeff Oien

Wow, my server is being upgraded today. I did all that for nothing.
How do I undo what I just did? I checked this morning and PHP3
was still in use on my server. That's why I tried to install PHP4.
Jeff Oien

> Don't reference the absolute path to php4.cgi in your .htaccess it has to be
> relative to the domain.  Instead, try:
>
> Action application/x-httpd-php-xphp /cgi-bin/PHP2/php.cgi
> AddHandler application/x-httpd-php-xphp .phtml
>
> This is how I got PHP2 back.  BUT, if you server is one of the ones that have been
> upgraded to FreeBSD 4, PHP4 is already installed.
>
> Try to run "uname -v" when you log in.  You may not have to compile PHP4 like this.
>
> Or see if your server has been upgraded at
> http://support.pair.com/notices/stable-upgrade.html
>
> Michael
>
>
> Jeff Oien wrote:
>
> > I went through this installation process to install PHP4 on a pair
> > server. When I try to run a PHP script I get an internal server error
> > with this: Premature end of script headers: /usr/www/users//cgi-bin/php4.cgi
> > What should I do from here? Thanks.
> > Jeff Oien
> >
> > --
> > 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] Terrible Hosting Experience

2001-02-21 Thread Jeff Oien

> On Wednesday 21 February 2001 20:54, Jeff Oien wrote:
> > I would agree. I've had clients hosted on pair for quite a while.
> > They are still using PHP 3 however.
> 'almost complete control of the server' includes the ability to compile your 
> own PHP and use it to run the place :) of course, this doesnt mean you get to 
> hack at the modules.

Is there documentation anywhere about how I can do that? 
I've only installed PHP on my Windows machine. Thanks.
Jeff Oien

-- 
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] Configuring PHP4 on pair.com

2001-02-21 Thread Jeff Oien

Just wanted to say pair.com upgraded my server today and 
it went so smoothly I didn't even notice it. They now have 
PHP4 on my server. pair.com is a great hosting service as
long as you don't need hand holding or super quick tech
support. 
Jeff Oien

> > I went through this installation process to install PHP4 on a pair
> > server. When I try to run a PHP script I get an internal server error
> > with this: Premature end of script headers: /usr/www/users//cgi-bin/php4.cgi
> > What should I do from here? Thanks.
> > Jeff Oien


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




RE: [PHP] Problem with $REMOTE_ADDR

2001-02-23 Thread Jeff Oien

Same thing happens to me:
http://www.webdesigns1.f2s.com/remote_addr.php
Jeff Oien

code:

 
 
 
 
 
 
 
 

> At 09:54 AM 2/23/2001, Rosen wrote:
> 
> is the machine that your browsing on the same machine that you have your 
> serving software on?
> 
> ~kurth
> 
> 
> >Hi,
> >I have problem with using of "$REMOTE_ADDR" variable.
> >The variable always return me "127.0.0.1" ( localhost ),
> >
> >How can I get the IP of the remote host ?
> >
> >Thanks,
> >Rosen Marinov
> >
> >
> >
> >
> >
> >--
> >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] Header Location Frame Question

2001-02-23 Thread Jeff Oien

Is it possible to target a frame in the Location: of
a header? Sorry if this has been brought up a 
million times before.
Jeff Oien

-- 
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] Cookie References?

2001-02-24 Thread Jeff Oien

Could you give me some URLs for tutorials related
to cookies and good reference material? 

One question I have is can a cookie never expire?
Jeff Oien

-- 
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] Simple String Replace Question

2001-02-25 Thread Jeff Oien

I would like to get rid of \n characters unless there
are two or more in a row. So for example if there
is a long email formatted like we do here with
line break I want to remove the line breaks so 
text can be wrapped by a browser, but also show
paragraph breaks where necessary. This is what
I have:
$string_new = str_replace("\n", "", $string);
How can I augment this to not replace:
\n
\n
Thanks.
Jeff Oien

-- 
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] Simple String Replace Question

2001-02-25 Thread Jeff Oien

> On 25 Feb 2001 10:34:27 -0800, Jeff Oien <[EMAIL PROTECTED]> wrote:
> >I would like to get rid of \n characters unless there
> >are two or more in a row. So for example if there
> 
> The Perl-compatible regular expressions support lookahead and look behind:
> 
> $str = 'abcdefabcaadd';
> echo "$str\n";
> $str = preg_replace("/(? echo "$str\n";
> 
> will display this:
> abcdefabcaadd
> -bcdef-bcaadd

Man, that went right over my head. Is there a description of
how this works anywhere? Thanks for help in any case.
Jeff Oien

-- 
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] Simple String Replace Question

2001-02-25 Thread Jeff Oien

That almost works. The two \n in a row are on new lines.
So it's
\n
\n
intead of \n\n. If that makes any sense.
Jeff Oien

> Or you could just do this:
> 
>  $str = "abc\ndefg\n\nxyzpqr\njklmno";
> $str = ereg_replace("([^\n])\n([^\n])", "\\1 \\2", $str);
> echo $str;
> ?>
> 
> That should give you:
> 
> abc defg\n\nxyzpqr jklmno
> 
> Works by replacing any \n with a space, as long as that \n is not next to
> another \n.
> 
> 
> Cheers
> 
> Simon Garner
> 
> 

-- 
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] Simple String Replace Question

2001-02-25 Thread Jeff Oien

> No, that doesn't make any sense whatsoever :)
>
> A \n *is* a new line. I can only guess you're getting confused because
> there's \r's as well as \n's in the string. Try this:
>
>
>  $str = "abc\r\ndefg\r\n\r\nxyzpqr\r\njklmno";
> $str = ereg_replace("([^\r\n])\r\n([^\r\n])", "\\1 \\2", $str);
> echo $str;
> ?>

Ok now I'm really being a pest. Your code works on your
example but not on mine. I can't figure out why. But I really
appreciate the help so far from Chris and Simon so thanks.

Here is my example and what happens when I use your
code. I tried it by pasting text into a textarea part of a
form and also just having it in a plain text file (Windows system).
(I just tried creating a file on Unix also, same result.)
Removes the line breaks but also the multiples for paragraphs.
This isn't very important, more of a curiosity.
---
original text:

This is a story
of how the West was won.
Not about the Brady bunch
but how those guys with guns
somehow won.

I don't know who won, but
I do know the West was won.
So the West is number one.

Yay.
---
returned from your code:

This is a story of how the West was won. Not about the Brady bunch but how those guys
with guns somehow won. I don't know who won, but I do know the West was won. So the
West is number one. Yay.
---
what I want is:

This is a story of how the West was won. Not about the Brady bunch but how those guys
with guns somehow won.

I don't know who won, but I do know the West was won. So the West is number one.

Yay.

^that may wrap in your e-mail program


-- 
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] Simple String Replace Question

2001-02-25 Thread Jeff Oien

> 
> 
> 
> 
> 
> 
> 
> 
> 
>  $str = ereg_replace("([^\r\n])\r\n([^\r\n])", "\\1 \\2", $str);
> echo $str;
> ?>
> 
> 
> 
> 

Got it now. I didn't didn't have  tags in mine. With
the  tags it works as prescribed. Thanks! The other 
troubleshooting examples were helpful too to know what's
going on with those characters.
Jeff Oien

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




php-general@lists.php.net

2001-02-26 Thread Jeff Oien

http://www.f2s.com/
is another option.
Jeff Oien

> Hi everyone,
> Can anyone tell me where can i find a place where to put my PHP/MySQL 
> applications for free?
> Many thanks
> Bye
> Bruno
> 

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

2001-03-02 Thread Jeff Oien

I started with this:
http://www.php.net/tut.php
went from there. Also
http://www.thickbook.com/
has some good stuff. 
Jeff Oien

> Hi there,
> Iam new to the world of PHP, and after my boss told me to learn PHP and MySQL, I
> found my way here.
> I am gettign to frips with MySQL, and Basic PHP seems to be sticking in my
> brain, but I'd really appreciate it if you guys could point me in the direction
> of a good on-line tutorial that'd point out the basics of geting these two
> technologies to talk to one another.
> 
> Ultimatly, I'd like to have  a login screen, that checkes user name against
> password on my Database.
> 
> You guys were recommended to me by a subscriber from another list, I hoep you
> can help.
> 
> Thanks in advance,
> Tris...
> 
> 
> 
> 
> 
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> 
> 
> **
> 
> -- 
> 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] MySQL Create Table Problem

2001-03-02 Thread Jeff Oien

This is driving me nuts. I really tried to figure it out
myself. I have a form for creating a table. The form
fields have field_name field_type field_length, and
checkboxes for not_null, auto_increment and primary.

When I check the primary key checkbox it always makes
the first field the primary key no matter what. And it
makes two date fields I enter NULL and the rest NOT
NULL no matter what I put in the checkboxes. The code
is below along with a printout of the SQL query. I only
wanted suffix and death date to be null. This is combination
from PHP Fast and Easy and MySQL by Dubois.

$sql = "CREATE TABLE $table_name (";

for ($i = 0; $i < count($field_name); $i++) {

$sql .= "$field_name[$i] $field_type[$i]";

if ($not_null[$i] == "Y") {
$additional = " NOT NULL";
} else {
$additional = " NULL";
}

if ($auto_increment[$i] == "Y") {
$additional .= " AUTO_INCREMENT";
} else {
$additional .= "";
}

if ($primary[$i] == "Y") {
$additional .= " primary key";

} else {
$additional .= "";
}

if ($field_length[$i] != "") {
$sql .= "($field_length[$i]) $additional,";
} else {
$sql .= " $additional,";
}

}

$sql = substr($sql, 0, -1);

$sql .= ")";



CREATE TABLE president (last_name varchar(15) NOT NULL primary key,first_name
varchar(15) NOT NULL,suffix varchar(5) NOT NULL,city varchar(20) NOT NULL,state
varchar(2) NOT NULL,birth date NULL,death date NULL)


-- 
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] MySQL Create Table Problem

2001-03-02 Thread Jeff Oien

I found where the problem stems from after correcting a couple
items per your example but still don't know why it won't work.

It comes from using checkboxes in the form for PRIMARY KEY,
AUTO_INCREMENT and NOT NULL or NULL. When I use checkboxes
like this:





it totally messes up the query. But when I use 





and either leave it blank or enter "Y" it works fine! This
is really driving me nuts and I'm afraid it's going to be
something stupid staring me in the face.
Jeff Oien

> Quick example...
> 
> CREATE TABLE user (
>userid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
>usergroupid smallint(5) unsigned DEFAULT '0' NOT NULL,
>username varchar(50) NOT NULL,
>password varchar(50) NOT NULL,
>email varchar(50) NOT NULL,
>parentemail varchar(50) NOT NULL,
>coppauser smallint(6) DEFAULT '0' NOT NULL,
>homepage varchar(100) NOT NULL,
>icq varchar(20) NOT NULL,
>aim varchar(20) NOT NULL,
>yahoo varchar(20) NOT NULL,
>biography mediumtext NOT NULL,
>signature mediumtext NOT NULL,
>adminemail smallint(6) DEFAULT '0' NOT NULL,
>showemail smallint(6) DEFAULT '0' NOT NULL,
>invisible smallint(6) DEFAULT '0' NOT NULL,
>usertitle varchar(250) NOT NULL,
>customtitle smallint(6) DEFAULT '0' NOT NULL,
>joindate int(10) unsigned DEFAULT '0' NOT NULL,
>canpost smallint(6) DEFAULT '0' NOT NULL,
>cookieuser smallint(6) DEFAULT '0' NOT NULL,
>daysprune smallint(6) DEFAULT '0' NOT NULL,
>lastvisit int(10) unsigned DEFAULT '0' NOT NULL,
>lastactivity int(10) unsigned DEFAULT '0' NOT NULL,
>lastpost int(10) unsigned DEFAULT '0' NOT NULL,
>posts smallint(5) unsigned DEFAULT '0' NOT NULL,
>timezoneoffset smallint(6) DEFAULT '0' NOT NULL,
>emailnotification smallint(6) DEFAULT '0' NOT NULL,
>imgurl varchar(150) NOT NULL,
>PRIMARY KEY (userid),
>KEY idxgroups (username, usergroupid)
> );
> 
> -Original Message-
> From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 02, 2001 2:09 PM
> To: PHP
> Subject: [PHP] MySQL Create Table Problem
> 
> 
> This is driving me nuts. I really tried to figure it out
> myself. I have a form for creating a table. The form
> fields have field_name field_type field_length, and
> checkboxes for not_null, auto_increment and primary.
> 
> When I check the primary key checkbox it always makes
> the first field the primary key no matter what. And it
> makes two date fields I enter NULL and the rest NOT
> NULL no matter what I put in the checkboxes. The code
> is below along with a printout of the SQL query. I only
> wanted suffix and death date to be null. This is combination
> from PHP Fast and Easy and MySQL by Dubois.
> 
> $sql = "CREATE TABLE $table_name (";
> 
> for ($i = 0; $i < count($field_name); $i++) {
> 
>   $sql .= "$field_name[$i] $field_type[$i]";
> 
>   if ($not_null[$i] == "Y") {
>   $additional = " NOT NULL";
>   } else {
>   $additional = " NULL";
>   }
> 
>   if ($auto_increment[$i] == "Y") {
>   $additional .= " AUTO_INCREMENT";
>   } else {
>   $additional .= "";
>   }
> 
>   if ($primary[$i] == "Y") {
>   $additional .= " primary key";
> 
>   } else {
>   $additional .= "";
>   }
> 
>   if ($field_length[$i] != "") {
>   $sql .= "($field_length[$i]) $additional,";
>   } else {
>   $sql .= " $additional,";
>   }
> 
> }
> 
> $sql = substr($sql, 0, -1);
> 
> $sql .= ")";
> 
> 
> 
> CREATE TABLE president (last_name varchar(15) NOT NULL primary
> key,first_name
> varchar(15) NOT NULL,suffix varchar(5) NOT NULL,city varchar(20) NOT
> NULL,state
> varchar(2) NOT NULL,birth date NULL,death date NULL)
> 
> 
> --
> 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] Regular Expression Help

2001-03-05 Thread Jeff Oien

I want to delete everything after a tab (or space) on each line of
a text file and can't figure it out. 

An example line is
ARIA5.19-0.0625 -1.19   5.254.5 48.5100300

I want to the output to be 
ARIA

Thanks.
Jeff Oien

-- 
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] get current events from mysql query by date?

2001-03-05 Thread Jeff Oien

This is just a guess but wanted to take a shot at it.

Something like

SELECT EventID, EventName, EventDescription,
EventStartDate, EventEndDate
WHERE EventStartDate > CURRENT_DATE
ORDER BY EventStartDate ASC
LIMIT 5;

How did I do?
Jeff Oien

> I have a mysql database of events. It contains the following fields:
> 
> - EventID
> - EventName
> - EventDescription
> - EventStartDate
> - EventEndDate
> 
> I would like to query the database for the next 5 events from the current
> date (today). Any ideas?
> 
> Regards,
> 
> Matthew Delmarter
> Web Developer


-- 
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] Quick Regex Question

2001-03-05 Thread Jeff Oien

if (preg_match("/[a-Z],[a-Z]/",$text)) {

Can you tell me where I'm failing here. I want to do something
if the string has commas in between words with no spaces. 
Like:

blah,blah,blah

Jeff Oien

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

2001-03-08 Thread Jeff Oien

If you put the date in MMDD format you can compare
the numbers.
http://www.php.net/manual/en/function.date.php
Jeff Oien

> Hi,
> Since there is no Date type in php, is there a way to compare dates?
> 
> Something like:
> 
> if ((3/8/2001) < (3/9/2001)){
>// Date is newer
> }
> 
> Thanks,
> Chris
> 

-- 
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] HTML book recommendation

2001-03-08 Thread Jeff Oien

This is something I happened to come across. I have no idea
how it compares to others, just giving you the link.
http://wdvl.internet.com/Authoring/Style/Sheets/Book.html
Jeff Oien

> This is a bit off-topic, but I'm curious what you PHP'ers would recommend as
> a good HTML book.  I think I need to learn some stylesheet stuff and the
> tutorial I've got covers the basics, but I'd like some more in-depth info on
> the commands.
> 
> Is the O'Reilley(sp?) book the best, or are there better out there?
> 
> -Michael
> 
> -- 
> No, my friend, the way to have good and safe government, is not to trust it
> all to one, but to divide it among the many, distributing to every one exactly
> the functions he is competent to.  It is by dividing and subdividing these
> republics from the national one down through all its subordinations, until it
> ends in the administration of every man's farm by himself; by placing under
> every one what his own eye may superintend, that all will be done for the
> best.
> -- Thomas Jefferson, to Joseph Cabell, 1816
> 
> -- 
> 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] Advanced PHP

2001-03-09 Thread Jeff Oien

LOL.

The evolutionists will tell you they came from worms. So
according to them the worm came first and it "evolved" into
something else. Tough to know where the egg came into
the picture according to that theory.
Jeff Oien

> Of course... where did you think they came from... monkeys?
> 
> 
> 
> At 04:01 PM 3/9/01 -0800, Keith Vance wrote:
> >Where did the chicken come from, God?
> >
> >Keith
> >
> >On Fri, 9 Mar 2001, Jerry Lake wrote:
> >
> > > The chicken did.
> > >
> > > as the Chicken is an actual chicken
> > > and the egg is a potential chicken.
> > > Actuality precedes potentiality
> > >
> > > Jerry Lake- [EMAIL PROTECTED]
> > > Web Designer
> > > Europa Communications - http://www.europa.com
> > > Pacifier Online   - http://www.pacifier.com
> > >
> > >
> > > -Original Message-
> > > From: Keith Vance [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, March 09, 2001 3:14 PM
> > > To: Kath
> > > Cc: Krznaric Michael; 'Rick St Jean'; [EMAIL PROTECTED]
> > > Subject: Re: [PHP] Advanced PHP
> > >
> > >
> > > What came first the chicken or the egg?
> > >
> > > Keith
> > >
> > > On Fri, 9 Mar 2001, Kath wrote:
> > >
> > > > Yeah.  I even see some PHP book authors, like Julie Meloni here on this
> > > > list.
> > > >
> > > > There is never a question, no matter how retarded, that this list or #php
> > > on
> > > > irc.openprojects.net has never been able to answer.
> > > >
> > > > - Kath
> > > >
> > > >
> > > > - Original Message -
> > > > From: "Krznaric Michael" <[EMAIL PROTECTED]>
> > > > To: "'Rick St Jean'" <[EMAIL PROTECTED]>;
> > > <[EMAIL PROTECTED]>
> > > > Sent: Friday, March 09, 2001 5:11 PM
> > > > Subject: RE: [PHP] Advanced PHP
> > > >
> > > >
> > > > > If I'm not mistaken, the big boys keep an eye out over here.
> > > > >
> > > > > Mike
> > > > >
> > > > >
> > > > > -Original Message-
> > > > > From: Rick St Jean [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Friday, March 09, 2001 4:54 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: [PHP] Advanced PHP
> > > > >
> > > > >
> > > > > Does anyone know of any other lists that are a little more advanced,
> > > > > And has a little less traffic?  I am not the end all be all by any 
> > means
> > > > of
> > > > > programming or PHP.  I just want to know where the big boys hang out
> > > > > and learn some secrets that require some understanding.
> > > > >
> > > > > Rick
> > > > > ##
> > > > > #  Rick St Jean,
> > > > > #  [EMAIL PROTECTED]
> > > > > #  President of Design Shark,
> > > > > #  http://www.designshark.com/
> > > > > #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> > > > > #  Tel: 905-684-2952
> > > > > ##
> > > > >
> > > > >
> > > > > --
> > > > > 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]
> 
> ##
> #  Rick St Jean,
> #  [EMAIL PROTECTED]
> #  President of Design Shark,
> #  http://www.designshark.com/
> #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> #  Tel: 905-684-2952
> ##
> 
> 
> -- 
> 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] File Upload Size Limit Problem

2001-03-10 Thread Jeff Oien

I've modified a script for uploading multiple files
and am trying to get it to produce an error if the
size of the file is larger than 2 MB but can't get it
to work. Here is the code in question with the 
who code below. When I try to upload a 3 MB 
file it doesn't produce an error. Everything else works 
fine.
Jeff Oien

 if(${"infile".$i}!="none") $noinput=false; 
if(${"infile".$i."_size"} > 200) { 
echo "Sorry, file size limit is 2MB. ${"infile".$i} is too large."; 
  exit; 
} 



/* handle uploads */ 
$noinput = true; 
for($i=1; $noinput && ($i<=UPLOAD_SLOTS); $i++) 
{ 
if(${"infile".$i}!="none") $noinput=false; 
} 
if($noinput) 
{ 
echo "Uploading Error"; 
exit(); 
} 
for($i=1; $i<=UPLOAD_SLOTS; $i++) 
{ 
if(${"infile".$i."_size"} > 200) { 
echo "Sorry, file size limit is 2MB. ${"infile".$i} is too large."; 
exit; 
} 

if(${"infile".$i}!="none" && 
 copy(${"infile".$i}, INCOMING.${"infile".$i."_name"}) && 
 unlink(${"infile".$i})) 
{ 
if (${"infile".$i."_size"} < 100) {
${"infile".$i."_size"} = ${"infile".$i."_size"} / 1000;
${"infile".$i."_size"} = sprintf("%.2f", ${"infile".$i."_size"});
${"infile".$i."_size"} = ${"infile".$i."_size"} . ' KB';
}
else {
${"infile".$i."_size"} = ${"infile".$i."_size"} / 100;
${"infile".$i."_size"} = sprintf("%.2f", ${"infile".$i."_size"});
${"infile".$i."_size"} = ${"infile".$i."_size"} . ' MB';
}
echo ${"infile".$i."_name"}." - ${"infile".$i."_size"} uploaded"; 
} 
} 
} /* else */ 
?> 

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




RE: [PHP] File Upload Size Limit Problem

2001-03-10 Thread Jeff Oien

> ""Jeff Oien"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I've modified a script for uploading multiple files
> > and am trying to get it to produce an error if the
> > size of the file is larger than 2 MB but can't get it
> > to work. Here is the code in question with the
> > who code below. When I try to upload a 3 MB
> > file it doesn't produce an error. Everything else works
> > fine.
> 
> You need to edit your php.ini
> Read your php.ini and look for upload_max_filesize.
> 
> Regards,
> --
> Yasuo Ohgaki

I know my max_file_size 2 MB.
I want to prevent a user from trying to upload a file that 
is larger than 3 MB.
Jeff Oien 

-- 
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] tutorials on good database design

2001-03-13 Thread Jeff Oien

MySQL by Paul DuBois is a very good one. 
Jeff Oien

> hi,
> 
> i'm looking for some good tutorials / articles / books on database
> design, no, i'm not talking about the classic employee contact database
> that nearly every site has lingering somewhere... i'm after the good stuff:
> 
> smart data design
> smart data planning
> unique keys
> taking advantage of relational databases
> etc etc
> 
> Justin French
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
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] tutorials on good database design

2001-03-13 Thread Jeff Oien

> I agree - throw us some examples of what you're thinking about, Justin.
> 
> Jason

I'm not Justin but I have a question. I would like to write a billing 
database to keep track of my hours for clients. I would like to 
keep track of what date I've been paid through and then create
a report for the hours that I haven't been paid for yet. How do I 
-best tell the database when I've been paid
  -there may be more than one entry for each day
-create a report for the dates since I was last paid

Jeff Oien

-- 
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] sort in mysql

2001-03-14 Thread Jeff Oien

ORDER BY hits

default is ascending (ASC). Otherwise

ORDER BY hits DESC

Jeff Oien

> hi
> 
> I have a database with some urls and numbers. There are currently 2 records
> in the database. I wanna sort them by the numbers. How should i do it?
> my table is like
> 
> name hits
> john 343
> scott   3423
> 
> any suggestions would be greatly appreciated!
> 
> 
> 
> 
> -- 
> 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] image counter?

2001-03-14 Thread Jeff Oien

I'm curious as to why you need to combine them. Wouldn't
it be easier just to display the images side by side? 
Jeff Oien
 
> We always use 0-9 images to generate the image counter but this image
> counter contains more than one image. Does any body know how to combine
> these images as one? That is the final output of image counter is one image.
> 
> Thank you very much!
> 
> 
> 
> -- 
> 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] Print MySQL DB as Exel File?

2001-03-14 Thread Jeff Oien

Could anyone help me out with how to print the entire contents of a 
database as an Excel file? I'm familiar with the header:

header("Content-Type: application/vnd.ms-excel");

just not sure how to go about it beyond that. I have this code and
am not sure what do do after it. Thanks.
Jeff Oien

while ($row = mysql_fetch_array($result)) {
$Event = $row['Event'];
$First_Name = $row['First_Name'];
$Last_Name = $row['Last_Name'];
$Title = $row['Title'];
$Organization = $row['Organization'];
$Phone = $row['Phone'];
$Email = $row['Email'];
$date = $row['date'];
$id = $row['id'];

-- 
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] Print MySQL DB as Exel File?

2001-03-14 Thread Jeff Oien

I didn't think they were useless. Jason said he would post some 
code if I wanted. Yes, I would like to see it. Pierre's post was
very helpful and is the solution I will use for now. ren's posts were
a little over my head. :) I'm sure you're really smart but not very
helpful for someone new like me.
Jeff Oien

> I know very little about php, but since you have already received a bunch of
> useless answers, I thought I add my guesswork.
> 
> In php 4 you can access MS documents through Microsofts OLE interface. That
> means you can manipulate an .xls file as you would be able to in
> VisualBasic. You should look for something called COM in your documentation.
> 
> I should add that I have never done it in php, only in perl...
> 
> Goodluck
> 
> 
> -ren
> 
> > Could anyone help me out with how to print the entire contents of a
> > database as an Excel file? I'm familiar with the header:
> >
> > header("Content-Type: application/vnd.ms-excel");
> >
> > just not sure how to go about it beyond that. I have this code and
> > am not sure what do do after it. Thanks.
> > Jeff Oien
> >
> > while ($row = mysql_fetch_array($result)) {
> > $Event = $row['Event'];
> > $First_Name = $row['First_Name'];
> > $Last_Name = $row['Last_Name'];
> > $Title = $row['Title'];
> > $Organization = $row['Organization'];
> > $Phone = $row['Phone'];
> > $Email = $row['Email'];
> > $date = $row['date'];
> > $id = $row['id'];
> >
> > --
> > 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] PHP hosts?

2001-03-19 Thread Jeff Oien

> Hi All,
> 
> I am looking for some sites that host PHP.  I can't really afford to pay for 
> hosting space anymore, so I was wondering if there were any good (free) web 
> hosts, that had PHP and/or MySQL.
> 
> I would like to get a fast and stable place to host my files, but if there 
> was a preference, I would probably prefer a more stable place that's not 
> on/offline a lot.
> 
> Any links/help is much appreciated.

Not sure about stability but here is one in the UK:
http://www.f2s.com/
Jeff Oien
PHP >start here - Web site coming soon

-- 
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 & MYSQL BOOKS

2001-03-19 Thread Jeff Oien

http://www.fatbrain.com/
http://www.booksamillion.com/
Jeff Oien
PHP >start here - Web site coming soon

>I actually think this is the book I have been waiting for. A bookstore in
>New Zealand told me not until March 2001. It must be pretty good, all the
>Sams books are. The only problem is in NZ it is about $170 as opposed to
>amazons $49.95US ($100NZ). If you know somewhere cheaper than amazon, I am
>all ears.
>
>Cheers
>Chris
>
>""Luke Welling"" <[EMAIL PROTECTED]> wrote in message
>99528g$v58$[EMAIL PROTECTED]">news:99528g$v58$[EMAIL PROTECTED]...
>: ""YoBro"" <[EMAIL PROTECTED]> wrote:
>: > Does anybody know any good books & websites to recommend for PHP & MySql
>: > together. I am looking to advance my knowledge and would really
>appreciate
>: a
>: > helpful tip.
>: >
>: > Really looking for a book that explains all the advanced features of
>PHP4
>: > and MySql as a compliment.
>:
>: I can't give you an unbiased opinion on whether it is good or not, but you
>: might like to look at "PHP and MySQL Web Development"
>: by Luke Welling and Laura Thomson.
>:
>: Here is a link to it on Amazon.
>: http://www.amazon.com/exec/obidos/ASIN/0672317842
>: although you can probably get it cheaper elsewhere.
>:
>: It will be published in 10 days.
>:
>: Cheers,
>:
>: Luke Welling
>:
>:
>:
>: --
>: 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] files with html extension

2001-03-20 Thread Jeff Oien

>From the doc:
---
How can I remove the file extensions...
...from my URIs in a practical file-based web server?

If you are using, for example, Apache, you can set it 
up to do content negotiation. 
--
How is this done? 
Jeff Oien

> On 3/20/2001 at 6:49 PM Jeff Armstrong wrote:
> 
> > This is exactly why http://www.w3.org recommend that you DONT
> > SPECIFY A FILE TYPE TYPE in your HREFs.
> >
> > Cool URIs Dont change - http://www.w3.org/Provider/Style/URI
> > Good!!
> >   Some Page!
> > NOT good!
> >   Some Page!
> >   ^
> > Let the server decide which page to dish.
> > Then it's easy peasy to replace xxx.html with xxx.php or even
> > xxx.my_new_language_of_the_moment.
> >};
> >
> e
> 
> 
> -- 
> 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] Please Critique My Tutorial

2001-03-20 Thread Jeff Oien

If you have time please take a look and let me know
there are any corrections you would make in terminology
and accuracy. I'm fairly new to PHP. I want everything
to be correct.
http://www.webdesigns1.com/php/tutorial_test.php
Jeff Oien


-- 
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] W2K Install Problem

2001-04-14 Thread Jeff Oien

When I try to run a PHP script through a Web browser it just
displays the code. I did a clean install of W2K and installed
Apache. I copied the php.ini to the WINNT and system folders.
Not sure where to go from here.

BTW how do you open a command window in W2K? Thanks.
Jeff Oien

-- 
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] W2K Install Problem

2001-04-14 Thread Jeff Oien

I got it to work. I would still like to know how to open a command
window in W2K though.

I had a reference to d:/php4/ instead of d:/php/ which is where I 
have it.
Jeff Oien

> When I try to run a PHP script through a Web browser it just
> displays the code. I did a clean install of W2K and installed
> Apache. I copied the php.ini to the WINNT and system folders.
> Not sure where to go from here.
> 
> BTW how do you open a command window in W2K? Thanks.
> Jeff Oien
> 
> -- 
> 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] PHP Books

2001-04-20 Thread Jeff Oien

Here are some recommendations:
http://www.webdesigns1.com/php/books.php
Jeff Oien
 
> Hello
> Could I get a recommendation on some good starting PHP books?
> Thanks
> 
> -- 
> Later Days:)
> Michael Clesceri
> 
> ""Perfection (in design) is achieved not when there is nothing 
> more to add, but rather when there is nothing more to take away."
> 

-- 
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] Link Color Questions

2001-04-22 Thread Jeff Oien

You need to use style sheets:
http://www.awlonline.com/cseng/titles/0-201-41998-X/liebos/
http://www.builder.com/Authoring/CSS/?tag=st.bl.7258.dir1.bl_CSS
http://www.wdvl.com/Authoring/Style/Sheets/
Jeff Oien

> Hi,
>
>  I would like to know how to make different link in different color on
> one page.
>
> etc.  www.domain1.com in blue color
>www.domain2.com in red color
>www.domain3.com in orange color
>
> Thank you for your help
>
> Mark


-- 
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] Do You Like This Book?

2001-04-28 Thread Jeff Oien

Has anyone read this new book yet?

PHP and MySQL Web Development
by Luke Welling, Laura Thomson

http://www.amazon.com/exec/obidos/ASIN/0672317842/ref=ase_hotscrcomyourgui/1
07-0943347-2161363
Would be interested in hearing opinions.

Jeff Oien


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

2001-05-05 Thread Jeff Oien

> Is there a tag in php that acts like "wordwrap=virtual" does in html? I 
> have a script that is sending out variables in a email from a contact 
> form, but for a comments section it will not wordwrap in the email.
> Thanks
> 
> Shawn

You need to use line breaks \n for lines to wrap in email.
Jeff Oien
http://www.webdesigns1.com/php/

-- 
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] Shopping cart search

2001-05-10 Thread Jeff Oien

http://www.hotscripts.com/PHP/

Jeff Oien
http://www.webdesigns1.com/php/

> Can someone pass on the URL for searching for PHP shopping cart programs
> and shopping cart related questions.
> 
> Many thanks...
> 
> Todd
> 
> --
> Todd Cary
> Ariste Software
> [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] PGP with MySQL

2001-05-18 Thread Jeff Oien

> Jeff wrote:
> 
> > I am trying to find the maximum security for storing credit card
> > numbers.
> > 
> > >From reading the archives someone mentioned using a PGP based encryption
> > to encrypt the credit card number and store it into the database, and
> > have the company that is processing the order have the decryption key on
> > the their computer.
> > 
> > Any comments or different ideas on this system?
> 
> Jeff,
> 
> search of the php-general list archives for 'PGP' as I have been through 
> this one and there are a few concerning issues. 
> 
> Regards,
> 
> Joseph

(I'm a different Jeff) I searched through the archives and couldn't find
your message. I'm interested in this also. The PHP PGP tutorials
all deal with sending e-mail using PGP. I would like to be able to do 
this on the server to retrieve information from the server.
Jeff Oien

-- 
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] Pass Cookie? (Snoopy)

2002-02-17 Thread Jeff Oien

I want to grab info from a Web page where I am a logged in user.
How do I pass cookie info along with the grabber script? I looked
at Snoopy but the code is too complex for me to learn how to 
use it. 
http://turma.sourceforge.net/web/urlator/snoopy.html
Is there any example code out there on how to use Snoopy?
Thanks for any help.
Jeff Oien

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




[PHP] Variable Inside Variable

2002-04-18 Thread Jeff Oien

I have a script which retrieves the body of an email message from
a MySQL database to be sent to someone who applies using a form.
The script contains this:

$url = "http://$HTTP_HOST$SCRIPT_NAME\";>http://$HTTP_HOST$SCRIPT_NAME";
$url = addslashes("$url");

$msg1 .= "$body"; //to be sent via mail()

Then within the body of the message I want $url to show up.
The body of the message in the database looks like this:
---
You are receiving this exclusive message to confirm your
application through $url.
---
I've tried everything I can think of with $url, curly brackets, backslashes
etc. What am I missing? Thanks.
Jeff Oien



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




RE: [PHP] Variable Inside Variable

2002-04-19 Thread Jeff Oien

> On Friday 19 April 2002 09:31, Jeff Oien wrote:
> > I have a script which retrieves the body of an email message from
> > a MySQL database to be sent to someone who applies using a form.
> > The script contains this:
> >
> > $url = " > href=\"http://$HTTP_HOST$SCRIPT_NAME\";>http://$HTTP_HOST$SCRIPT_NAME";
> > $url = addslashes("$url");
> >
> > $msg1 .= "$body"; //to be sent via mail()
> >
> > Then within the body of the message I want $url to show up.
> > The body of the message in the database looks like this:
> > ---
> > You are receiving this exclusive message to confirm your
> > application through $url.
> > ---
> > I've tried everything I can think of with $url, curly brackets, backslashes
> > etc. What am I missing? Thanks.
> 
> Use eval().

I have $url (literally) embedded in some text in the database that is to be 
sent as an email message. I'm using this and $url disappears with a blank
spot in the text:
eval("\$body = \"$body\";");
I've tried variations and can't get it to work. Any help? Thanks.
Jeff Oien

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




RE: [PHP] Variable Inside Variable

2002-04-19 Thread Jeff Oien

> On Fri, 19 Apr 2002, Jeff Oien wrote:
> >> Use eval().
> > 
> > I have $url (literally) embedded in some text in the database that is to be 
> > sent as an email message. I'm using this and $url disappears with a blank
> > spot in the text:
> > eval("\$body = \"$body\";");
> > I've tried variations and can't get it to work. Any help? Thanks.
> 
> While you could do something like:
> 
>   $body = eval("return \"{$body}\";");
> 
> ...the huge, monstrous, gigantic problem is that if you allow anyone to 
> edit any part of $body or any string that goes into it, you are basically 
> handing them control of your server, because they can get eval() to 
> execute any code they want.
> 
> Far better would be to put a placeholder in $body like @@@ and then just 
> do $body = ereg_replace('@@@', $url, $body);
> 
> miguel

That's giving me a blank also. The form for changing the email is in a 
password protected area where only two people are allowed. But I'll
implement the more secure version when I can get it to work. Thanks
for the help.
Jeff Oien 

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




RE: [PHP] Variable Inside Variable

2002-04-20 Thread Jeff Oien

> On Fri, 19 Apr 2002, Jeff Oien wrote:
> >> Far better would be to put a placeholder in $body like @@@ and then just 
> >> do $body = ereg_replace('@@@', $url, $body);
> > 
> > That's giving me a blank also. The form for changing the email is in a 
> > password protected area where only two people are allowed. But I'll
> > implement the more secure version when I can get it to work. Thanks
> > for the help.
> 
> If that's giving you a blank then something else is wrong in your code.  
> This definitely does work:
>  
>$body = "Hello, and thank you. Please visit the site @@@.";
>$url = "http://boogers.on.toast/";;
>$body = ereg_replace('@@@', $url, $body);
> 
> Start from the simplest case, verify that it works, and then work out to
> include all the other funky stuff you've got going on.
> 
> miguel

What I meant was this is giving me a blank still:
$body = eval("return \"{$body}\";");
Just to clarify. I will be trying to narrow down the problem later today.
Jeff Oien 

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




RE: [PHP] PHP - Tutorial

2002-03-02 Thread Jeff Oien

I have a site here that may be helpful:
http://www.webdesigns1.com/php/
Jeff Oien

> Hello all,
> I am a beginner of php/mysql and am looking for good books for beginners 
> and mostly good online php tutorials. Anybody have any suggestions?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP] mktime on W2K?

2002-03-16 Thread Jeff Oien

I use this on a Unix server to get yesterday's date if it's a
Saturday:

if ($day == '6') {
$today1 = date("Y:m:d", mktime(0,0,0,$month,$day-1,$year));
}

But on my Windows 2000 machine it thinks it's 1999:12:05.
How can I do this on Windows? Thanks.
Jeff Oien

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




[PHP] 2 Forms On 1 Page

2001-11-03 Thread Jeff Oien

If I have two forms on one page that both use the same script how
do I get only the fields on one of the forms to be submitted? If that
makes any sense.
Jeff Oien

-- 
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] 2 Forms On 1 Page

2001-11-03 Thread Jeff Oien

> On Saturday 03 November 2001 11:28 am, you wrote:
> > If I have two forms on one page that both use the same script how
> > do I get only the fields on one of the forms to be submitted? If that
> > makes any sense.
> > Jeff Oien
> 
> as long as you enclose each form within it's own set of ... tags 
> and make sure the submit button for each form is within those tags, it should 
> only submit one form at a time. (also make sure that you don't assign the 
> same "name=" parameter to both forms)
> 
> --kurt

I was missing a closing  tag in there. Thanks for letting me know
it should work, that helped me figure it out.
Jeff Oien

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

2001-11-03 Thread Jeff Oien

I have a number like this 0.51 and I would like it to display without
the leading 0. How can I do this? Thanks.
Jeff Oien

-- 
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] New Site for PHP Beginners

2001-03-21 Thread Jeff Oien

PHP >start here
Internet resources and book reviews for those just starting out
with PHP and MySQL
http://www.webdesigns1.com/php/
Jeff Oien

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

2001-03-21 Thread Jeff Oien

I have a form to modify a record in a MySQL database. 
The record contains this:
3" Brush
The code in question is like this:
while ($row = mysql_fetch_array($result)) {
$desc1 = $row['desc1'];
--
">

I've tried using addslashes to the variable in various ways and it
always returns:
3\
What am I doing wrong? Sorry this is probably the 1000th time
this has been asked.
Jeff Oien

-- 
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 MySQL into HTML Tables

2001-03-22 Thread Jeff Oien

I would like to do this with a MySQL database containing
product information:

Product 1 InfoProduct 2 Info
Product 3 Info 

And if there are an odd number of products I want it to 
complete the table row with nothing in the cell. I want
it to be able to automatically do this no matter how many
products there are. I'm not sure how to set it up to 
print every other like that.
Jeff Oien

-- 
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] Delaying Printed Output

2001-03-24 Thread Jeff Oien

I don't know if this will be helpful but you can look at this
JavaScript code:
http://www.webdesigns1.f2s.com/js_typing_text.php
---
Jeff Oien
PHP >start here
http://www.webdesigns1.com/php/

-- 
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] just a newbie in php, don't get mad

2001-03-26 Thread Jeff Oien

> ok as you got it already i am a newbie in php
> could anyone please please post me what programs do I need or which could 
> help me to make some php stuff 
> sry for this may sound stupid to you all but all the manuals in the web 
> just were just talkin' 'bout totally technical stuff
> 
> ok thnx :p

I hope this site will be helpful:
http://www.webdesigns1.com/php/

Jeff Oien 

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

2001-03-29 Thread Jeff Oien

Try this:
http://hotwired.lycos.com/webmonkey/00/05/index2a.html

Jeff Oien
PHP >start here
http://www.webdesigns1.com/php/

> What is the best method for tracking a user through a website ?
> 
> I want to assign a username to a user which I can call up at anytime.
> Should I use htaccess files and the systems environment variables, or
> cookies ?
> 
> Cheers,
> David.
> 
> ---
> Fed202 Solutions
> www.fed202solutions.com
> Mobile : 07779 293368
> ---
> 
> 
> -- 
> 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] Quick RegEx Question

2001-03-31 Thread Jeff Oien

I want to check if a variable contains a price, like
$19.99
It definitely would be a dollar sign, two integers a dot and
two integers. Here is what I tried which doesn't work.

if (ereg("\$([0-9]{2}).([0-9]{2})", $Price))
or
if (ereg("\$([0-9]{2})\.([0-9]{2})", $Price))

Thanks.
Jeff Oien

-- 
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] SSL Tutorial?

2001-04-02 Thread Jeff Oien

Could anyone point me to some good basic SSL tutorials?
I would like to be able to have people submit credit card
numbers for a site in the future that will be for a yearly conference
registration. Very simple but I don't know the first thing about
how SSL works. Thanks.
Jeff Oien

-- 
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/MySQL Code

2001-04-06 Thread Jeff Oien

This code won't work. I'm trying to get an error if the username
is entered incorrectly but it won't go through the if brackets. I even
tried printing out $num and it's 0. I also tried 
if ($num = "0") {
if ($num = '0') {

error message etc.
exit;
}

Jeff Oien

-- 
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/MySQL Code

2001-04-06 Thread Jeff Oien

> "Jeff Oien" <[EMAIL PROTECTED]> wrote:
> > This code won't work. I'm trying to get an error if the username
> > is entered incorrectly but it won't go through the if brackets. I even
> > tried printing out $num and it's 0. I also tried
> > if ($num = "0") {
> > if ($num = '0') {
> 
> The single "=" sets the variable $num to that value.  A double "==" is an
> equality comparison operator - that's what you want in this case.  Also,
> since mysql_numrows() returns a number, not a string, you don't need quots
> around the 0.
> 
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/

Ah, one of those repeated rookie mistakes. Thanks for helping me out.
Jeff Oien

-- 
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] Print or Echo.

2001-04-06 Thread Jeff Oien

> H-
> 
> Just a quick question. 
> 
> Is there any difference between using print or echo? 
> 
> >From what I have read and seen there isn't any. 
> Than why the two different commands? 
> 
> Thanks. 
> -Sterling

See this:
http://www.php.net/manual/en/function.print.php

"As for a print vs. echo, echo gives you more options, 
such as being able to continue output on multiple lines 
like an 

[PHP] Cookie Expire Problem

2001-04-07 Thread Jeff Oien

This code won't set a cookie. I took the time part from a past
post to set the time for wy ahead. I must be doing it wrong
though:

$time = time();
$cookie_name = "auth";
$cookie_value = "ok";
$cookie_expire = "$time*3";
$cookie_domain = "";
setcookie($cookie_name, $cookie_value, $cookie_expire, "/" , $cookie_domain, 0);

Thanks.
Jeff Oien

-- 
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] where might I find a good php page

2001-04-08 Thread Jeff Oien

> I'd really like to learn PHP but where ?
> I know some basic perl but havent lookt that deep in PHP yet. any leads ??
> =)
> 
> sincerly // Ken

http://www.webdesigns1.com/php/
Jeff Oien

-- 
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] Variable Next To Variable?

2001-07-11 Thread Jeff Oien

Sorry if this has been brought up 100 times.

I want to do this:

$y = "1";

while ($y <= "$Number_Children") {
if (!$C_Last_Name$y) {
error stuff;
$y++;
}
}

The form submitting information to this code has field name like
C_Last_Name1 C_Last_Name2 depending on how many Children
are signing up for something. So I need $y to represent the number.

Hope that makes sense. Thanks for any help.
Jeff Oien

-- 
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] Variable Next To Variable?

2001-07-11 Thread Jeff Oien

I like this idea but it's giving me a parse error on this code:

if (!{$C_Last_Name}{$y}) 

I'm looking at the other ideas also.

Jeff Oien

> > if (!$C_Last_Name$y) {
> > The form submitting information to this code has field name like
> > C_Last_Name1 C_Last_Name2 depending on how many Children
> > are signing up for something. So I need $y to represent the number.
> 
> You want this:
> 
> if (!{$C_Last_Name}{$y}) {
> 
> The {} surrounding the variable name tells PHP that those are
> unique entities/variables.  For example, you could use the following:
> 
> echo "Hello, {$userInfo->printFirstName()}";
> 
> to interpolate a class' method call within a string...
> 
> Chris
> 

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




FW: [PHP] Variable Next To Variable?

2001-07-11 Thread Jeff Oien

What I'm doing is having a form page ask, "How many
children do you want to sign up?" Then it spits out form
fields for as many children as they asked for. So each
field has name="C_Last_Name$x" and $x in incremented
for each child. Should I make it name="C_Last_Name[$x]" ?
Jeff Oien

> you should change the form field names to 
> $Children_Last[1], $Children_Last[2]
> instead of hardcoding $Children_Last1
> to make iteration thru the form easier
> and handling of the data easier...
> 
> you can handle it all like this:
> 
> $Number_Children = 5;
> $i = $Number_Children;
>   while ($i--) {
>   if (! $Children_Last[$i]) {
>   // code
>   }
>   }
> 
> > -Original Message-
> > From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> > Subject: [PHP] Variable Next To Variable?
> > 
> > 
> > Sorry if this has been brought up 100 times.
> > I want to do this:
> > 
> > $y = "1";
> > 
> > while ($y <= "$Number_Children") {
> > if (!$C_Last_Name$y) {
> > error stuff;
> > $y++;
> > }
> > }
> > 
> > The form submitting information to this code has field name like
> > C_Last_Name1 C_Last_Name2 depending on how many Children
> > are signing up for something. So I need $y to represent the number.
> > 
> > Hope that makes sense. Thanks for any help.
> > Jeff Oien
> > 
> > -- 
> > 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] Unexplained Timeout

2001-07-16 Thread Jeff Oien

I get a 30 timeout on the line indicated when executing this code
and can't figure it out. Does anyone know why? Thanks.
Jeff Oien

-

if ($missing == "1") {

echo "


Error


Error

Required information was missing:
";

$z = "1";

while ($z <= "$Number_Children") {
>>error>if (${"element2$z"} == "select") {
echo "Please make a selection for Child $z";
}
if ((${"year$z"}).(${"month$z"}).(${"day$z"}) >= 2401 &&
(${"year$z"}).(${"month$z"}).(${"day$z"}) >= 19980902) {
if (${"coopmonth$z"} == "select") {
echo "Please select coop month to serve for Child $z";
}
$z++;
}
}
echo "

Please use your Back button and try 
again
(please do not Reload or Refresh your browser)


";
exit;
}


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

2001-07-16 Thread Jeff Oien

I know $Number_Children is 2. I printed it. And $z starts out as 1.
I don't think that's it.
Jeff Oien
 
> > while ($z <= "$Number_Children") {
> > >>error>if (${"element2$z"} == "select") {
> 
> Looks to me like $z is never reaching $Number_Children.
> 
> Jason 
> 

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




RE: [PHP] Unexplained Timeout

2001-07-16 Thread Jeff Oien

I don't know. :) I tried again without $Number_Children in quotes
and still get the timeout but on a different line (3 lines down). It 
seems it isn't necessarily a specific line causing it.
Jeff Oien

> Why is "$Number_Children" in quotes?
> 
> On Mon, 16 Jul 2001, Jeff Oien wrote:
> 
> > I know $Number_Children is 2. I printed it. And $z starts out as 1.
> > I don't think that's it.
> > Jeff Oien
> >
> > > > while ($z <= "$Number_Children") {
> > > > >>error>if (${"element2$z"} == "select") {
> > >
> > > Looks to me like $z is never reaching $Number_Children.
> > >
> > > Jason
> > >
> >
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

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

2001-07-16 Thread Jeff Oien

I found out what was most likely the problem. I had missing bracket and
then an extra one. I marked them as such below. 

In any case I learned a whole bunch more stuff in the process. Thank
you very much for your help. And sorry Jason didn't mean to make it
look like I snubbed you or anything. :)
Jeff Oien

> I get a 30 timeout on the line indicated when executing this code
> and can't figure it out. Does anyone know why? Thanks.
> Jeff Oien
> 
> -
> 
> if ($missing == "1") {
> 
> echo "
>   
>   
>   Error
>   
>vlink=\"#660099\">
>   Error
> 
>   Required information was missing:
>   ";
> 
>   $z = "1";
> 
>   while ($z <= "$Number_Children") {
>   if (${"element2$z"} == "select") {
>   echo "Please make a selection for Child $z";
>   }
>   if ((${"year$z"}).(${"month$z"}).(${"day$z"}) >= 2401 &&
> (${"year$z"}).(${"month$z"}).(${"day$z"}) >= 19980902) {
>   if (${"coopmonth$z"} == "select") {
>   echo "Please select coop month to serve for Child $z";
}
missing>
>   $z++;
>   }
extra> }
>   echo "
>   
>   Please use your Back 
> button and try again
> (please do not Reload or Refresh your browser)
>   
>   
>   ";
>   exit;
> }
> 
> 
> -- 
> 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] Control Structure Problem

2001-07-22 Thread Jeff Oien

This is driving me nuts. I couldn't sleep much last night trying
to figure this out. 

This code assigns rooms to kids signing up for Sunday school
at a very large church. Each subsequent registration is put into
the next room on the list. It looks up in the MySQL database
 the room the last person in that age category and hour was 
assigned and assigns the current person the next one. If someone 
is the first person they get assigned the first room. However if
they are the first person ${"newroom".$x} doesn't get assigned
to anything. But thereafter it works fine. I've had a couple other
problems and am wondering if there is a better way to do this
or if I have any syntax problems. Thanks.
Jeff Oien

$x = 1;
while ($x <= $Number_Children) {

if (${"category".$x} == 'SS KidZone - Kindergarten') {

if ((${"Grade".$x}) == 'K' && (${"selection".$x}) == '2nd Hour') {
$sql = "SELECT * FROM $table_name WHERE Category = 'SS KidZone - Kindergarten' 
&& Element1 = '2nd Hour' ORDER by ID desc";
$result = @mysql_query($sql,$connection) or die("Couldn't execute query");

if ($row = mysql_fetch_array($result)) {
$room = $row['Element2'];

if ($room == 'C143 Pink Check') {
${"newroom".$x} = 'C143 Pink Dot';
}
if ($room == 'C143 Pink Dot') {
${"newroom".$x} = 'C148 Teal Check';
}
if ($room == 'C148 Teal Check') {
${"newroom".$x} = 'C148 Teal Dot';
}
if ($room == 'C148 Teal Dot') {
${"newroom".$x} = 'C143 Pink Check';
}
}
else { ${"newroom".$x} = 'C143 Pink Check'; }
}

"do database insertion"

}
$x++;
}

-- 
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] Control Structure Problem

2001-07-22 Thread Jeff Oien

I forgot to say I deleted tabs so that the width might fit in a 
typical mail reader.
Jeff Oien

> This code assigns rooms to kids signing up for Sunday school
> at a very large church. Each subsequent registration is put into
> the next room on the list. It looks up in the MySQL database
>  the room the last person in that age category and hour was 
> assigned and assigns the current person the next one. If someone 
> is the first person they get assigned the first room. However if
> they are the first person ${"newroom".$x} doesn't get assigned
> to anything. But thereafter it works fine. I've had a couple other
> problems and am wondering if there is a better way to do this
> or if I have any syntax problems. Thanks.
> Jeff Oien
> 
> $x = 1;
> while ($x <= $Number_Children) {
> 
> if (${"category".$x} == 'SS KidZone - Kindergarten') {
>   
> if ((${"Grade".$x}) == 'K' && (${"selection".$x}) == '2nd Hour') {
> $sql = "SELECT * FROM $table_name WHERE Category = 'SS KidZone - Kindergarten' 
> && Element1 = '2nd Hour' ORDER by ID desc";
> $result = @mysql_query($sql,$connection) or die("Couldn't execute query");
> 
> if ($row = mysql_fetch_array($result)) {
> $room = $row['Element2'];
> 
> if ($room == 'C143 Pink Check') {
> ${"newroom".$x} = 'C143 Pink Dot';
> }
> if ($room == 'C143 Pink Dot') {
> ${"newroom".$x} = 'C148 Teal Check';
> }
> if ($room == 'C148 Teal Check') {
> ${"newroom".$x} = 'C148 Teal Dot';
> }
> if ($room == 'C148 Teal Dot') {
> ${"newroom".$x} = 'C143 Pink Check';
> }
> }
> else { ${"newroom".$x} = 'C143 Pink Check'; }
> }
> 
> "do database insertion"
> 
> }
> $x++;
> }
> 
> -- 
> 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] Learning PHP

2001-07-25 Thread Jeff Oien

http://www.webdesigns1.com/php
Jeff Oien
 
> Can someone please make a list of the best places to learn PHP as I have 6 
> weeks of school holidays and I want to put the m to good use (i have the 
> PHP reference guide from www.oreilly.com and i have the big ass document 
> files from www.php.net)
> 
> 
> -legokiller666-
> http://www.StupeedStudios.f2s.com
> New address new site
> 
> ICQ: 115852509
> MSN: [EMAIL PROTECTED]
> AIM: legokiller666
> 
> 
> 

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

2001-07-25 Thread Jeff Oien

I want to replace a string like this 1B335-2G with this B335. So for all the
strings I want to remove the first character and the last three characters.
I'm not sure which replace function to use or how to go about it. Thanks.
Jeff Oien

-- 
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] Regular Expression Question

2001-07-25 Thread Jeff Oien

Aren't the trims just for white space?
Jeff Oien

> since you know exactly which 4 characters you want to keep you can use a
> simple string trimming routine.  I forget the name of the function in php
> but it's there and it'll be something like
> 
> trimstring($string,1,5);
> 
> or something like that.  No need for complicated regular expressions either
> way.
> 
> - seb
> 
> -Original Message-
> From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> Sent: 25 July 2001 21:47
> To: PHP
> Subject: [PHP] Regular Expression Question
> 
> 
> I want to replace a string like this 1B335-2G with this B335. So for all the
> strings I want to remove the first character and the last three characters.
> I'm not sure which replace function to use or how to go about it. Thanks.
> Jeff Oien
> 
> --
> 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] Sessions Question

2001-07-28 Thread Jeff Oien

Hope I can explain this. I want to have scripts that will automatically refresh
a page entered by the user. So a form will have URL to refresh, seconds to
refresh and title of page. I want the page to continually refresh every X seconds.

I think I would need two pages that go back and forth between each other.
Here is what I have for the first script/page after the form. I don't know what
to do after this on the second page in order to pass the variables on to it.

Thanks for any help.
Jeff Oien

-




$title




If you can see this message you are using a browser that is incapable of displaying
frames.

;"
?>


-- 
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] New Book - Tips?

2001-07-30 Thread Jeff Oien

One thing I would like to see is using PGP (or gnu) encryption on the server,
not via e-mail.
Jeff Oien

> Hi there,
>
> I'm currently in the process of writing a new book about PHP entitled PHP Exertion.
>
> I've read several other books, and none of them covered everything that
> was needed, so I basically have an understanding of what I will write
> about and what topics to include - although I was wondering if any of you
> other users had any tips or ideas..
>
> Thanks,
> Matt Kaufman
> [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] Content Type Text?

2001-08-01 Thread Jeff Oien

I've looked all over and can't find a content-type declaration for text.
This is my guess
header("Content-Type: text/txt");
but I'm not sure if this is right. I know this is more HTTP than PHP.
I want info to be displayed in a browser as plain text not HTML.
Thanks.
Jeff Oien

-- 
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] Phone Number #s Only?

2001-08-03 Thread Jeff Oien

Is there a routine out there to strip all characters from a phone 
number except the numbers? I was going to write my own but
figured there must already be one out there I can use. Thanks.
Jeff Oien

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

2001-08-04 Thread Jeff Oien

After a sign up page I want to check if someone is already entered
into a database. The First Name, Last Name and Address all have
to match exactly in order for it to be considered a duplicate. However
this isn't doing what I want. I get the Error produced if the Address matches 
but the name doesn't. Not sure what I'm doing wrong. Thanks.
Jeff Oien 

while ($row = mysql_fetch_array($result)) {
$First_Name = $row['First_Name'];
$Last_Name = $row['Last_Name'];
$Address = $row['Address'];

if (($M_First_Name || $F_First_Name == $First_Name) && 
($M_Last_Name || $F_Last_Name == $Last_Name) 
&& ($Address1 == $Address)) {
echo "
Error

Error
etc...

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

2001-08-04 Thread Jeff Oien

Thank you. That worked and I'm sure will have made it work a lot
faster later on when there is a lot of data in the database.
Jeff Oien

> On Sat, 4 Aug 2001 12:40:42 -0500, Jeff Oien ([EMAIL PROTECTED]) 
> wrote:
> >After a sign up page I want to check if someone is already entered
> >into a database. The First Name, Last Name and Address all have
> >to match exactly in order for it to be considered a duplicate. 
> >However
> >this isn't doing what I want. I get the Error produced if the 
> >Address matches 
> >but the name doesn't. Not sure what I'm doing wrong. Thanks.
> >Jeff Oien 
> 
> you're going about this the wrong way.
> try it like this:
> 
> $result=mysql_query("select * from table where first='$first' and 
> last='$last' and address='$address'");
> 
> if(mysql_num_rows($result)){
>   // error code
> }
> 
> you want to keep the result sets that mysql gives back as small as 
> possible because they take up tons of resources.
> 
> >while ($row = mysql_fetch_array($result)) {
> > $First_Name = $row['First_Name'];
> > $Last_Name = $row['Last_Name'];
> > $Address = $row['Address'];
> > 
> > if (($M_First_Name || $F_First_Name == $First_Name) && 
> > ($M_Last_Name || $F_Last_Name == $Last_Name) 
> > && ($Address1 == $Address)) {
> > echo "
> > Error
> >  >vlink=\"#660099\">
> > Error
> >etc...
> >
> >-- 
> >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: php-list-
> >[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] ucwords Except 'The' 'And' etc?

2001-08-13 Thread Jeff Oien

Is there a prewritten function for capitalizing the first letter of each
word in a string except for the common words you wouldn't want
to capitalize in a title? Like

Come Learn the Facts From an Industry Leader 

Thanks.
Jeff Oien

-- 
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] ucwords Except 'The' 'And' etc?

2001-08-13 Thread Jeff Oien

Fabulous. Thanks to Steve and Mark. Exactly what I needed.
Jeff Oien

> >Something like this, perhaps (untested):
> 
> I needed this too so I just tested it.
> 
> >function smart_ucwords($String)
> >{
> >
> > $ExceptionList = array('the', 'an', 'a'); # should all be in 
> >lowercase
> >
> > $String = ucwords(strtolower(ltrim($String))); # LINE A
> >
> > foreach ($ExceptionList as $Word)
> > {
> > $String = eregi_replace("[[:space:]]+$Word[[:space:]]+", 
> >$Word, $String);
> > }
> 
> 
> this line should be more like:
> $String = eregi_replace("([[:space:]]+)".$Word."([[:space:]]+)", 
> "\\1".$Word."\\2", $String);
> 
> > return $String; # LINE B
> >
> >}
> 
> thanks!
> - Mark
> 

-- 
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] Simulate Cron/PHP in Win2k?

2001-08-15 Thread Jeff Oien

I would like to automatically run a PHP script at regular intervals
during the day. I looked through the archives and found this:

"c:/path/to/php.exe -q c:/path/to/your/script.php"

I was going to use Scheduled Tasks but that will only run
programs. Is there a way I can do this? I use Apache and PHP4
on Windows 2000 Professional. Thanks.
Jeff Oien

-- 
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] GoTo URL Function?

2001-08-20 Thread Jeff Oien

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

> Hi,
> 
> I am sure there is an easy way to do this...
> 
> But when my script is done doing whatever I want it to do - RATHER than
> print text and all to a page, I want the browser (within the same window) to
> go to a specific URL
> 
> Can this be done - let's say for example to: http://www.yahoo.com
> 
> Thanks!
> 
> Roy
> 
> 
> 
> 
> -- 
> 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] Echo/Print

2001-08-25 Thread Jeff Oien

You can read the notes lower on the page here to get a good idea:
http://www.php.net/manual/en/function.print.php
Jeff Oien 

> I am fairly new to PHP Scripting, and I am learning from a book.
> Throughout the book, print is used as the basic command to output
> text/variables.. yet I see almost everyone in here uses echo. Might I ask
> what the differences of the two are, and if there are any benefits of using
> one over the other?
> Thanks,
> Andy
> 
> 
> 
> -- 
> 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] Eregi for Image

2001-08-26 Thread Jeff Oien

I want to check if an uploaded file is an image. This isn't working. 
Could anyone  help me out?

if (!eregi("\\.gif$", $img1_name) || 
!eregi("\\.jpg$", $img1_name) || 
!eregi("\\.jpeg$", $img1_name)) {
error message
}

Jeff Oien

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

2001-08-26 Thread Jeff Oien

When using this command:
mkdir ("/usr/www/users//blah/blah/$username", 0777);
it sets it to nobody instead of my username. I'm then unable 
to delete or modify files in that directory. Is there a way around
this? Thanks.
Jeff Oien

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

2001-08-26 Thread Jeff Oien

However even the permission of 0777 doesn't let me do anything to
the directory or files in it. I can't even chown or chmod anything in
it using Telnet once it's created.
Jeff Oien

> Jeff
> JO> mkdir ("/usr/www/users//blah/blah/$username", 0777);
> JO> it sets it to nobody instead of my username.
> "Nobody" is the user runng the Apache process that's why it is the owner
> of the directory.
> You can "chown" the direcotry from your PHP script after you create
> it or "chmod" the files you copy there.
>
> Cheers,
>Gianluca
>
>
> JO> I'm then unable
> JO> to delete or modify files in that directory. Is there a way around
> JO> this? Thanks.
> JO> Jeff Oien
>
>
>
>
> --
> 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] File Upload Problem Solving?

2001-08-31 Thread Jeff Oien

I have a user who is unable to upload files but I don't know where
to start with the troubleshooting process. I have this:

@copy("$img1", "/blah/$username/$img1_name") 
or die("File upload didn't work."); 

and they are getting the die message. All but one person are able
to upload.
Jeff Oien

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




RE: [PHP] File Upload Problem Solving?

2001-08-31 Thread Jeff Oien

I found the problem. A user was logged in under their username
with a different case (capital/small letters) and that caused a problem.
Jeff Oien

> I have a user who is unable to upload files but I don't know where
> to start with the troubleshooting process. I have this:
> 
> @copy("$img1", "/blah/$username/$img1_name") 
> or die("File upload didn't work."); 
> 
> and they are getting the die message. All but one person are able
> to upload.
> Jeff Oien
> 
> -- 
> 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] Image Question

2001-09-04 Thread Jeff Oien

I have some images in a photo album type thing of charts with a black
background. Some users have complained that when they print this
they use a lot of ink. I was wondering if it were possible to convert 
an image to black and white (b&w only, no grayscale) and then reverse
it so the background will be white. If this is possible what's the best 
way to go about it? Thanks.
Jeff Oien

-- 
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] << Previous / Next Buttons >>

2001-09-06 Thread Jeff Oien

> Hi, what's the simplest way to provide previous/next buttons that navigate
> through individual records of a database?  This is for a photo gallery, so I
> want to do one record at a time until I'm out of records, then I want the
> "next" button to disappear.  I've been fiddling with it for a while now, but
> haven't been very successful.  Anyone have any snippets, or ideas for me?
> 
> Thanks in advance.

I'll show you what I did but realize I'm an advanced beginner/intermediate 
programmer. This may not be the most efficient way to do it but seems to
be the simplest code compared to other ways of doing it that I've seen. Not
sure if I will explain this well enough either. And this is for a fairly small 
database. With a larger one it may be too inefficient.

First count how many records are in the database for the album and put
it in $count.

Then loop through all the records in the album, place the id for each record
in an array and find out where in the array the current record is. $photo_id
is fed to this script which tells it which picture to display:

$x = 0;
while ($row = mysql_fetch_array($result)) {
$photo_id1 = $row['photoid'];
$array[$x] =  $photo_id1;
if ($photo_id1 == $photo_id) {
$position = $x;
}
$x++;
}

In another sql query for retrieving the specific image (have to compensate for
array[] starting at zero but record count starting at 1):

$row = mysql_fetch_array($result);
$photo_id = $row['photoid'];
if ($position == 0) {
$photo_pos = $position + 1; 
echo "Showing $photo_pos of $count << Previous"; //no link
}
else {
$photo_pos = $position + 1; 
$previous_pos = $photo_pos - 2;
$previous = $array[$previous_pos];
echo "Showing $photo_pos of $count << Previous";
}
if ($count == $photo_pos) {
echo " | Next >>"; //no link
}
elseif ($photo_pos < $count) {
$next_pos = $photo_pos;
$next = $array[$next_pos];
echo " | Next >>";
}

Comments from more experienced programmers welcome. I don't want to lead
astray.
Jeff Oien

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

2001-09-21 Thread Jeff Oien

Could someone tell me how to sort this? Each $variable1 is a 3,4 or 5
letter string that I would like sorted alphabetically. I assumed "sort" would
do it but apparently it isn't the right type of array. Thanks.

$variable1 = split("\n", $variable);

Jeff Oien



-- 
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] Sort Question (Again)

2001-09-21 Thread Jeff Oien

This didn't get answered before. I'm trying to sort an array but it
won't work.
$list = file('list_main.txt');
$list = sort($list);
If I print $list it gives me 1 and print $list[0] is nothing. The list_main.txt
looks something like this:
ABC
DEFG
HIJ
etc.

Jeff Oien

-- 
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] Changing items in $_POST

2004-07-23 Thread Jeff Oien
I have items from a form that will be in $_POST that I want to send on.
I'll be using this:
$arr = array();
foreach($_POST as $key => $value) {
$arr[] = $key.'='.urlencode($value);
}
$URL = "https://example.com/script.asp?".implode('&',$arr);
header("Location: $URL\n");
However, there are a few variables I need changed. For example, the 
people I'm sending it to need $rate_1m which is a mortgage rate but in 
$_POST there is $rate_1m1 (the whole number) and $rate_1m2 (the two 
numbers after the decimal). How do I get those two together and then 
discard the two numbers and only send $rate_1m? If that makes any sense.
Thanks.
Jeff

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


[PHP] is_numeric questions

2004-07-28 Thread Jeff Oien
Does is_numeric include commas decimals and dollar signs?
How do I use this to error check form data? I'm having a hard time 
figuring out what the correct syntax is for that application. Thanks.
Jeff

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


  1   2   >