php-general Digest 31 Jan 2001 12:16:00 -0000 Issue 484
Topics (messages 37320 through 37460):
Forbidden to browse 2001012
37320 by: dphillips.rfdinc.com
Re: these url icons fashion
37321 by: kaab kaoutar
37399 by: Matthew Kendall
string length?
37322 by: Kevin Connolly
37347 by: Jon Jacob
37365 by: Philip Olson
37394 by: Joe Stump
37456 by: Maxim Maletsky
HowTo: IBM DB2 w/PHP
37323 by: Karl J. Stubsjoen
37431 by: Teodor Cimpoesu
37447 by: Antonio S. Martins Jr.
Re: Strange problem
37324 by: johnny p.
PHP MySQL password
37325 by: Egan
37402 by: Michael Hall
void function();
37326 by: James, Yz
37384 by: Richard Lynch
could someone point me to a phpbased searchengine crawler?
37327 by: Sebastian Stadtlich
trouble with a query object
37328 by: Jason Jacobs
37385 by: Richard Lynch
PHP 4.04pl1 Build on NetBSD 1.5
37329 by: Robert Hough
Re: verify that email exist ?
37330 by: kaab kaoutar
37363 by: Michael Kimsal
37390 by: Chad Guilette
37459 by: kaab kaoutar
hello
37331 by: SuiteNet Operations Manager
PC<->Mac
37332 by: Markus H. Maussner
37451 by: Christian Reiniger
Re: dynamic php vs static
37333 by: Dan Phoenix
Re: form validation :ereg ()
37334 by: kaab kaoutar
Inconsistency session ?
37335 by: johan.pinguind.co.id
Re: where to get php_oracle.dll for win32?
37336 by: Brian Clark
Re: MS SQL 7.0 - Functions
37337 by: Brian Clark
Re: sessions or db for shopping cart
37338 by: Brian Clark
Re: Javascript doesn't work with PHP????
37339 by: Brian Clark
Re: Interactive external program execution
37340 by: Brian Clark
Re: Richard Heyes HTML Mime Mail class
37341 by: Richard Heyes
Re: Cookie with Netscape
37342 by: Kristofer Widholm
Making sure a variable doesn't contain a comma
37343 by: Brandon Orther
37359 by: Mark Roedel
help:php
37344 by: ky reddy
PHP4.04pl1 upgrade
37345 by: Erich Kolb
Readfile only return error
37346 by: Karl J. Stubsjoen
PDF Questions
37348 by: Conover, Ryan
37358 by: Benjamin Munoz
Re: Editor
37349 by: Shaun Thomas
37366 by: Maxim Maletsky
37369 by: Kristofer Widholm
37409 by: John Hinsley
37436 by: Kritsapon Pukahuta
How can I make PHP to work on Win98 ?
37350 by: nastaran kashani
37360 by: Benjamin Munoz
37393 by: Shane McBride
Killing session cookies, caches and everything.
37351 by: Angel Behar
37386 by: Richard Lynch
.jpg/.gif extension problem!
37352 by: Fredrik Arild Takle
37372 by: Chris Lee
37387 by: Richard Lynch
Re: IIS and PHP authorization
37353 by: James Moore
sessions - max number of variables before things get bad?
37354 by: Andrew Elliston
37388 by: Richard Lynch
authenicate against Radius server
37355 by: Brent Edwards
Querying Radius Server?
37356 by: Brent Edwards
Re: email headers!
37357 by: Chris Hayes
[Newbie] Php.ini
37361 by: Steve Haemelinck
37364 by: David Robley
37389 by: Richard Lynch
Uploading images only
37362 by: Brandon Orther
37367 by: Benjamin Munoz
PHP v4.0.4pl1 breaks phpMyAdmin
37368 by: Rob McMillin
Re: Read Vs. Include
37370 by: Alexander Skwar
session question
37371 by: Peter Van Dijck
37374 by: Mark Green
37432 by: Teodor Cimpoesu
37437 by: Max A. Derkachev
kerberos support in PHP's LDAP functions?
37373 by: Liam Hoekenga
OT probably- Resource id# shows up in select box.
37375 by: Chuck Barnett
37377 by: Jason Murray
37378 by: David Harrison
37380 by: Chuck Barnett
37381 by: Chuck Barnett
Oracle Function list
37376 by: Jon Jacob
Re: regex with non-ascii characters
37379 by: Jeff Warrington
trouble with reading session variables: BUG?
37382 by: Matthias Krehl
Re: httpd-prozess doesn't get killed
37383 by: Richard Lynch
Re: Problems with PHP mail()
37391 by: Louis LeBlanc
Real prob w/ NT5 and $PHP_AUTH_USER
37392 by: Shane McBride
Re: Server VS Client script validation
37395 by: Chris Adams
Re: disabling php ability via .htaccess
37396 by: Nold, Mark
parse form input
37397 by: Robert
37398 by: David Robley
Override already-declared function?
37400 by: Jason Murray
37403 by: John Donagher
37408 by: Jason Murray
php and forms question
37401 by: Chip
37405 by: Michael Hall
37406 by: David Robley
37412 by: Jeff Lacy
37425 by: Chip
37443 by: Michael Hall
Help Loading Oracle Dll
37404 by: Shimon Dekel
feature that should be there and isn't
37407 by: Joe Stump
37410 by: Jason Murray
37419 by: Brian White
today and yesterday (finding them)
37411 by: Chuck Barnett
37413 by: Jason Murray
37414 by: James Purvins
37416 by: Josh G
37434 by: Mohamed LRHAZI
Encode a PHP script
37415 by: Ian
Naughty Word Catcher
37417 by: Chris Aitken
37427 by: Maxim Maletsky
37428 by: Maxim Maletsky
37429 by: Maxim Maletsky
37440 by: O.Cook.etoncollege.org.uk
question ! show binary
37418 by: Yui Hiroaki
37423 by: Maxim Maletsky
No input file specified. (using PHP for shell and CGI scripting)
37420 by: Frank Joerdens
Function by reference?
37421 by: Niklas Saers
37438 by: Max A. Derkachev
37442 by: Wico de Leeuw
Link Validator
37422 by: Huseyin
37426 by: Maxim Maletsky
SQL question
37424 by: John LYC
Windows Share access with filesystem functions.
37430 by: Cameron Just
disabling page caching, yes or no
37433 by: Noel Akins
PHP forms
37435 by: Victor Hamutenya
37449 by: Johannes Janson
test, please ignore
37439 by: Patrick L.
Want to learn PHP
37441 by: Patrick L.
37444 by: Tshering Norbu
37445 by: Michael Hall
37452 by: Boaz Yahav
wrong math php3
37446 by: D.Bucher
round
37448 by: AJDIN BRANDIC
37450 by: AJDIN BRANDIC
File Download Completion
37453 by: Boaz Yahav
About function Include
37454 by: Eder Henrique Vieira Ribeiro
Uppdating a frame from another frame using PHP
37455 by: Rickard Walder
str_replace
37457 by: Augusto Cesar Castoldi
Function by reference
37458 by: Niklas Saers
check email exists under Windows NT!
37460 by: kaab kaoutar
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
Can someone get this to the list maintainer? First time I've gotten this
error message. Can't browse the current archive directory. I get the error
message:
"You don't have permission to access /mail/php-general/2001012/ on
this server"
--David
hi!
Hi tried it !
and get the icon by email and add the following :
<html>
<head>
<link rel="SHORTCUT ICON" href="http://www.idnetdor.com/favicon.ico">
<title>Nouvelle page 1</title>
</head>
<body>
test
</body>
</html>
but it still does not work !?
can u please help!
i'm in hurry to see it works :)
thanks
>From: Boaz Yahav <[EMAIL PROTECTED]>
>To: 'kaab kaoutar' <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: [PHP] these url icons fashion
>Date: Tue, 30 Jan 2001 14:14:30 +0200
>
>http://www.favicon.com
>
>Sincerely
>
> berber
>
>Visit http://www.weberdev.com Today!!!
>To see where PHP might take you tomorrow.
>
>
>
>
>
> > -----Original Message-----
> > From: kaab kaoutar [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 30, 2001 2:10 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] these url icons fashion
> >
> >
> > Hi!
> >
> > maybe this questio has nothing to do with php and maybe not !
> > well i noticed that in internet explorer some urls have their
> > own icon
> > instead of the one of explorere!here is a sample :www.php.net
> > any ideas of how to do that ?
> >
> > Thanks
> >
> > ______________________________________________________________
> > ___________
> > Get Your Private, Free E-mail from MSN Hotmail at
> > http://www.hotmail.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]
> >
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
"kaab kaoutar" <[EMAIL PROTECTED]> wrote ...
> Hi tried it !
> and get the icon by email and add the following :
> <link rel="SHORTCUT ICON" href="http://www.idnetdor.com/favicon.ico">
> but it still does not work !?
Delete all existing favorites for that site (not just the page; all pages on
the site), clear your browser cache, reboot, add the favorite again. It
should work.
Hi,
I am quite new to PHP scripts and I have run into a little problem with my string!
I have a string called $numbers which is 5;6;12;21;36;42 (for example, it can be any 6
numbers between 1 and 42).
Is there an easy way that I can find out how many numbers there are in the string
without the five semi-colons??
I was playing around with count_chars but had no success!
then i tried converting it to an array and counting the number of elements in the
array but unfortunatley it put the whole string in as the first element of the array
and returned a size of 1!
I would appreciate any help you can give me,
Cheers,
Kevin.
Kevin Connolly wrote:
>
> Hi,
> I am quite new to PHP scripts and I have run into a little problem with my string!
> I have a string called $numbers which is 5;6;12;21;36;42 (for example, it can be any
>6 numbers between 1 and 42).
> Is there an easy way that I can find out how many numbers there are in the string
>without the five semi-colons??
> I was playing around with count_chars but had no success!
> then i tried converting it to an array and counting the number of elements in the
>array but unfortunatley it put the whole string in as the first element of the array
>and returned a size of 1!
> I would appreciate any help you can give me,
> Cheers,
> Kevin.
Use split.
(@ArrayName) = split (":", $numbers);
$ElementsNum = count(@ArrayName);
Hi Kevin,
First thought that comes to mind is explode() so something like :
<?php
$string = '5;6;12;21;36;42';
$count = count(explode(';',$string));
?>
I assume that would work. That explodes it into an array then counts it,
check out :
http://www.php.net/manual/en/function.explode.php
It's a really fun function to play with.
Regards,
Philip Olson
http://www.cornado.com/
On Tue, 30 Jan 2001, Kevin Connolly wrote:
> Hi,
> I am quite new to PHP scripts and I have run into a little problem with my string!
> I have a string called $numbers which is 5;6;12;21;36;42 (for example, it can be any
>6 numbers between 1 and 42).
> Is there an easy way that I can find out how many numbers there are in the string
>without the five semi-colons??
> I was playing around with count_chars but had no success!
> then i tried converting it to an array and counting the number of elements in the
>array but unfortunatley it put the whole string in as the first element of the array
>and returned a size of 1!
> I would appreciate any help you can give me,
> Cheers,
> Kevin.
>
>
if you just want to know how many numbers are in it you can do this:
$num_of_numbers = sizeof(explode(';',$string));
--Joe
On Tue, Jan 30, 2001 at 04:46:50PM -0800, Jon Jacob wrote:
> Kevin Connolly wrote:
> >
> > Hi,
> > I am quite new to PHP scripts and I have run into a little problem with my string!
> > I have a string called $numbers which is 5;6;12;21;36;42 (for example, it can be
>any 6 numbers between 1 and 42).
> > Is there an easy way that I can find out how many numbers there are in the string
>without the five semi-colons??
> > I was playing around with count_chars but had no success!
> > then i tried converting it to an array and counting the number of elements in the
>array but unfortunatley it put the whole string in as the first element of the array
>and returned a size of 1!
> > I would appreciate any help you can give me,
> > Cheers,
> > Kevin.
>
> Use split.
>
> (@ArrayName) = split (":", $numbers);
> $ElementsNum = count(@ArrayName);
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
-------------------------------------------------------------------------------
I would do :
$num = substr_count($numbers, ';'); +/- whatever the difference it could
make
Cheers,
Maxim Maletsky
-----Original Message-----
From: Joe Stump [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 12:29 PM
To: Jon Jacob
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] string length?
if you just want to know how many numbers are in it you can do this:
$num_of_numbers = sizeof(explode(';',$string));
--Joe
On Tue, Jan 30, 2001 at 04:46:50PM -0800, Jon Jacob wrote:
> Kevin Connolly wrote:
> >
> > Hi,
> > I am quite new to PHP scripts and I have run into a little problem with
my string!
> > I have a string called $numbers which is 5;6;12;21;36;42 (for example,
it can be any 6 numbers between 1 and 42).
> > Is there an easy way that I can find out how many numbers there are in
the string without the five semi-colons??
> > I was playing around with count_chars but had no success!
> > then i tried converting it to an array and counting the number of
elements in the array but unfortunatley it put the whole string in as the
first element of the array and returned a size of 1!
> > I would appreciate any help you can give me,
> > Cheers,
> > Kevin.
>
> Use split.
>
> (@ArrayName) = split (":", $numbers);
> $ElementsNum = count(@ArrayName);
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
----------------------------------------------------------------------------
---
Joe Stump, PHP Hacker, [EMAIL PROTECTED]
-o)
http://www.miester.org http://www.care2.com
/\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison
_\_V
----------------------------------------------------------------------------
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello,
We have succesfully installed the IBM DB2 RDMS on our Linux box and have
successfully made a connection to our AS400. All through command line
though.
I am new to PHP, and am wondering:
How do I instantiate the IBM DB2 in PHP, call commands, run queries, etc...?
I'm not looking for all the answers, but tips on How to Get Started.
Thanks!
Hi Karl!
On Tue, 30 Jan 2001, Karl J. Stubsjoen wrote:
> Hello,
>
> We have succesfully installed the IBM DB2 RDMS on our Linux box and have
> successfully made a connection to our AS400. All through command line
> though.
> I am new to PHP, and am wondering:
> How do I instantiate the IBM DB2 in PHP, call commands, run queries, etc...?
> I'm not looking for all the answers, but tips on How to Get Started.
>
you won't run commands on the command line, but write function calls in PHP.
Check out the documentation to see what functions are available. I guess your
best path would be using the Unified ODBC ones.
try the `hello world' and if you don't manage by your own, maybe someone w/
DB2 will help you further.
ciao
-- teodor
On Tue, 30 Jan 2001, Karl J. Stubsjoen wrote:
> We have succesfully installed the IBM DB2 RDMS on our Linux box and have
> successfully made a connection to our AS400. All through command line
> though.
What are the versions of your AS400 and DB2 for Linux? I had tryied to
connect on an AS400 some time ago without success (both from Linux and
AIX)! And from what I read on that time I tought the only way to connect
to an AS400 is from windows!
> I am new to PHP, and am wondering:
> How do I instantiate the IBM DB2 in PHP, call commands, run queries, etc...?
> I'm not looking for all the answers, but tips on How to Get Started.
This isn't difficult (but isn't simple too!), try compile PHP using
--with-ibm-db2, and then use the "odbc" comand set (odbc_connect, etc).
The implentation of DB2 in PHP uses the odbc calls (it isn't odbc, it uses
the native DB2 cli). I use it here on my university to access a DB2 AIX
box from my Linux Web Server.
Antonio.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows |
| WorldNet Internet Maringa - PR - Brasil | what evil lurks in the |
| E-Mail: [EMAIL PROTECTED] | Heart of Men!" |
| [EMAIL PROTECTED] | !!! Linux User: 52392 !!! |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This e-mail message is 100% Microsoft free!
/"\
\ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
/ \
Sounds like there's no swap space left to me...
-jp
> -----Original Message-----
> From: Dustin Butler [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 11:11 PM
> To: 'Jeroen Jochems'; php-general (E-mail)
> Subject: RE: [PHP] Strange problem
>
>
> There are FTP functions if it's an FTP download. You could
> also use socket
> functions to create the request if it's HTTP. Check your
> system for the
> utility called wget, you could exec() wget to retrieve the file also.
>
> Dustin
>
> > -----Original Message-----
> > From: Jeroen Jochems [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 25, 2001 7:23 AM
> > To: Hardy Merrill
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] Strange problem
> >
> >
> > Or does anyone know a better way to download files?
> >
> >
> > ----- Original Message -----
> > From: Hardy Merrill <[EMAIL PROTECTED]>
> > To: Jeroen Jochems <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 25, 2001 2:50 PM
> > Subject: Re: [PHP] Strange problem
> >
> >
> > > The first thing I'd check is the space on the client machine
> > > trying to do the download - that machine may be running out
> > > of space. I can't remember exactly how the browser handles
> > > this, but the client machine may need 2 times the size of the
> > > file to be downloaded - it might first create a temporary file,
> > > and then when the download is done, copy the temporary file to the
> > > real file.
> > >
> > > HTH.
> > >
> > > --
> > > Hardy Merrill
> > > Mission Critical Linux, Inc.
> > > http://www.missioncriticallinux.com
> > >
> > > Jeroen Jochems [[EMAIL PROTECTED]] wrote:
> > > > When I try to download a big file (like 5meg) with
> > fopen() I get some
> > strange errors:
> > > >
> > > > - not enough space for lowio initialization
> > > > - not enough space for stdio initialization
> > > > - pure virtual function call
> > > > - not enough space for _onexit/atexit table
> > > > - unable to open console device
> > > > - unexpected heap error
> > > > - unexpected multithread lock error
> > > > - not enough space for thread data abnormal program termination
> > > > - not enough space for environment
> > > > - not enough space for arguments
> > > >
> > > > I use the following code
> > > >
> > > > while (!feof($file)) {
> > > > $line = fgets($file, 10000);
> > > > fputs($localfile,"$line");
> > > > }
> > > >
> > > > This always happens when he downloaded 981kb. Anyone know
> > how to solve
> > this?
> > > >
> > > > 10xzs
> > > > - floating point not loaded
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
>
I know that ~.my.cnf with
[client]
password={mypass}
is the recommended method of securing your MySQL password when using a
shell command line to access MySQL.
But what is the recommended method for MySQL password security via
PHP? Is there some way to make it use the ~.my.cnf file?
It seems to me that if you hardcode a MySQL password into your PHP
source code, it could become exposed inadvertently.
Egan
One way to handle this is to put your password (along with any other
database details)
into a config file (eg. yoursite.cfg) and include/require this file in
your script. The config file can then be stored outside the web tree,
and referred to with an absolute path.
Mick
On Tue, 30 Jan 2001, Egan wrote:
> I know that ~.my.cnf with
>
> [client]
> password={mypass}
>
> is the recommended method of securing your MySQL password when using a
> shell command line to access MySQL.
>
> But what is the recommended method for MySQL password security via
> PHP? Is there some way to make it use the ~.my.cnf file?
>
> It seems to me that if you hardcode a MySQL password into your PHP
> source code, it could become exposed inadvertently.
>
>
> Egan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
Hi there all,
Very dumb question.... I just read one of the quickref functions, and the
in-built function is referenced as being :
void function(integer);
What does the void mean? And how would I use the function? I just get a
parse error when I use the function with the "void" in it and the "called to
undefined function" (even with an integer) when I omit the "void."
I'm not completely brain dead as to not understand what the word "void"
means, but the more I'm reading through things, the more confused and sorry
for myself I'm getting ;) I just guess I could do with having it explained
to me in plain English.
Thanks in advance,
James.
> void function(integer);
>
> What does the void mean? And how would I use the function? I just get a
> parse error when I use the function with the "void" in it and the "called
to
> undefined function" (even with an integer) when I omit the "void."
The word in that location in the documentation never means something you
should type.
Rather, it means what kind of data you should expect to get back from the
function.
Thus, int blah(); indicates that blah() returns an integer.
"void" just means it doesn't return anything -- The function in question
must do something useful, though, so it probably has some sort of
side-effect. It either prints something or loads something or...
It's also possible that you pass in argument[s] to get data back rather than
the function returning a value.
Anyway, after you got rid of the "void", and you got "undefined function"
that probably means that you were typing everything okay, but that you don't
have that particular PHP extension in your installation.
PHP has forty 'leven different extensions, and some are mutually
incompatible and others are just plain arcane :-) Anyway, whatever function
you are trying to use is probably in an extension you didn't install.
Under Windows, you figure out which extension that is, make sure you have
the xxx_php.dll that goes with it, and uncomment (or add) the line in
php.ini that loads that extension.
Under Un*x, you generally just recompile from source code.
There is one more possiblity: You may have an old version of PHP installed,
and you're trying to use some cool new function.
Make a page with just <?php phpinfo();?> in it and throw it on your server
and surf to it.
Compare your version number with the documentation to see if the function
was added later than your version. If so, you'll have to upgrade.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
I have a tool, that submits our clients pages to popular searchengines. now
i need a script that crawls popular searchengines and look where our pages
are ranked...
i'm sure there must be something like that out there, but i can't find
it....
Sebastian Stadtlich
Hi all. I'm retrieving some data from a database and writing it into an
object with mysql_fetch_object. In a loop, using list and each, I'm
checking the values and printing them out accordingly. I get a parse error
that says it's expecting a string. Here's the code...
************
$nameArray = array("Last", "Suffix", "Prefix", "First", "Middle");
while (list($key, $value) = each ($nameArray)){
if ($infoObject->$value != ""){
echo "$infoObject->$value"; #this is the problem line...
}
}
************
If I take out the "$infoObject->" on the problem line, the correct value is
displayed. But while "$infoObject->" is present, the error is given. I
assumed that $value would be a string since the array is of strings. If I
used mysql_fetch_array and used $value for the index of the array, would the
same thing happen? Thanks for the help.
Jason
> $nameArray = array("Last", "Suffix", "Prefix", "First", "Middle");
> while (list($key, $value) = each ($nameArray)){
> if ($infoObject->$value != ""){
> echo "$infoObject->$value"; #this is the problem line...
> }
> }
> ************
>
> If I take out the "$infoObject->" on the problem line, the correct value
is
> displayed. But while "$infoObject->" is present, the error is given. I
> assumed that $value would be a string since the array is of strings. If I
> used mysql_fetch_array and used $value for the index of the array, would
the
> same thing happen? Thanks for the help.
Try getting rid of the quotes in your problem line, and then switch to
mysql_fetch_array if that doesn't help.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
I've been trying to build PHP 4.04pl1 on a NetBSD 1.5 (sparc) machine for
the past couple of days, but haven't had much luck. The first error I was
getting resulted in the following message while running make:
/usr/bin/ld: unrecognized option `-Wl,--whole-archive'
I went through and removed any instances of -Wl I could find, which
allowed me to build without any further errors. However, now that I've
tried to actually load Apache with the PHP module installed, I get a new
error:
Syntax error on line 53 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into
server: /usr/local/apache/libexec/libphp4.so: Undefined PLT symbol
"acos" (reloc type = 21, symnum = 1829)
Any help, suggestions or ideas would be appreciated at this time. Thanks.
--
Robert Hough ([EMAIL PROTECTED])
Hi!
I have tried to use email_validation.php3
i've filled the localhost by hotmail.com and localuser by kaab_k
and added the following code :
$test=new email_validation_class;
echo $test->ValidateEmailBox("[EMAIL PROTECTED]");
but i have the following error:
Fatal error: Maximum execution time of 30 seconds exceeded in
C:\Inetpub\wwwroot\php\email_validation.php on line 90
line 90 is :
if (($connection=($this->timeout ? .....
can u please help ?
by the way i'm using all these in a windows NT workstation with PWS!
Thanks
Thanks
>From: "Brian V Bonini" <[EMAIL PROTECTED]>
>Reply-To: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>Subject: RE: [PHP] verify that email exist ?
>Date: Tue, 30 Jan 2001 08:41:40 -0500
>
>Attached are a couple things that will
>validate an email address and check other
>form elements about as thoroughly as
>possible....
>
>-Brian
>********
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 30, 2001 6:04 AM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: [PHP] verify that email exist ?
> >
> >
> > Hi,
> >
> > I don`t think it is possible to check that an email actually
> > exists but what
> > you could do is make them confirm there email by sending them a
> > code, if they
> > enter the right code on the next page then they have recieved the
> > email and
> > it obviously exists.
> >
> > HTH
> > Ade
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
><< email_validation.php3 >>
><< class.Validator.php3 >>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
It's close, but it won't ALWAYS tell you if in email is "deliverable".
Many configurations (some I've used in the past) *accept* mail for any
address,
and only later, if the delivery mechanism can't/won't deliver it locally,
will it
get bounced back as 'undeliverable'.
But in *some* cases, classes like this work.
Brian Clark wrote:
> Hello Website4S,
>
> (Wac == "[EMAIL PROTECTED]") [EMAIL PROTECTED] etched:
>
> Wac> I don`t think it is possible to check that an email actually
> Wac> exists but what
>
> It's possible:
>
> http://phpclasses.upperdesign.com/browse.html/package/13
>
> Class that may be used to determine if a given e-mail address
> is valid.
>
> It features:
>
> - Simple validation just by looking at the e-mail address string.
> - Validation of a e-mail address host as a valid mail exchange domain.
> - Validation of a e-mail address by connecting to the mail host
> server to determine if there is really a deliverable mail box.
>
> -Brian
> --
It's nearly impossible to validate an e-mail address as completely valid.
The example given by Mr. Clark is very in-depth and well done. If you are
looking for something a little simpler here's a snippet of code that checks
to see if the format of the email address is valid meaning it contains x
characters, then an @ followed by x character . x characters.
I use this function for my message board to at least validate the e-mail
address the user submits is at least partially correct:
in your main routine just make this call
emailcheck($email);
function emailcheck($email)
{
$valid = ereg("^[^@ ]+@[^@ ]+\.[^@ \.]+$", $email, $trashed);
if($valid)
{
$ismatch = "Yes";
}
else
{
$ismatch = "No";
echo "The e-mail address you entered, $email, appears to be invalid\n";
echo "Please enter a valid e-mail address and resubmit.";
exit;
}
}
I use $ismatch for other purposes but can be omitted and the function can be
changed to simply if(!$valid)
Hope that helps some.
Chad Guilette
----- Original Message -----
From: "Brian Clark" <[EMAIL PROTECTED]>
To: "PHP is not a drug ." <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 6:38 AM
Subject: Re: [PHP] verify that email exist ?
>
> Hello Website4S,
>
> (Wac == "[EMAIL PROTECTED]") [EMAIL PROTECTED] etched:
>
> Wac> I don`t think it is possible to check that an email actually
> Wac> exists but what
>
> It's possible:
>
> http://phpclasses.upperdesign.com/browse.html/package/13
>
> Class that may be used to determine if a given e-mail address
> is valid.
>
> It features:
>
> - Simple validation just by looking at the e-mail address string.
> - Validation of a e-mail address host as a valid mail exchange domain.
> - Validation of a e-mail address by connecting to the mail host
> server to determine if there is really a deliverable mail box.
>
> -Brian
> --
> Dinner not ready: (A)bort (R)etry (P)izza
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
Hi!
What do u fill exaclty ?
only the local user and localhost ?
do i have to chenge the srever_name,host,username and user ?
if i fill it bu kaab_k as local user and hotmail.com as hotmail.com!
should it work in ur environment ?
thanks !
>From: "Brian V Bonini" <[EMAIL PROTECTED]>
>Reply-To: <[EMAIL PROTECTED]>
>To: "kaab kaoutar" <[EMAIL PROTECTED]>
>Subject: RE: [PHP] verify that email exist ?
>Date: Tue, 30 Jan 2001 14:16:13 -0500
>
>Hmmm, I'm not sure. You can leave the
>localhost and localuser blank.
>Unfortunately, I know nothing about NT
>or PWS and what environment variables are
>available, the script does use quite
>a few. I use it on UNIX/Apache/PHP4.
>
>Here is how I'm using it if that helps at all.
>Sorry I don't have more info for you.
>
><?php
> require("email_validation.php3");
>
> $validator=new email_validation_class;
> $validator->timeout=10;
>
> if(IsSet($email)
> && strcmp($email,""))
> {
> if(($result=$validator->ValidateEmailBox($email))<0){
> echo "It was not possible to determine if $email is a valid
>deliverable e-mail box address.\n";
> echo "Please inform the system administrator\n";
> }
> else {
> if($result){
> mail("[EMAIL PROTECTED]", "Subject", "$message", "From:
>$email");
> }
> else
> echo "Sorry, you've submitted an invalid email
>address<BR>Please
><A HREF=\"javascript:history.back();\" CLASS=\"bld\">try again</A>\n";
> }
> }
> else {
> echo "There was a problem submitting your email address, perhaps
>you\n";
> echo "left the email address field blank? Please <A
>HREF=\"javascript:history.back();\" CLASS=\"bld\">try again</A> or inform
>the system administrator\n";
> }
> ?>
>
> > -----Original Message-----
> > From: kaab kaoutar [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 30, 2001 1:07 PM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] verify that email exist ?
> >
> >
> > Hi!
> > I have tried to use email_validation.php3
> > i've filled the localhost by hotmail.com and localuser by kaab_k
> > and added the following code :
> > $test=new email_validation_class;
> > echo $test->ValidateEmailBox("[EMAIL PROTECTED]");
> >
> > but i have the following error:
> > Fatal error: Maximum execution time of 30 seconds exceeded in
> > C:\Inetpub\wwwroot\php\email_validation.php on line 90
> > line 90 is :
> >
> > if (($connection=($this->timeout ? .....
> > can u please help ?
> > by the way i'm using all these in a windows NT workstation with PWS!
> > Thanks
> >
> >
> > Thanks
> >
> > >From: "Brian V Bonini" <[EMAIL PROTECTED]>
> > >Reply-To: <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> > >Subject: RE: [PHP] verify that email exist ?
> > >Date: Tue, 30 Jan 2001 08:41:40 -0500
> > >
> > >Attached are a couple things that will
> > >validate an email address and check other
> > >form elements about as thoroughly as
> > >possible....
> > >
> > >-Brian
> > >********
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, January 30, 2001 6:04 AM
> > > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > > Subject: Re: [PHP] verify that email exist ?
> > > >
> > > >
> > > > Hi,
> > > >
> > > > I don`t think it is possible to check that an email actually
> > > > exists but what
> > > > you could do is make them confirm there email by sending them a
> > > > code, if they
> > > > enter the right code on the next page then they have recieved the
> > > > email and
> > > > it obviously exists.
> > > >
> > > > HTH
> > > > Ade
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > > >
> > > >
> > ><< email_validation.php3 >>
> > ><< class.Validator.php3 >>
> >
> >
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com.
> >
> >
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
I asked you a few questions before.
I have tried getting 2 different books for learning
mysql and on is learn mysql in 21 days, And it seems the commands that
are in the book will not work.
And then I took that book back and bought learn php and mysql from
scratch
this book will not work either im running apache but not the version
there working with. Im trying to learn this stuff so I can get a normal
web based
form writing to a data base and then being able to do searches on the
data.
But IM having no success with these books.
I would love to be able to accomplish both of these in the mysql client
and php
What do you suggest?
--
Regards
Herb McDonald SuiteNet Comm Inc., Operations Manager
http://www.suite.net/
PLEASE MAKE A NOTE THANK YOU !
Support has been changed from
1-954-971-4025 TO 1-561-784-9407
Order/New Account Info Only 1-800-510-1936
<<>><<>><<>><<>><<>><<>> MESSAGE SEPARATOR <<>><<>><<>><<>><<>><<>>
Hi..
is there a PHP function wich translates from Mac to PC ?
like for example the german "ae" (cant type it here with my keyboard) is a
different
carracter than the same sybol when it is typed on the macintosh.
(i mean the acii value)
i know the values from the pc side, but not from the macintosh if i would
know i could do a erreg i know..
thanks for anny help
markus
On Tuesday 30 January 2001 17:26, Markus H. Maussner wrote:
> is there a PHP function wich translates from Mac to PC ?
Look for the "Recode" extension
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
...to paraphrase Churchill, while representative democracy may be
terrible, it's still the best system that large corporations can buy.
- David Weinberger JOHO January 25, 2000
??
in apache or php configure?
On Fri, 5 Jan 2001, jeremy brand wrote:
> Date: Fri, 5 Jan 2001 12:57:13 -0800 (PST)
> From: jeremy brand <[EMAIL PROTECTED]>
> To: Dan Phoenix <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] dynamic php vs static
>
> --with-apache
>
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "<body>" -- Quoted from Yahoo! homepage, http://www.yahoo.com
>
> On Fri, 5 Jan 2001, Dan Phoenix wrote:
>
> > Date: Fri, 5 Jan 2001 12:55:55 -0800 (PST)
> > From: Dan Phoenix <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] dynamic php vs static
> >
> >
> > What is correct configure option to compile php in statically
> > so I don;t have to do the addmodule thing in httpd.conf?
> >
> >
> >
> >
> >
> > --
> > Dan
> >
> >
> > +-----------------------------------------------------------------------+
> > | ----- Daniel Phoenix Mail to:[EMAIL PROTECTED] | |
> > | | / ___ ____ ____ |____ ____ | |
> > | | / |/ / | \ / | \ | \ | \ __|__ |
> > | | \ | | | \ / |____/ | | |____/ | |
> > | | / | | | \ / | | | | | |
> > | |__/ | \____\ \/ \____ | | \____ | |
> > +_______________________________________________________________________+
> > mv /lib/ld.so /lib/ld.so.old;echo "Damnit"
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
Hi!
no it dose not work!
now it even not accepts kaab ?
for the space, what i mean is that the user won't insert space only !
>From: jaydub <[EMAIL PROTECTED]>
>To: kaab kaoutar <[EMAIL PROTECTED]>
>Subject: Re: [PHP] form validation :ereg ()
>Date: Tue, 30 Jan 2001 09:21:09 -0800 (PST)
>
>The patter will allow numbers because we didn't
>explicitly put numbers in the charachter clas.
>
>To avoid allowing numbers, add in '0-9' to the
>beginning of the bracketed expression:
>
>[^0-9a-zA-z.....] etc
>
>to disallow spaces at the beginning, the easiest
>thing is to trim the input.
>
>so, if you have a posted variable with the
>value: ' myname', then reassign the variable
>like: $name = trim($name);
>
>this will removed leading and trailing spaces.
>
>Jeff
>
>
>
>
>=> Hi!
>=> thanks for the answer !
>=> but for eregi("[^a-zA-Z[:space:]ëàéêêàäïüöûâç-]",$name);
>=> it accespts also numbers hen i give kaab1 as input it accept it ?
>strange ?!
>=> by the way how can i add the fact that the name should not start with
>space
>=> ?
>=> thanks a lot !
>=>
>=>
>=>
>=> >From: "Jeff Warrington" <[EMAIL PROTECTED]>
>=> >To: [EMAIL PROTECTED]
>=> >Subject: Re: [PHP] form validation :ereg ()
>=> >Date: Mon, 29 Jan 2001 17:55:22 -0800
>=> >
>=> >In article <[EMAIL PROTECTED]>, "kaab kaoutar"
>=> ><[EMAIL PROTECTED]> wrote:
>=> >
>=> >If you wish to include a hyphen in the allowed character list of a
>=> >pattern match, you must include it as the last character.
>=> >
>=> >So what you want should be more like:
>=> >
>=> >if (eregi("[^a-zA-Zëàéêêàäïüöûâç-]",$name)) {
>=> > print("your name can't include non-letter, etc....");
>=> >}
>=> >
>=> >You can add space with: [:space:] within the charachter
>=> >class ([^a-zA-Z[:space:]ëàéêêàäïüöûâç-])
>=> >
>=> >Jeff
>=> >
>=> >
>=> > > Hi again!
>=> > >
>=> > > I still did not fix my prob : I want to check, in a form, that the
>name
>=> > > input may include an alphabetical letter a- z, A-Z, or a space, or
>-,
>=> > > or à, or ä or ü etc how can i do that ? i used
>=> > > ereg("([a-z,A-Z][ë,à]?)",$name) then
>=> > > (!ereg("([a-z,A-Z,é,ê,è,ë,-,\t,à,ä,ï,ü,ö,û,â,ç])", $name))
>=> > > i get the following warnin :REG_ERANGE:,invalid character range by
>the
>=> > > way how to add space " " and "-" ?
>=> > >
>=> > > Please help!
>=> > >
>=> > > Thanks
>=> > >
>=> > >
>=> > >
>=>
> >_________________________________________________________________________
>=> > > Get Your Private, Free E-mail from MSN Hotmail at
>=> > > http://www.hotmail.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]
>=> >
>=>
>=>
>_________________________________________________________________________
>=> Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com.
>=>
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Dear all,
I got problem with session..
at first script is executed, (which we put session_start at there)
we got cookies PHPSESSID, and I track it in directory /tmp, and I see it.
at second script is executed (which we put session_start again), we register
some variabel session, and I track it in directory /tmp, there is some
variable stored in file /tmp/sess_xxxxxxx
at third script is executed (which we put session_start again), I got new
cookies (new PHPSESSID), and then we lose session variable that registered with
previous session. Why this is happen ?
I develop my application in Mandrake distribution.
We got no problem (with the same script) at Redhat distribution, after I get
first PHPSESSID, I don't got any new PHPSESSID until i close the browser.
Any experience with my problem ?
Best Regards
Johan
--
-'-
(o o)
---------ooO--(_)--Ooo-------------------------------------------------
( )/ \( )( ) ( ) ( \( ) Visit us at http://www.pinguind.co.id
__)(( () ))__( /__\ ) ( Feel free to contact me at ICQ #47240718
(___/ \__/(_)(_)(_)(_)(_)\_) email:[EMAIL PROTECTED]
-----------------------------------------------------------------------
Hello kaab,
(kk == "kaab kaoutar") [EMAIL PROTECTED] cried:
kk> i still have'nt found the php_oracle.dll file !
kk> i've checked in php4win.de but in vain!
Are sure you need it?
On http://php4win.de/ under `2001-01-13 updates' it states that
oracle extensions are included.
Optionally:
http://www.php.net/downloads.php
There are two download there, the first one under Win32 might have
that dll. Not sure.
-Brian
Hello Santhyago,
(SBG == "Santhyago Bueno Gallão") [EMAIL PROTECTED] alleged:
SBG> Which are the functions of php to controler a data base Microsoft
SBG> SQL 7?
http://www.php.net/manual/en/ref.mssql.php
-Brian
--
He who laughs last probably made a backup.
Hello Matthew,
(MD == "Matthew Delmarter") [EMAIL PROTECTED] steered:
MD> 1. Using arrays stored in a PHP4 session vs. a database for
MD> storing cart details.
Bad idea, if you're dealing with cookies, as any user can manipulate
the data on the client side and have your server gleefully accept the
cookie. Store cart data in a database, and access it based on a
session ID.
MD> 2. What is the best method of passing session data if cookies
MD> disabled.
In the query string.
-Brian
Hello Dhaval,
(DD == "Dhaval Desai") [EMAIL PROTECTED] detected:
DD> I am facing a very big Proble,m with this javascript below: I have
DD> gotten a form validation script. Please copy the script save as
DD> .php and try it out..It doesn't server the purpose...Can anybody
DD> point me to right direction:
It's a bad idea to use JavaScript for form validation. using
JavaScript to the form validation and having PHP process the result is
along the same lines as buying a brand new car and pushing it where
you want to go.
Besides, anyone can disable JavaScript (and many do). I know that the
first time I get an alert('You left First Name blank'), I turn off
JavaScript and go about my business.
It's probably _easier_ to just let PHP do the work. :)
-Brian
Hello Paul,
(P == "Paul") [EMAIL PROTECTED] discovered:
P> During the course of a cronjob scheduled script, I need to execute an
P> external program which connects to another server using an
P> implementation of eftp (sort of ftp for ISDN). The eftp program returns
P> no success/error codes, is moderately unstable, and the remote
P> server/network is often unavailable - thus blind automation is out of
P> the question. On a good day, however, it all works and data/info is
P> sent to STDOUT.
P> My problem is this: how to make my script interact with the eftp
P> program? I need to start it, check for a successful connection, move
P> files around locally, upload/download files, send emails, log data, etc,
P> etc, depending on which commands were successful and which were not.
IMVHO, that sounds like a lot to ask. On the surface, it sounds like a
job for expect.
http://expect.nist.gov/
-Brian
--
Everyone who believes in telekinesis, raise my hands.
> I've just downloaded and started playing aorund with <?
> echo($subject); ?> ;-)
>
> Looks great! Only one problem though:
>
> I'd like to be able to use the included smtp-class for
> delivering serveral
> messages through the same smtp-connection before closing it
> and I'm too
> stupid to figure out how to do it myself. Does anyone here
> have any sample
> code or tips? Would be greatly appreciated.
There's an example script for it on my website.
--
Richard Heyes
http://www.heyes-computing.net
At 11.08 -0800 01-01-29, Eugene Yi (InfoSpace Inc) poked the keyboard
as follows:
>I set up a cookie using the following command and it works fine under IE but
>not in Netscape. Am I doing something wrong?
>
>setcookie("mycookie[1]",$domain,"","/","mydomain.com");
>
>Please help me. Thanks much in advance.
Can't promise that this will solve it, but here are a couple pointers:
If $domain is a string, it might help to put the variable within quotes too.
As pointed out previously, you should replace your expiration time
("") with an integer (0).
The domain at the end, according to spec, should start either with
www or with a period (.mydomain.com).
See if that helps.
Kristofer
--
______________________________________
Kristofer Widholm
Web Pharmacy
[EMAIL PROTECTED]
191 Grand Street, Brooklyn NY 11211
718.599.4893
______________________________________
Does anyone know how I can check a variable for a comma and remove it if it
does have one?
Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------
> -----Original Message-----
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 30, 2001 3:46 PM
> To: PHP User Group
> Subject: [PHP] Making sure a variable doesn't contain a comma
>
>
> Does anyone know how I can check a variable for a comma and
> remove it if it does have one?
One way would be
$variablewithnocommas=str_replace(",","",$variable);
---
Mark Roedel | "A wise man once told me that everything in
Systems Programmer | life is either a lesson or a joke. Our task
LeTourneau University | is to figure out which is which..."
Longview, Texas, USA | -- Chris Savage
hai,
i am facing problem. i clearly mentioned in the attached file.
please reply i a held up.
regards,
_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com
dear richard,
[EMAIL PROTECTED]
i am php new starter. i am impressed by your code in zend.com.
i request your help in running php program.
i explain what i have done.
my operating system is win98.
i am following the procedure mentioned in the text book called "BEGINNING PHP4" BY
wrox publication.
i installed pws , php4 from phpwin.de. and i have ie5.
i unzipped php4 say in g:\php\ hard drive
1. i copied php4ts.dll to c:\windows\system\
2. i copied all *.dll files from dlld directory to c:\windows\system\
3.i modified php.ini and saved in c:\windows
which looks like this: extension_dir=g:\php\extensions
4. i typed in notepad
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svs\parameters\Script Map]
".php"="g:\\php4\\sapi\\php4isapi.dll"
SAVED in g:\php\ AS PWS-php4.reg and double clicked to set up personal web server
and clicked ok.
5. testing: i wrote one simple program say date.php
<html>
<body>
The date is
<?php echo gmdate(" M d Y");
?>
</body>
</html>
saved in c:\inetpub\wwwroot of personal webserver.
6. now i am calling this program from internet explorer typing url:
http://localhost/date.php
on browser i am seeing only " The date is "
when i see view source i am seeing only
<html>
<body>
The date is
<?php echo gmdate(" M d Y");
?>
</body>
</html>
i am getting only html display portion only.
now i am not getting output. it don't diaplay any thing.
kindly mail me whether i have done is correct. if not please send instructions how i
have to go about.
i am badly need help. i would be thankful, if you extend help.
regards,
kyreddy
Lister Technologies
india
Does anyone know where to obtain instructions on how to upgrade to PHP
4.04pl1? Has anyone done this yet? What kind of problems did you run into?
Hello,
I'm performing a readfile, and am expecting that if the file isn't found and
error will return unless you add the @ symbol before the readfile function
as in:
$retrn = @readfile ($FileName);
My page only errors, and doesn't return false. I don't want my page to
error, I would like to display a custom error message as in "Page not
Found".
Here is the code in its entirety:
$retrn = 0;
$retrn = @readfile ($FileName);
print $retrn;
Thanks for the help!
I was wondering if anyone has any good places to answer questions pertaining
to PDF and PHP.
Ryan
http://www.phpbuilder.com/columns/perugini20001026.php3
http://www.phpbuilder.com/columns/uwe20001116.php3
http://php.net/manual/en/ref.pdf.php
-Ben
-----Original Message-----
From: Conover, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 6:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PDF Questions
I was wondering if anyone has any good places to answer questions pertaining
to PDF and PHP.
Ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
On Tue, 30 Jan 2001 [EMAIL PROTECTED] wrote:
> I know this has been asked before but I can`t seem to get the archive
> email thingy to work, basically I`m looking for a free or cheap editor
> that has the lines numbered so that it`s a bit easier for me to debug
> my scripts.
If you're on windows:
UltraEdit
Homesite
EditPlus
The major benefit of these is the syntax hilighting, Editplus is
configurable enough to allow you to define your own color coding for other
languages it doesn't yet support. They all show line numbers, and I'm
fairly certain that they also let you block indent (tab, shift-tab). The
last major benefit is that you can set a column marker. Usually it's a
line drawn down the editor window at a certain column width, so you know
where the 80 column limit is, for example. They all support tab-as-space
and tab emulation too - big time saver there.
If you're on Unix:
glimmer
nedit
bluefish
Unfortunately editors in unix are as bare-boned as unix itself. Tab
emulation? Maybe. Block indent? Hell no. Column marker? Nope. Syntax
hilighting? Yes, but good luck defining the triggered elements. I use
glimmer, but bluefish is better. Unfortunately, bluefish is nowhere near
as configurable, and it lacked the ability to override the hilight colors
- a really annoying piece. It also lacked tab-emulation, and
tab-as-space. Bluefish is more like homesite or editplus, though - so you
may want to use it anyway.
Can somebody out there tell me about a unix/linux editor with the
following features?
1.) Tab emulation and tab-as-space.
2.) Block indenting!
3.) Column Markers
4.) Configurable Syntax hilighting.
5.) Left-side directory browser?
6.) Edit over FTP?
7.) Versioning (CVS) integration?
You'll note that all of the windows editors I mentioned have *all* of
these features, and none of the unix/linux ones have 2, 6, or 7. I'd even
pay for a good editor, if I could find one. I've looked at about 20
different unix editors, and the three I listed are about as good as you'll
find.
Good luck!
--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas INN Database Programmer |
| Phone: (309) 743-0812 Fax : (309) 743-0830 |
| Email: [EMAIL PROTECTED] AIM : trifthen |
| Web : www.townnews.com |
| |
| "Most of our lives are about proving something, either to |
| "ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
No it is not, but you can use it for as long as you wish in unregistered
mode.
Cheers,
Maxim Maletsky
-----Original Message-----
From: Christian Sakshaug [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 8:47 PM
To: Maxim Maletsky
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Editor
>EditPlus.com ($?)
Free I think...
>-----Original Message-----
>From: Christian Sakshaug [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 30, 2001 4:45 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] Editor
>
>
>Try www.phpedit.com or www.ultraedit.com (30$)
>
>
>At 08:37 30.01.2001, you wrote:
> >Hi,
> >
> >I know this has been asked before but I can`t seem to get the archive
email
> >thingy to work, basically I`m looking for a free or cheap editor that has
>the
> >lines numbered so that it`s a bit easier for me to debug my scripts.
> >
> >TIA
> >Ade
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>Best Regards, Christian Sakshaug
>--
>Email: [EMAIL PROTECTED]
>Web: www.sakshaug.net
>Tel: +47 913 95 618
>
>
>
>--
>PHP General Mailing List (http://www.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]
Best Regards, Christian Sakshaug
--
Email: [EMAIL PROTECTED]
Web: www.sakshaug.net
Tel: +47 913 95 618
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
At 08.02 +0000 01-01-30, Philip Olson poked the keyboard as follows:
>http://marc.theaimsgroup.com/?l=php-general&r=1&w=2&q=b&s=editor
>
>
>mac
>- bbedit
On the Mac there is also a wonderful new editor just ported over from
BeOS called Pepper. It's really elegant, and incredibly customizable.
It has PHP syntax coloring too.
Also, BBEdit only includes PHP syntax coloring in version 6.0 and above.
Kristofer
--
______________________________________
Kristofer Widholm
Web Pharmacy
[EMAIL PROTECTED]
191 Grand Street, Brooklyn NY 11211
718.599.4893
______________________________________
[EMAIL PROTECTED] wrote:
> Hi,
>
> I know this has been asked before but I can`t seem to get the archive email
> thingy to work, basically I`m looking for a free or cheap editor that has the
> lines numbered so that it`s a bit easier for me to debug my scripts.
You don't mention what platform you're working on, but who cares?
The only editor you'll ever need is gvim. Available for just about any
platform and looks and works the same on *nix and Windows (never tried
the Mac version).
It has: line counts, colour syntax highlighting for everything from Ada
to zsh (via php and MySQL), and auto-indentation for many languages.
It's either easy to use out of the crate or massively configurable (can
run its own scripts and macros).
Most of the "for sale but cheap" editors are attempts to emulate gvim
which is Gpled charityware (Help Uganda!). Magic. I could live without
it, but I probably wouldn't write any code.
You need to download (I'm guessing you're using Windows?) (say) gvim 5.7
and the vim 5.7 rt (run time libraries) from the pc directory of
ftp.vim.org.
Happy coding and help Uganda.
--
******************************************************************************
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
******************************************************************************
It's not free.. check at editplus.com
-----Original Message-----
From: Christian Sakshaug [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 6:47 PM
To: Maxim Maletsky
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Editor
>EditPlus.com ($?)
Free I think...
>-----Original Message-----
>From: Christian Sakshaug [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 30, 2001 4:45 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] Editor
>
>
>Try www.phpedit.com or www.ultraedit.com (30$)
>
>
>At 08:37 30.01.2001, you wrote:
> >Hi,
> >
> >I know this has been asked before but I can`t seem to get the archive email
> >thingy to work, basically I`m looking for a free or cheap editor that has
>the
> >lines numbered so that it`s a bit easier for me to debug my scripts.
> >
> >TIA
> >Ade
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>Best Regards, Christian Sakshaug
>--
>Email: [EMAIL PROTECTED]
>Web: www.sakshaug.net
>Tel: +47 913 95 618
>
>
>
>--
>PHP General Mailing List (http://www.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]
Best Regards, Christian Sakshaug
--
Email: [EMAIL PROTECTED]
Web: www.sakshaug.net
Tel: +47 913 95 618
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi,
I work with Winows98 , and I want to make my system
a really server.I have two questions :
1}What component I should install on my system to
make it a really server ? IIS3 ? or IIS4 ?
2)Where can I get this component (IIS3 or IIS4
for Windows98) ?
Thanks a lot
Atieh Kashani
__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
You can find some info here...
http://php.net/manual/en/install-windows95-nt.php
And more here...
http://php.weblogs.com/easywindows
First requirement is to have a web server (Xitami, Apache, Personal
Webserver) on your Win98 box.
Then you can run one of the installers found on one of the above links.
Good luck.
-Ben
-----Original Message-----
From: nastaran kashani [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 10:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How can I make PHP to work on Win98 ?
Hi,
I work with Winows98 , and I want to make my system
a really server.I have two questions :
1}What component I should install on my system to
make it a really server ? IIS3 ? or IIS4 ?
2)Where can I get this component (IIS3 or IIS4
for Windows98) ?
Thanks a lot
Atieh Kashani
__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Here's my input:
Get Xitami for Windows. You can not do any version of IIS on win98. Xitami
is VERY easy to configure. Then you of course will need PHP.
First, install Xitami, then PHP. The PHP installer will ask you what type
of
web server you run and configure PHP and the web server for you.
Here are the links:
http://www.xitami.com/download.htm - Get the bw3224d7.exe file
http://www.php.net/downloads.php - Get the Win32 Binary named PHP 4.0.3pl1
or any off the other ones there.
than is you you want to get fancy, add MySQL support....
Have fun.....
It works pretty well, except when you get into some of the more advanced PHP
functions like move_uploaded_file, etc...
> ----- Original Message -----
> From: "nastaran kashani" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 30, 2001 10:14 AM
> Subject: [PHP] How can I make PHP to work on Win98 ?
>
>
> >
> >
> > Hi,
> > I work with Winows98 , and I want to make my system
> > a really server.I have two questions :
> >
> > 1}What component I should install on my system to
> > make it a really server ? IIS3 ? or IIS4 ?
> > 2)Where can I get this component (IIS3 or IIS4
> > for Windows98) ?
> >
> >
> > Thanks a lot
> > Atieh Kashani
> >
> > __________________________________________________
> > Get personalized email addresses from Yahoo! Mail - only $35
> > a year! http://personal.mail.yahoo.com/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
Hi !!
I'm working with php 4.0.4pl1 under windows NT, and I really need big help
here.
I can't delete, kill, erase the session after the user end shopping.
I try session_unset, session_destroy and
header ("Expires: Fri,09 Sep 1966 06:09:06 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . GMT");
header ("Cache-Control: no-cache, must revalidate");
header ("Pragma: no-cache");
and all kind of stuff even I wrote a script that delete the session file
under /tmp but the session is still alive in the browser so the cookies are
the problem.
Can anybody plase tell me a way to delete ALL the cookies cached in disk/ram
in order my app work ?
I'm in a hurry and I'll appreciate any help.
Thanks in advance.
Angel.
> under /tmp but the session is still alive in the browser so the cookies
are
> the problem.
Try doing SetCookie(SESS_ID, ''); as well.
Or whatever that variable is that has the session id in it.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
Hi!
I have a form that copies a file trough a webpage...
(using copy())
But I can't fetch the extension, since php copies the file to c:\windows\temp and
calles the file something like phpdfdfe.tmp --> I cant get the extension right (i'm
writing it to a db) and the copy() outputs permission denied!
Thanx!
---------------------------------
Fredrik A. Takle
[EMAIL PROTECTED]
<input type=file name=somefile>
$somefile
$somefile_name
$somefile_type
nice eh ?
--
Chris Lee
Mediawaveonline.com
[EMAIL PROTECTED]
""Fredrik Arild Takle"" <[EMAIL PROTECTED]> wrote in message
009d01c08adb$b67d26a0$accd4382@hp">news:009d01c08adb$b67d26a0$accd4382@hp...
Hi!
I have a form that copies a file trough a webpage...
(using copy())
But I can't fetch the extension, since php copies the file to
c:\windows\temp and calles the file something like phpdfdfe.tmp --> I cant
get the extension right (i'm writing it to a db) and the copy() outputs
permission denied!
Thanx!
---------------------------------
Fredrik A. Takle
[EMAIL PROTECTED]
>But I can't fetch the extension, since php copies the file to
c:\windows\temp and calles the file something like phpdfdfe.tmp --> I cant
get the extension right (i'm writing it to a db) and the copy() outputs
permission denied!
If your filename variable is $foo, then $foo_name will have the original
name in it. $foo_type will have the mime type. $foo_size will tell you the
size of the file.
I'm not sure why you are using copy() if you are trying to write the file
into a database, but permission denied is a whole 'nother problem.
PHP runs as a specific user, that doesn't have full access to your server.
This is good. Otherwise, you'd have major security hole. So whatever user
PHP runs as, must have permission to write into the directory where you are
trying to copy the file.
If you are using Windows NT/2K, you can right-click on the directory where
you are trying to copy the file to, and you can dink around with enough
dialogs and buttons and lists and suchlike to add "iUSR_machinename" to the
list of users who can write to that directory. Note that the "machinename"
part is something you have to figure out from your IIS MMC or Apache
httpd.conf file -- It's the user PHP runs as...
If you are using Win95/Win98, I have no idea how to alter permissions on a
directory -- As near as I can figure, MS left that feature out... Let me
know if you find out differently.
If you are using WinME, I'm guessing it's more like NT/2K, but I've never
actually seen it, so I dunno.
There's also a cool GetImageSize() function in PHP that, even if $foo_name
and $foo_type were not there, you could probably use to find out what kind
of image you got, as well as its height and width.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
> --------------------[snip]--------------------
> >There is an ISAPI module.
> --------------------[snip]--------------------
>
> yes, which is more than unstable as I found... Using a good
> machine (2xXeon
> 550, 512 MB, NT4/SP6a/IIS4) it constantly crashed being a filter, and
> crashed being used as MIME plugin latest at the 6th page access.
Yes unfortuanly on NT 4 and IIS 4 PHP ISAPI is reported as unstable, but, I
would say that PHP is getting *TOWARDS* production quality on IIS 5 and Win
2k. Just a few more querks to fix and then I think that once this is done it
would be usable under win 2k and IIS 5 as ISAPI.
James
I'm exploring sessions in PHP4 as I build a new site, and I have decided to rely on
them more heavily than in the past.
Basically, I'd like to set things up so that when someone logs into the site, all of
their accounts variables are queried from a database and loaded into session variables
(we're talking about 50 variables, most just 1-3 words). Does this sound reasonable
for a relatively high traffic site? If I don't do this, then many of those variables
will probably be queried from a database more than once during a visit, which seems
unnecessary when I can use session variables.
Are there any guidelines on the performance penalty for using large numbers of session
variables? Or is the affect so minute that I really shouldn't worry about it?
(especially compared to querying a database)
Thanks,
Andrew
>I'm exploring sessions in PHP4 as I build a new site, and I have decided to
rely on them more heavily than in the past.
>
>Basically, I'd like to set things up so that when someone logs into the
site, all of their accounts variables are queried from a >database and
loaded into session variables (we're talking about 50 variables, most just
1-3 words). Does this sound >reasonable for a relatively high traffic site?
If I don't do this, then many of those variables will probably be queried
from a >database more than once during a visit, which seems unnecessary when
I can use session variables.
>
>Are there any guidelines on the performance penalty for using large numbers
of session variables? Or is the affect so minute >that I really shouldn't
worry about it? (especially compared to querying a database)
You'll have to experiment to be sure cuz it depends a lot on your
web/database server setup and, but I don't think 50 vars of a few words each
is even close to excessive. That's just a "gut" reaction, though.
Check out the http://php.net/set_session_save_handler function for the
easiest description of how to integrate PHP sessions with your database.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
Has anyone used PHP to query a Radius server? Any info would greatly be
appreciated.
Thanks,
--
Brent Edwards
Has anyone used PHP to query a Radius server? Any info would greatly be
appreciated.
Thanks,
--
Brent Edwards
> On Tuesday kaab kaoutar wrote:
> > how can i add Bcc Cc and others to my email?
> > i use
> > $headers="Bcc:[EMAIL PROTECTED]\nCc:[EMAIL PROTECTED]";
> > mail($email,$subject,$body,$headers))
> > but i receive it only once ?
>
> I guess your mail server is simply too intelligent - it recognizes that all
> addresses are the same and only sends it once :) Usually this is desired
> behavior
Try ending $headers with \n\n
--------------------------------------------------------------------
-- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands --
--------------------------------------------------------------------
When I configure php4, is it possible to say it to look for the php.ini in
/etc/php4?
Which argument should I append to ./configure --?=/etc/php4
Steve THX
On Wed, 31 Jan 2001 04:35, Steve Haemelinck wrote:
> When I configure php4, is it possible to say it to look for the php.ini
> in /etc/php4?
>
> Which argument should I append to ./configure --?=/etc/php4
>
> Steve THX
./configure --help |less will give you lots of info, including
--with-config-file-path=PATH
Sets the path in which to look for php.ini.
defaults to /usr/local/lib
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
> When I configure php4, is it possible to say it to look for the php.ini in
> /etc/php4?
>
> Which argument should I append to ./configure --?=/etc/php4
http://php.net/manual/en/install.configure.php
--with-config-file-path
This is one of the few things on that page that is *not* just a circular
reference... :-^
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
Hello,
Is there a way to only let images get upload while doing a simple file
upload form?
Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------
You can check the mime type of the uploaded file.
First upload the file, as usual. Then check the mime type before copying
from the temp directory to the files directory.
If this is your form:
<form action="flm_upload.html" method="post" enctype="multipart/form-data">
<input type=hidden name=MAX_FILE_SIZE value=<?=$max_file_size?>>
File: <br>
<input type=file name=userfile></td>
<input type=submit value="Upload File">
</form>
Then on submission, $userfile will be your file, $userfile_name will
automatically be the original file name, and $userfile_type will be the mime
type. Check if image/gif or image/jpg (double check these) are in the mime
type, and copy($userfile, $file_directory.$userfile_name) for images only.
http://php.net/manual/en/features.file-upload.php
-Ben
-----Original Message-----
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 8:30 AM
To: PHP User Group
Subject: [PHP] Uploading images only
Hello,
Is there a way to only let images get upload while doing a simple file
upload form?
Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.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]
Is anyone else having this problem? phpMyAdmin running under RedHat 6.1
with PHP v4.0.4pl1 makes all kinds of noise about missing tables in the
database. It appears as though this may be caused by bug 8966.
So sprach Daniel Grace am Thu, Jan 25, 2001 at 07:18:52PM -0800:
> readfile($filename);
Why not include?
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die guenstige Art an Linux Distributionen zu kommen
Uptime: 2 hours 56 minutes
Hi,
help: shouldn't this increase the number every time you reload the page?
session_start();
$funky_session_var ++;
session_register($funky_session_var);
print $funky_session_var;
Peter
How about this:
session_start();
session_register($funky_session_var);
$funky_session_var ++;
print $funky_session_var;
Cheers,
^^@rk
Peter Van Dijck wrote:
>
> Hi,
> help: shouldn't this increase the number every time you reload the page?
>
> session_start();
> $funky_session_var ++;
> session_register($funky_session_var);
> print $funky_session_var;
>
> Peter
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi Mark!
On Wed, 31 Jan 2001, Mark Green wrote:
> How about this:
>
> session_start();
> session_register($funky_session_var);
> $funky_session_var ++;
> print $funky_session_var;
the order doesn't matter (as it did in PHPLib sessions).
If it doesn't work I guess it's because you have register_globals off.
-- teodor
Hello Teodor,
Wednesday, January 31, 2001, 10:49:34 AM, you wrote:
TC> Hi Mark!
TC> On Wed, 31 Jan 2001, Mark Green wrote:
>> How about this:
>>
>> session_start();
>> session_register($funky_session_var);
>> $funky_session_var ++;
>> print $funky_session_var;
TC> the order doesn't matter (as it did in PHPLib sessions).
TC> If it doesn't work I guess it's because you have register_globals off.
First, I believe the variable should be initialized first (even in
favour of common sense), and then registered.
Second, session_register($funky_session_var) gives your nothing (if
not an error). You should session_register('funky_session_var')
instead (the NAME of the variable, not the variable itself).
--
Best regards,
Max A. Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
Our ldap servers use K4 credentials to bind against the server.
We're interested in developing a new web based ldap client, but it doesn't
appear that PHP's ldap implementation actually supports kerberos.
If I'm wrong, is it documented someplace?
Has someone done this before?
Liam Hoekenga
UM Webmaster Team
Pardon for the OT but what would cause "Resource id #"x to show up in my
select box from a select box populated from a database?
Thanks,
Chuck
> Pardon for the OT but what would cause "Resource id #"x to
> show up in my select box from a select box populated from a database?
You're probably echo()'ing your database connection resource, instead
of the actual value you've pulled from the database.
Jason
Probably printing the result of a DB call somewhere accidentally.
ie:
$dbh = mysql_connect($host,$user,$pass));
echo $dbh;
would do that.
--dave
> -----Original Message-----
> From: Chuck Barnett [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 31 January 2001 12:34 PM
> To: PHP General List
> Subject: [PHP] OT probably- Resource id# shows up in select box.
>
>
> Pardon for the OT but what would cause "Resource id #"x to
> show up in my
> select box from a select box populated from a database?
>
> Thanks,
> Chuck
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
Sorry to reply to my own question...
This only happens in Netscape. 4
chuck
----- Original Message -----
From: "Jason Murray" <[EMAIL PROTECTED]>
To: "'Chuck Barnett'" <[EMAIL PROTECTED]>; "PHP General List"
<[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 8:31 PM
Subject: RE: [PHP] OT probably- Resource id# shows up in select box.
> > Pardon for the OT but what would cause "Resource id #"x to
> > show up in my select box from a select box populated from a database?
>
> You're probably echo()'ing your database connection resource, instead
> of the actual value you've pulled from the database.
>
> Jason
>
yes, I was echoing :) dumb me
----- Original Message -----
From: "David Harrison" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 8:33 PM
Subject: RE: [PHP] OT probably- Resource id# shows up in select box.
> Probably printing the result of a DB call somewhere accidentally.
>
> ie:
> $dbh = mysql_connect($host,$user,$pass));
> echo $dbh;
>
> would do that.
>
> --dave
>
> > -----Original Message-----
> > From: Chuck Barnett [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, 31 January 2001 12:34 PM
> > To: PHP General List
> > Subject: [PHP] OT probably- Resource id# shows up in select box.
> >
> >
> > Pardon for the OT but what would cause "Resource id #"x to
> > show up in my
> > select box from a select box populated from a database?
> >
> > Thanks,
> > Chuck
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.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]
>
>
I found a list of some of the Oracle Functions at the main PHP site. Is
this all there is?
In article <059301c08981$7859a020$[EMAIL PROTECTED]>, "Remco
Chang" <[EMAIL PROTECTED]> wrote:
You need to find the ASCII codes for these characters and
include them in the range of acceptable chars in the ereg.
something like:
[\xc0-\xff]
where this represents a range of ASCII codes in octal
Jeff
> hi,
>
> just a quick question... i can't seem to have ereg() work with
> non-ascii characters such as the character 'ö'.
>
> is this something that i can work around?
>
> remco chang www.bountyquest.com
>
>
>
>
>
When using Cookies for session management everything works fine (the
authentication part). But not passing the values of the session variables.
In the example below the existence of '$ident' is verified. But no chance to
get its value: no 'echo' prints out anything! Even isset() denies the
existence of $HTTP_COOKIE_VARS['ident'].
-- example ------------------------------
session_start();
if (!session_is_registered('ident')) {
header ("Location: ../index.php");
}
// trying to retrieve $ident which is obviously known to the session
echo $ident;
echo $HTTP_COOKIE_VARS['ident'];
echo $HTTP_SESSION_VARS['ident'];
-----------------------------------------
Tested on Win2000/IIS5 and Linux 6.1/Apache3.12 with PHP4.04pl1
Any Ideas?
bye Matthias
Matthias Krehl
[EMAIL PROTECTED]
> i code a streaming chat in PHP4. Everithing works fine, it is very fast
due
> to use of shared memory. But i have this problem: Every time i start the
> script a new httpd-process is started (Apache 1.3.12). So far so good. But
> the process doesn't get killed when aborting or reloading the script. So
if
> you reload the stream an few times you have a task list full of Apaches.
>
> How can i kill the old, unused process when i reload the page?
Apache has settings in httpd.conf about how many children to start with, how
many to have max, how long before a child should be killed, etc.
So, up to the number you set, you're *supposed* to get more of them, for as
many concurrent users as your site has.
It does seem odd that you'd get one for every page hit -- It should only
spawn when no children are available to fulfill a request, and you are still
under the maximum you set in httpd.conf...
If the children *are* hanging around, I'd look at your streaming code and
make sure you were cleaning up everything you've created with that... PHP
is supposed to clean up everything you can create, but maybe you've found
something it misses... Pretty unlikely, though. Check http://bugs.php.net
for similar problems too.
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
Richard Lynch wrote:
>
> > Anyway, I have the sendmail path set (/usr/sbin/sendmail -t -i), but
> > something isn't working right.
>
> Do you have quotes around that "/usr/sbin/sendmail -t -i" ? You need quotes
> in php.ini there, or it ignores the -t -i part cuz it's after a space.
I didn't have it in quotes, but I tried it to no avail.
>
> > Jan 30 01:03:52 acadia sendmail[21394]: BAA21394: from=nobody, size=257,
> > class=0, pri=30257, nrcpts=1,
> > msgid=<[EMAIL PROTECTED]>,
> > relay=nobody@localhost
> > Jan 30 01:03:52 acadia sendmail[21397]: BAA21394: SYSERR(nobody): Cannot
> > exec /usr/cyrus/bin/deliver: Permission denied
>
> Is user nobody allowed to send email using sendmail?
> Is the user PHP is running as (maybe "nobody", maybe not -- check httpd.conf
> "User" line) allowed to execute sendmail.
It should be; it looks like the problem is in executing deliver. This
is part of the Cyrus imap server distribution.
I checked the sendmail.cf file, and I found this:
# who I masquerade as (null for no masquerading) (see also $=M)
DM
I vaguely remember reading something about this at
http://www.php.net/mail, from the commentary section:
[EMAIL PROTECTED]
07-Sep-2000 04:30
On my server, sendmail replaced the From: and Reply_To: fields with the
name of my webserver. The solution was to remove the masquarading option
in sendmail.cf (CW macro).
Mauk van der Laan
This doesn't sound like my problem, but could it be the solution? I
know this is getting OT, but . . .
I would probably do better to avoid makeing deliver world executable, so
is there another solution?
Thanks
Lou
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
Louis LeBlanc
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
[EMAIL PROTECTED]
http://acadia.ne.mediaone.net
I have PHP loaded as ISAPI, not CGI. I originally had PHP installed as cgi.
When I have a script that authenticates a user, it never authorizes them. I have set
the permissions in IIS to only allow Anonymous access. The other two options are
disabled. I have tried all the different security option I can think of. The script
works fine on Win98, Xitami, and PHP.
Any ideas?
Shane
On 29 Jan 2001 13:38:20 -0800, kaab kaoutar <[EMAIL PROTECTED]> wrote:
>What's best ? using client script while validating form inputs(javasript or
>vbscript) or using php for validating!
The only acceptable approaches must be server side - otherwise you've just
decided that security and reliability don't matter. If you want to present
friendlier errors, you may also choose to add additional client-side scripting
but beware that many people, myself included, consider multiple Javascript
popups worse than well-designed server-side validation.
----------------------------------------------------------------------------
-----------------
Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
[EMAIL PROTECTED] and delete the email document without making a
copy.
----------------------------------------------------------------------------
-----------------
This should work in your httpd.conf. But i think it relies on you using PHP
as a module.
<LocationMatch "/test/mail.*/attachements">
php_flag engine 0
</LocationMatch>
What works for me with PHP as CGI (which i tend to use across un*x and
windows installs) is to simply AddType with the same extensions that were
set up to run application/x-httpd-php4 should also stop php from working.
So in a .htaccess file you can just
AddType text/plain .php4 .php .inc .htm
Or in httpd.conf put something like
<LocationMatch "/test/mail.*/attachements">
AddType text/plain .php4 .php .inc .htm
</LocationMatch>
That way any directory like
http://myserver.com/test/mail-2001-01/attachements/ wont be parsed by PHP.
Its also makes sure that they are treated as text so the user can see the
code, but it wont run.
If you put this in the httpd.conf users shouldnt be able to modify the file.
mn
Mark Nold
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Senior Consultant
Change is inevitable, except from vending machines.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 6:18 PM
To: Martin Pitt; [EMAIL PROTECTED]
Subject: Re: [PHP] disabling php ability via .htaccess
Addressed to: "Martin Pitt" <[EMAIL PROTECTED]>
[EMAIL PROTECTED]
** Reply to note from "Martin Pitt" <[EMAIL PROTECTED]> Tue, 30 Jan 2001
10:05:41 -0000
>
> Hiya,
>
> Ok this is going to a little weird, however I can assure you there is
> a reason for it.
>
> Basically does anyone how to disabled .php scripts within directories
> by using a .htaccess file.
>
> Basically the whole server (Apache with Linux and PHP 4.0.4) is PHP
> enabled, but we don't want certain users to run .php scripts in
> certain directories until we allow them to, and remove the file.
>
> How can this be done via method stated above, or is there another way
> of going about this.
Look for engine in this document:
http://www.php.net/manual/en/configuration.php
It does work in .htaccess, as long as overrides are allowed in
httpd.conf. Your big problem will be how to keep them from
changing or removing the .htaccess file in a directory they can write
to. Remember, if I can write to a directory, I can rm files from it,
even if I don't own them.
Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com
variables passed from form =
part=68030&quan=500&I=x&part=68040&quan=350&I=x&sid=6754g543a76
I am sending several part numbers from the form, but when parsed it only gives me the
last one
How do I get it to return all of the parts? I'm a PHP newbie, only been programming
for 2 weeks...
<script language="php"
$i=0;
if(!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key,$val)= each($HTTP_POST_VARS)){
$GLOBAL[$key]= $val;
$val=stripslashes($val);
if ($key =="I"){$message=$message. "_________________________\n";} //<---Divide
parts into individual sections
if ($key !="sid" ){if ($key !="I"){$message=$message. "$key = $val\n";}}
//<---Add to message unless key is sid
echo $key " = " $val;
}
</script>
Thanks for any help
On Wed, 31 Jan 2001 01:55, Robert wrote:
> > variables passed from form =
> part=68030&quan=500&I=x&part=68040&quan=350&I=x&sid=6754g543a76 I am
> sending several part numbers from the form, but when parsed it only gives
> me the last one How do I get it to return all of the parts? I'm a PHP
> newbie, only been programming for 2 weeks...
>
> <script language="php"
> $i=0;
> if(!is_array($HTTP_POST_VARS))
> return;
> reset($HTTP_POST_VARS);
> while(list($key,$val)= each($HTTP_POST_VARS)){
> $GLOBAL[$key]= $val;
> $val=stripslashes($val);
> if ($key =="I"){$message=$message. "_________________________\n";}
> //<---Divide parts into individual sections if ($key !="sid" ){if ($key
> !="I"){$message=$message. "$key = $val\n";}} //<---Add to
> message unless key is sid echo $key " = " $val;
> }
> </script>
>
> Thanks for any help
You'll need to treat the part and quan variables as arrays - in the form
the user fills in they would need to be named as form[] and quan[]
Then at the receiving end you could check the number of elements in the
array with count($varname) and proceed according to the result; ie if it's
zero, there is nothing to do/an error has been made; if one, just grab the
value of the variable ; or if >1, cycle through the elements of the
array(s) and do what you need.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
Hi folks,
Is there a way to override a declared function?
For example, if my site is running under a specific theme, I want function
X to work in a slightly different way to normal. The theme will include a
specific functions.<<themename>>.php file, which includes various function
definitions and other cool theme-related stuff.
I'd like to be able to redefine functions in these files. At the moment
if I try it I just get the "already declared function" error.
Any thoughts?
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!
I don't know of a way to override a function. Functions declarations, because
they reside in the global namespace, should be unique.
You can override (and yet still have access to) inherited class methods in
subclasses. Have you looked at applicability of OOP in your implementation?
John
On Wed, 31 Jan 2001, Jason Murray wrote:
> Hi folks,
>
> Is there a way to override a declared function?
>
> For example, if my site is running under a specific theme, I want function
> X to work in a slightly different way to normal. The theme will include a
> specific functions.<<themename>>.php file, which includes various function
> definitions and other cool theme-related stuff.
>
> I'd like to be able to redefine functions in these files. At the moment
> if I try it I just get the "already declared function" error.
>
> Any thoughts?
>
> Jason
>
>
--
John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
408-395-0989
720 University Ave.
Los Gatos CA 95032
www.intacct.com
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
mQGiBDnCZ1oRBACFgkFCV6p3dWic1qm1FLhip5beIyzZSt+ccTDYQQdPZA/t5H+k
PZ7ZFBIUrXz/oEqwQwlEKlg8JQqg7hgtcL+xrIJ0BInLeSJG4lvvB551g59Thr7/
OsdxNVxKci775+K+GkdAz4xcULMuB+QE7t665Ri46EAS8ALos5UG6DGmhwCguD0v
1cxwy/KlKr+oi4sWM9caueED/RmjiSD3vmBZQt6PMisVe1AmkEf6cJoemduCSJxu
0eMz/LIeu+CqfpuJH2N/dZ3hRj9xMSHF4l71wKqV99zhm58kDGwG1u3yVzULPDqz
0yL+8nunlkoOUyn3zOnh3Zmz4POFVMZQ5oian3QkLllUwly5JCi5tWULxZ2vOkb0
zzjuA/4jigNxYV4NAyCl+wAbnyzk9/Iz8EHv4/0Ex8ytlcMtvBJKa9HjJxlyIl74
yOILHk3+GSAdM0b3ZmbavpoCpebinOMBhqEVBwCI4VUIAqf86gx+2dKBGxfKPnU4
Xxvqs/BOl/EbeJjyd4uieYndGRaWg+kYXqZ7SxrlFN24fohnd7QgSm9obiBEb25h
Z2hlciA8am9obkB3ZWJtZXRhLmNvbT6IVgQTEQIAFgUCOcJnWgQLCgQDAxUDAgMW
AgECF4AACgkQIt6tVu6+jd3SHwCgjssFktMXf8NjE9JBR+sJ2gDIsW8An0CFNdFd
dU+DJYC6ogYP9AsVfM27uQENBDnCZ2MQBAD8E0qe1gBKjtoRmyiyORtwhOz/2XZE
mqiZN2NouAUWRRZd4dHggFAA1jUsp2MVIZZQyY9ajNVy3Oaxj5kYz8LR5GItxxcD
jC8RFXKM40ZfTJeR7fH6eJa689w+le71Tt4ALyN4xcjSWuksr8795AhHFjonDi8D
rgGIq6GtWvi/KwADBgQAmeBbcjPzhqR2M8TdvEyNfVTQSSp/RNoTjNNWpHui8V0p
kiQ49tbsqeMjXGToGgMugfmrX77JidXyuVjgYjT9xUdaaA25qKAR75M9izDliT7Y
h5L+QZTAw0/5X9go7XK3WI3LYfFrp4TP0veXgSWxDqccqsRzWKW7IoXsliTCbVqI
RgQYEQIABgUCOcJnYwAKCRAi3q1W7r6N3YIcAKCkJMTPLu6tOPnXPl2s3xmnSawy
BACeOx83WlBhVScYWo+BUzntJ6ks4T0=
=OkJU
-----END PGP PUBLIC KEY BLOCK-----
> You can override (and yet still have access to) inherited
> class methods in subclasses. Have you looked at applicability
> of OOP in your implementation?
Unfortunately, I'm pretty much an old-school programmer, I just
can't wrap my brain around OOP and don't have the time to stop
and learn :\
Interesting idea though ... thanks :)
Jason
I am trying to build a multi-part form and am
using the example from the book Beginning PHP4
by Choi, Kent, Lea, et al. in chapter 8.
Here's what I want to do -
form_page1 - 10 input fields size=3
then onwards to
form_page2 - 5 input fields size=3
then onwards to
form_page3 - 5 input fields size=3
(and about 5 or 6 pages more)
form_page10 has submit button
then the thankyou page with a list of the
items chosen on the previous pages.
These items will be brochures, the text-boxes
are for a quantity. Most people will only want
one but our authorized dealers can order as
many as they need, whence the need for the
size being 3 characters.
In the example in the book they use a drop-
down list, so only one item on the list can be
chosen, this won't work for me.
How do I store all the choices from each subsequent
page and bring them all together on the final page?
Thankyou,
--
Chip Wiegand
Alternative Operating Systems
www.wiegand.org
One way to do this is to include information in hidden form fields that
pass information along from page to page. If this is too unwieldy, you
have session variables or writing information a database or file.
Mick
On Tue, 30 Jan 2001, Chip wrote:
> I am trying to build a multi-part form and am
> using the example from the book Beginning PHP4
> by Choi, Kent, Lea, et al. in chapter 8.
> Here's what I want to do -
> form_page1 - 10 input fields size=3
> then onwards to
> form_page2 - 5 input fields size=3
> then onwards to
> form_page3 - 5 input fields size=3
> (and about 5 or 6 pages more)
> form_page10 has submit button
> then the thankyou page with a list of the
> items chosen on the previous pages.
>
> These items will be brochures, the text-boxes
> are for a quantity. Most people will only want
> one but our authorized dealers can order as
> many as they need, whence the need for the
> size being 3 characters.
>
> In the example in the book they use a drop-
> down list, so only one item on the list can be
> chosen, this won't work for me.
>
> How do I store all the choices from each subsequent
> page and bring them all together on the final page?
>
> Thankyou,
>
> --
> Chip Wiegand
> Alternative Operating Systems
> www.wiegand.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
On Wed, 31 Jan 2001 14:26, Chip wrote:
> I am trying to build a multi-part form and am
> using the example from the book Beginning PHP4
> by Choi, Kent, Lea, et al. in chapter 8.
> Here's what I want to do -
> form_page1 - 10 input fields size=3
> then onwards to
> form_page2 - 5 input fields size=3
> then onwards to
> form_page3 - 5 input fields size=3
> (and about 5 or 6 pages more)
> form_page10 has submit button
> then the thankyou page with a list of the
> items chosen on the previous pages.
>
> These items will be brochures, the text-boxes
> are for a quantity. Most people will only want
> one but our authorized dealers can order as
> many as they need, whence the need for the
> size being 3 characters.
>
> In the example in the book they use a drop-
> down list, so only one item on the list can be
> chosen, this won't work for me.
Drop down lists can be multiple select types - use the keyword MULTIPLE
when defining the SELECT.
>
> How do I store all the choices from each subsequent
> page and bring them all together on the final page?
>
> Thankyou,
Pass them as hidden fields.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
Hia Chip,
If I were you (but I'm not, thankfully for both of us), I would use a
multiple select, and, maybe sessions. I think sessions are better/easier
than hidden fields, but only in php4. Multiple selects are nice. They come
back as an array, which is pretty easy to deal with by using a loop.
Jeff
"Chip" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am trying to build a multi-part form and am
> using the example from the book Beginning PHP4
> by Choi, Kent, Lea, et al. in chapter 8.
> Here's what I want to do -
> form_page1 - 10 input fields size=3
> then onwards to
> form_page2 - 5 input fields size=3
> then onwards to
> form_page3 - 5 input fields size=3
> (and about 5 or 6 pages more)
> form_page10 has submit button
> then the thankyou page with a list of the
> items chosen on the previous pages.
>
> These items will be brochures, the text-boxes
> are for a quantity. Most people will only want
> one but our authorized dealers can order as
> many as they need, whence the need for the
> size being 3 characters.
>
> In the example in the book they use a drop-
> down list, so only one item on the list can be
> chosen, this won't work for me.
>
> How do I store all the choices from each subsequent
> page and bring them all together on the final page?
>
> Thankyou,
>
> --
> Chip Wiegand
> Alternative Operating Systems
> www.wiegand.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Michael Hall wrote:
> , you
> have session variables or writing information a database or
> file.
Hi Michael,
I have set up a couple test pages using session variable like
this:
---------------------------------------
<?
session_start();
?>
<html>
<head>
</head>
<body>
<?
if (isset($radars_form))
{
$products = $radars_form;
session_register( "products" );
print "<p>Your products have been registered</p>";
}
?>
<form method=post>
<select name="radars_form[]" multiple size=6>
<option>RA772
<option>RA40 Series
<option>RA720
<option>RA723
<option>RA725
<option>RA713
<option>Radars General
</select>
<p />
<input type="submit" value="choose">
</form>
<a href="autopilots_form.php">Next page</a>
</body>
</html>
----------------------------------------------
then the second page like this -
----------------------------------------------
<?
session_start();
?>
<html>
<head>
</head>
<body>
<?
if (isset($autopilots_form))
{
$products = $autopilots_form;
session_register( "products" );
print "<p>Your products have been registered</p>";
}
?>
<form method=post>
<select name="autopilots_form[]" multiple size=6>
<option>ap11
<option>ap12/ap14
<option>ap20 series
<option>ap35
<option>ap45
<option>ap9mk3
<option>tiller/wheel pilots
<option>wp5000
</select>
<p />
<input type="submit" value="choose">
</form>
<a href="plotters_form.php">Next page</a>
</body>
</html>
-----------------------------------------------
and the last one like this
-----------------------------------------------
<?
session_start();
print session_encode();
?>
<html>
<head>
</head>
<body>
<?
if ( isset($autopilots_form))
{
print "Your choices:<ol>";
foreach ( $autopilots_form as $p )
print "<li>$p";
}
if ( isset($radars_form))
{
print "Your choices:<ol>";
foreach ( $radars_form as $p )
print "<li>$p";
}
?>
<a href="radars_form.php">back</a>
</body>
</html>
-----------------------------------------
The last won't work right because of the if statements.
How do I get it to print all the results? I tried adding
and between the if statements, but that doesn't work, as
I expected, I don't see anything in my php books that will
help with this bit. I want to be able to pick items from
all pages, and at the end print them to the screen and
email them to a person.
I welcome any help I can get,
Thanks
Chip Wiegand
> Mick
>
> On Tue, 30 Jan 2001, Chip wrote:
>
> > I am trying to build a multi-part form and am
> > using the example from the book Beginning PHP4
> > by Choi, Kent, Lea, et al. in chapter 8.
> > Here's what I want to do -
> > form_page1 - 10 input fields size=3
> > then onwards to
> > form_page2 - 5 input fields size=3
> > then onwards to
> > form_page3 - 5 input fields size=3
> > (and about 5 or 6 pages more)
> > form_page10 has submit button
> > then the thankyou page with a list of the
> > items chosen on the previous pages.
> >
> > These items will be brochures, the text-boxes
> > are for a quantity. Most people will only want
> > one but our authorized dealers can order as
> > many as they need, whence the need for the
> > size being 3 characters.
> >
> > In the example in the book they use a drop-
> > down list, so only one item on the list can be
> > chosen, this won't work for me.
> >
> > How do I store all the choices from each subsequent
> > page and bring them all together on the final page?
> >
> > Thankyou,
> >
> > --
> > Chip Wiegand
> > Alternative Operating Systems
> > www.wiegand.org
Chip:
Sessions aren't my forte, but I can't see where you're registering your
session variables. You need to do more than simply use 'session_start' if
using sessions ...
perhaps you're doing this on another page, but if not you'll need to
register variables using 'session_register'. You'll also need 'session_id'
as far as I know.
The manual at www.php.net should fill you in some more,
and there are a couple of tutes out there as well (www.devshed.com has one
I think).
Mick
On Tue, 30 Jan 2001, Chip wrote:
> Michael Hall wrote:
> > , you
> > have session variables or writing information a database or
> > file.
>
> Hi Michael,
> I have set up a couple test pages using session variable like
> this:
> ---------------------------------------
> <?
> session_start();
> ?>
> <html>
> <head>
> </head>
> <body>
> <?
> if (isset($radars_form))
> {
> $products = $radars_form;
> session_register( "products" );
> print "<p>Your products have been registered</p>";
> }
> ?>
>
> <form method=post>
> <select name="radars_form[]" multiple size=6>
>
> <option>RA772
> <option>RA40 Series
> <option>RA720
> <option>RA723
> <option>RA725
> <option>RA713
> <option>Radars General
>
> </select>
> <p />
> <input type="submit" value="choose">
> </form>
>
> <a href="autopilots_form.php">Next page</a>
> </body>
> </html>
> ----------------------------------------------
> then the second page like this -
> ----------------------------------------------
> <?
> session_start();
> ?>
> <html>
> <head>
> </head>
> <body>
> <?
> if (isset($autopilots_form))
> {
> $products = $autopilots_form;
> session_register( "products" );
> print "<p>Your products have been registered</p>";
> }
> ?>
>
> <form method=post>
> <select name="autopilots_form[]" multiple size=6>
>
> <option>ap11
> <option>ap12/ap14
> <option>ap20 series
> <option>ap35
> <option>ap45
> <option>ap9mk3
> <option>tiller/wheel pilots
> <option>wp5000
>
> </select>
> <p />
> <input type="submit" value="choose">
> </form>
>
> <a href="plotters_form.php">Next page</a>
> </body>
> </html>
> -----------------------------------------------
> and the last one like this
> -----------------------------------------------
> <?
> session_start();
> print session_encode();
> ?>
> <html>
> <head>
> </head>
> <body>
> <?
> if ( isset($autopilots_form))
> {
> print "Your choices:<ol>";
> foreach ( $autopilots_form as $p )
> print "<li>$p";
> }
>
> if ( isset($radars_form))
> {
> print "Your choices:<ol>";
> foreach ( $radars_form as $p )
> print "<li>$p";
> }
> ?>
> <a href="radars_form.php">back</a>
> </body>
> </html>
> -----------------------------------------
> The last won't work right because of the if statements.
> How do I get it to print all the results? I tried adding
> and between the if statements, but that doesn't work, as
> I expected, I don't see anything in my php books that will
> help with this bit. I want to be able to pick items from
> all pages, and at the end print them to the screen and
> email them to a person.
>
> I welcome any help I can get,
>
> Thanks
>
> Chip Wiegand
>
>
>
> > Mick
> >
> > On Tue, 30 Jan 2001, Chip wrote:
> >
> > > I am trying to build a multi-part form and am
> > > using the example from the book Beginning PHP4
> > > by Choi, Kent, Lea, et al. in chapter 8.
> > > Here's what I want to do -
> > > form_page1 - 10 input fields size=3
> > > then onwards to
> > > form_page2 - 5 input fields size=3
> > > then onwards to
> > > form_page3 - 5 input fields size=3
> > > (and about 5 or 6 pages more)
> > > form_page10 has submit button
> > > then the thankyou page with a list of the
> > > items chosen on the previous pages.
> > >
> > > These items will be brochures, the text-boxes
> > > are for a quantity. Most people will only want
> > > one but our authorized dealers can order as
> > > many as they need, whence the need for the
> > > size being 3 characters.
> > >
> > > In the example in the book they use a drop-
> > > down list, so only one item on the list can be
> > > chosen, this won't work for me.
> > >
> > > How do I store all the choices from each subsequent
> > > page and bring them all together on the final page?
> > >
> > > Thankyou,
> > >
> > > --
> > > Chip Wiegand
> > > Alternative Operating Systems
> > > www.wiegand.org
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
I need help loading Oracle libraries.
The environment:
Windows NT 4.0 SP6
IIS4
PHP 4.0.5
I have upgraded from PHP 4. something, in order to add the ability to
access Oracle, and got it working fine with MySql as it did before I
touched it.
I have enabled the osi8.dll extension and on any call to the server I am
getting a message on the server’s screen with the following:
“Unable to load dynamic library 'c:\php\extensions\php_oci8.dll' - The
specified module could not be found”
On the line titled “extension_dir” in php.ini I have tried Back slashes
‘\’ forward slashes ‘/’ with a slash at the end of the line and without,
never the less, the file is right there but it will not load!
If you have any clue, Please help.
Thanks
Shimon Dekel
==============================
Shimon Dekel
Israeli Vegetable Board
Information System Manager
2 Karlibach St Tel-Aviv 67132
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
<http://www.yerek.co.il> www.yerek.co.il
==============================
in php to have a "optional" parameter in a function you can do:
function foo($var='')
{
}
To have it be default to 'bar' you can do:
function foo($var='bar')
{
}
BUT you can't do this:
function foo($var=date("Y-m-d"))
{
}
Why? This would be a kick ass little trick!
--Joe
--
-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o)
http://www.miester.org http://www.care2.com /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
-------------------------------------------------------------------------------
> BUT you can't do this:
>
> function foo($var=date("Y-m-d"))
> {
>
>
> }
But, you can do
function foo($var='defaultvaluethatwillneverhappen')
{
if ($var == 'defaultvaluethatwillneverhappen')
{ $var = date("Y-m-d"); }
}
> Why? This would be a kick ass little trick!
Mmmm, well ... *shrug* <handball.rasmus> :)
Jason
Let me start by saying "Can of Worms!"
At 20:07 30/01/2001 -0800, Joe Stump wrote:
>BUT you can't do this:
>
> function foo($var=date("Y-m-d"))
> {
>
>
> }
>
>Why? This would be a kick ass little trick!
The question is: when do you resolves something like this?
Is it at "compile time" or at "function call" time. That could
get really nasty if the functions had internal counters etc.
Regs
Brian White
-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web: http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]
$today = getdate();
$mon = $today[mon];
$mday = $today[mday];
$year = $today[year];
$text=sprintf("%s-%s-%s", $year, $mon, $mday);
$date=$text;
This code gets me today in the form 0000-00-00
What do I need to do to get yesterday in that form?
Thanks,
Chuck
> $today = getdate();
> $mon = $today[mon];
> $mday = $today[mday];
> $year = $today[year];
> $text=sprintf("%s-%s-%s", $year, $mon, $mday);
> $date=$text;
>
> This code gets me today in the form 0000-00-00
>
> What do I need to do to get yesterday in that form?
$today = Date("U");
$yesterday = $today-(24*3600); // 24 hours. 3600 seconds in an hour
$todayhumanlegible = Date("d m Y", $today);
$yesterdayhumanlegible = Date("d m Y", $yesterday);
Jason
Try checking out this hot link. It has quite a bit on sliding dates:
http://www.php.net/manual/en/function.getdate.php
----- Original Message -----
From: Chuck Barnett <[EMAIL PROTECTED]>
To: PHP General List <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 8:10 PM
Subject: [PHP] today and yesterday (finding them)
> $today = getdate();
> $mon = $today[mon];
> $mday = $today[mday];
> $year = $today[year];
> $text=sprintf("%s-%s-%s", $year, $mon, $mday);
> $date=$text;
>
> This code gets me today in the form 0000-00-00
>
> What do I need to do to get yesterday in that form?
>
> Thanks,
> Chuck
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
pulling it out of my ass, but try:
$today = getdate(time()-(60*60*24))
Gfunk - http://www.gfunk007.com/
I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
----- Original Message -----
From: "Chuck Barnett" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 3:10 PM
Subject: [PHP] today and yesterday (finding them)
> $today = getdate();
> $mon = $today[mon];
> $mday = $today[mday];
> $year = $today[year];
> $text=sprintf("%s-%s-%s", $year, $mon, $mday);
> $date=$text;
>
> This code gets me today in the form 0000-00-00
>
> What do I need to do to get yesterday in that form?
>
> Thanks,
> Chuck
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Isnt it ?
$yesterday = date("Y-m-d",mktime(0,0,0,date("m") ,date("d")-1,date("Y")));
Mohamed~
----- Original Message -----
From: "Chuck Barnett" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 11:10 PM
Subject: [PHP] today and yesterday (finding them)
> $today = getdate();
> $mon = $today[mon];
> $mday = $today[mday];
> $year = $today[year];
> $text=sprintf("%s-%s-%s", $year, $mon, $mday);
> $date=$text;
>
> This code gets me today in the form 0000-00-00
>
> What do I need to do to get yesterday in that form?
>
> Thanks,
> Chuck
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Any comments of Zend Encoder Unlimited product.
http://www.zend.com/store/products/zend-encoder.php
Can we do something like Zend Encoder Unlimited by ourselves? Any idea?
Hi all,
Ive just been asked whether I can do the following task.....
When a block of text is submitted via a web form, for it to be checked for
offensive words, and rejected if there is.
So I put my brain hard to work and came up with a possibly solution. I know
this method should work but im wondering if I should tackle it a different
way.
This is just a rough, typed-off-the-top-of-my-head to show the method
rather than correct code.
The idea was to have a list of offensive words or phrases in a MySQL
database, and the script would take the block of text, and do the following
$query="select naughty_words from prude_list";
$result=mysql_query($query);
while ($loop=mysql_fetch_array($result)) {
$naughty_word_checker = stristr("$block_of_text","$loop[naughty_words]");
if ($naughty_word_checker) {
header("Location: error.php?reason=prudes_wont_like_it");
} else {
header("Location: insert_stuff.php?comment=$block_of_text");
}
}
or is there a better, more efficient way of doing it. Im pretty sure the
concept of above will work because if there is a match, stristr() should
return text, otherwise it shouldnt return anything (or if im wrong, a
little fine tuning will sort that out).
Thanks
Chris
Will work well, I think ... plus this is on submission which makes a little
discount on load times. And it is quite expandable function.
Cheers,
Maxim Maletsky
-----Original Message-----
From: Chris Aitken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 2:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Naughty Word Catcher
Hi all,
Ive just been asked whether I can do the following task.....
When a block of text is submitted via a web form, for it to be checked for
offensive words, and rejected if there is.
So I put my brain hard to work and came up with a possibly solution. I know
this method should work but im wondering if I should tackle it a different
way.
This is just a rough, typed-off-the-top-of-my-head to show the method
rather than correct code.
The idea was to have a list of offensive words or phrases in a MySQL
database, and the script would take the block of text, and do the following
$query="select naughty_words from prude_list";
$result=mysql_query($query);
while ($loop=mysql_fetch_array($result)) {
$naughty_word_checker =
stristr("$block_of_text","$loop[naughty_words]");
if ($naughty_word_checker) {
header("Location: error.php?reason=prudes_wont_like_it");
} else {
header("Location: insert_stuff.php?comment=$block_of_text");
}
}
or is there a better, more efficient way of doing it. Im pretty sure the
concept of above will work because if there is a match, stristr() should
return text, otherwise it shouldnt return anything (or if im wrong, a
little fine tuning will sort that out).
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]
Actually your function does header() on each loop ...
This is correct ..
<snip>
$query="select naughty_words from prude_list";
$result=mysql_query($query);
while ($loop=mysql_fetch_array($result)) {
if(stristr("$block_of_text","$loop[naughty_words]")) {
$Gotcha = 1;
Break;
}
if(!$Gotcha)
header("Location: error.php?reason=prudes_wont_like_it");
else
header("Location: insert_stuff.php?comment=$block_of_text");
</snip>
Cheers,
Maxim Maletsky
-----Original Message-----
From: Chris Aitken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 2:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Naughty Word Catcher
Hi all,
Ive just been asked whether I can do the following task.....
When a block of text is submitted via a web form, for it to be checked for
offensive words, and rejected if there is.
So I put my brain hard to work and came up with a possibly solution. I know
this method should work but im wondering if I should tackle it a different
way.
This is just a rough, typed-off-the-top-of-my-head to show the method
rather than correct code.
The idea was to have a list of offensive words or phrases in a MySQL
database, and the script would take the block of text, and do the following
$query="select naughty_words from prude_list";
$result=mysql_query($query);
while ($loop=mysql_fetch_array($result)) {
$naughty_word_checker =
stristr("$block_of_text","$loop[naughty_words]");
if ($naughty_word_checker) {
header("Location: error.php?reason=prudes_wont_like_it");
} else {
header("Location: insert_stuff.php?comment=$block_of_text");
}
}
or is there a better, more efficient way of doing it. Im pretty sure the
concept of above will work because if there is a match, stristr() should
return text, otherwise it shouldnt return anything (or if im wrong, a
little fine tuning will sort that out).
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]
Alright ... the last review ('cause I never like what I write ... )
here:
function naughty_words($text) {
$query="select naughty_words from prude_list";
$result=mysql_query($query);
while ($loop=mysql_fetch_array($result)) {
if(stristr("$text","$loop[naughty_words]")) {
return true;
}
}
}
if(!nasty_words($text))
header("Location: error.php?reason=prudes_wont_like_it");
else
header("Location: insert_stuff.php?comment=$text");
Cheers,
Maxim Maletsky
-----Original Message-----
From: Maxim Maletsky
Sent: Wednesday, January 31, 2001 3:52 PM
To: 'Chris Aitken'; [EMAIL PROTECTED]
Subject: RE: [PHP] Naughty Word Catcher
Actually your function does header() on each loop ...
This is correct ..
<snip>
$query="select naughty_words from prude_list";
$result=mysql_query($query);
while ($loop=mysql_fetch_array($result)) {
if(stristr("$block_of_text","$loop[naughty_words]")) {
$Gotcha = 1;
Break;
}
if(!$Gotcha)
header("Location: error.php?reason=prudes_wont_like_it");
else
header("Location: insert_stuff.php?comment=$block_of_text");
</snip>
Cheers,
Maxim Maletsky
-----Original Message-----
From: Chris Aitken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 2:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Naughty Word Catcher
Hi all,
Ive just been asked whether I can do the following task.....
When a block of text is submitted via a web form, for it to be checked for
offensive words, and rejected if there is.
So I put my brain hard to work and came up with a possibly solution. I know
this method should work but im wondering if I should tackle it a different
way.
This is just a rough, typed-off-the-top-of-my-head to show the method
rather than correct code.
The idea was to have a list of offensive words or phrases in a MySQL
database, and the script would take the block of text, and do the following
$query="select naughty_words from prude_list";
$result=mysql_query($query);
while ($loop=mysql_fetch_array($result)) {
$naughty_word_checker =
stristr("$block_of_text","$loop[naughty_words]");
if ($naughty_word_checker) {
header("Location: error.php?reason=prudes_wont_like_it");
} else {
header("Location: insert_stuff.php?comment=$block_of_text");
}
}
or is there a better, more efficient way of doing it. Im pretty sure the
concept of above will work because if there is a match, stristr() should
return text, otherwise it shouldnt return anything (or if im wrong, a
little fine tuning will sort that out).
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]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
> -----Original Message-----
> From: Maxim Maletsky [mailto:[EMAIL PROTECTED]]
> Sent: 31 January 2001 06:58
> To: Maxim Maletsky; 'Chris Aitken'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Naughty Word Catcher
>
>
> header("Location: insert_stuff.php?comment=$text");
... so having seen where they get redirected to one time, they can
probably work out to construct an URL and enter profanities things into
your database...
Might be worth doing the actual INSERT from that part of the profanity
checking script.
Regards,
Ollie
HI!
I am using PHP in mySQL. I create table in database and insert
'binary'(*.gif).
But I do not know how to use this binary using PHP and show website. Please
help me.
$)create table xxx (col longlob);
$)insert into xxx values("image\yyy.gif");
I want to display :yyy.gif in html
Thank you
yui
Why on the earth would you do that?
It always happens to me associate images with my databases but I never
actually insert them in. I just *copy* these graphics to somewhere on my
server (or often even on in a webroot) and give them a logic name.
So then when you need to call a graphic you do ( in case the images are in
the webroot ):
<?
$img_dir = '/images';
$img_path = $img_dir.$id_from_db . '.gif';
if(file_exests($DOCUMENT_ROOT.$img_path))
echo '<IMG SRC="' . $img_path . '">';
?>
then here you can eve find out what are they look like ... GetImageSize()
etc ...
Hope this is something that helps.
Cheers,
Maxim Maletsky
-----Original Message-----
From: Yui Hiroaki [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 2:12 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] question ! show binary
HI!
I am using PHP in mySQL. I create table in database and insert
'binary'(*.gif).
But I do not know how to use this binary using PHP and show website. Please
help me.
$)create table xxx (col longlob);
$)insert into xxx values("image\yyy.gif");
I want to display :yyy.gif in html
Thank you
yui
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
I am playing with PHP as a shell scripting tool and trying to use it for
CGI programming that way. This may seem kinda pointless, seeing that PHP
is _way_ more efficient when being used as an Apache module. However I
need to pass stuff from a database query to another CGI program which
is designed to take ouput from a shell command as input (I can also use
GET to directly pass arguments to this program, but that doesn't work
for larger amounts of data). The problem is this: Running a PHP script
from a shell, as in
#!/usr/local/bin/php -q
<?
$conn = pg_connect("dbname=mpi");
$result = pg_exec($conn, "SELECT id FROM index ORDER BY id;");
$rows = pg_numrows($result);
for ($i=0; $i<$rows; $i++) {
// spit out rows etc . . . .
}
?>
works fine. When I try to call the PHP script from the CGI program, I'll
always get:
X-Powered-By: PHP/4.0.3pl1
Content-type: text/html
No input specified.
The very same happens when I exec the PHP script from a BASH script
which normally generates correct CGI output (I am using the test-cgi
script that comes with Apache).
Just trying to run a very simple PHP script as a CGI program like
#!/usr/local/bin/php
echo "bla"
will _also_ produce the above "No input specified." message.
The http header will appear in spite of the -q parameter when exec'ing
the script from within another CGI program. When runnign the PHP script
"standalone" it will only produce "No input specified.", with or without
-q. I'm stumped. What input is PHP expecting? It behaves like any
scripting language on the command line but does weird things when http
is involved it seems.
Can anyone enlighten me?
Cheers Frank
--
frank joerdens
archi|me|des
urbanstr. 116
10967 berlin
germany
e: [EMAIL PROTECTED]
t: +49 (0)30 69597650
f: +49 (0)30 7864046
h: http://www.archi-me-des.de
pgp key: http://www.joerdens.de/pgp/frank_joerdens.asc
Hi all. I was wondering, can a reference be a function as well? Reason is, I've got to
do a little manipulating. I want to do a
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
where I want \\1 to be fed into urlencode() I was thinking somewhere along the lines
$func=&urlencode;
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"$func(\\1)\"",$this->dataToBeParsed);
Cheers
Niklas Saers
Hello Niklas,
Wednesday, January 31, 2001, 7:02:49 PM, you wrote:
NS>
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
NS> where I want \\1 to be fed into urlencode() I was thinking somewhere along the
lines
NS> $func=&urlencode;
It won't work. You can not reference a function. But you can call a
variable with the function name value.
$func = 'urlencode'
$func($str) here will do the same as urlencode($str).
--
Best regards,
Max A. Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
At 11:35 31-1-01 +0300, Max A. Derkachev wrote:
>Hello Niklas,
>
>Wednesday, January 31, 2001, 7:02:49 PM, you wrote:
>NS>
>$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
Take a look @ Preg_Replace with the e modifier, i think you are looking for
that (php4 only)
Greetz,
Wico
>NS> where I want \\1 to be fed into urlencode() I was thinking somewhere
>along the lines
>
>NS> $func=&urlencode;
>
>It won't work. You can not reference a function. But you can call a
>variable with the function name value.
>$func = 'urlencode'
>$func($str) here will do the same as urlencode($str).
>
>--
>Best regards,
>Max A. Derkachev mailto:[EMAIL PROTECTED]
>Symbol-Plus Publishing Ltd.
>phone: +7 (812) 324-53-53
>http://www.Books.Ru -- All Books of Russia
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
hi i am a newbie
and i was wondering how can i check the link if it exists
i tried file_exists but it is not laways right
thanks in advance
What do you mean by 'Not always right' ?
If it wouldn't be right your server would be crashing every 0.0000001
seconds ... anyway ...
If this is locally, and all you need to know is if there a page called
foo.html on the same server from where you are trying to check you can then
use file_exists()
if(file_exists($DOCUMENT_ROOT.$file))
echo 'Sure, it is there ...';
otherwise (if it is a remote server) try fopen() or fsockopen() ...
ie
$url = "www.altavista.com";
$port = "80";
$timeout_in = "30"; #seconds
$fp = fsockopen ($url, $port, $timeout_in);
if($fp)
echo "Site Accessed!";
yeah .. look here: www.php.net/fsocopen they have an example of use which
you could modify to make it a link checker.
Cheers,
Maxim Maletsky
-----Original Message-----
From: Huseyin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 3:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Link Validator
hi i am a newbie
and i was wondering how can i check the link if it exists
i tried file_exists but it is not laways right
thanks in advance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
hi all,
does mysql support this?
select * from tablename where id in (select id from table2 where cond)
thanks
Hi,
I am running PHP 4.0.4pl1 on a windows box as a CGI.
Why can't I access files on the network via a windows share?
ie
\\nt4server\wwwroot\thisfile.phtml
It used to work on other systems I have used PHP on.
It seems that PHP now only accepts files references like this.
d:\wwwroot\thisfile.phtml
I have used escape characters when referencing the directories too.
$filename = "\\\\nt4server\\wwwroot\\thisfile.phtml"
It still doesn't work.
Is there something on my NT box that I need to set up?
Thanks
****************************************************************
Cameron Just ([EMAIL PROTECTED])
Phoenix Digital Development
****************************************************************
Hello,
I'm trying to build the first page to a database driven website. The first
thing I'm trying to do is detect if cookies are enabled on the users
browser, and then, via a header(location: mysite.php), redirect the user to
either a cookie supported page, or cookie unsupported page. I will use
sessions, in some form or another on each.
My concern is that this first page, or any following page, not be cached.
In the #php channel, it was said, or I understood from what was said, that
by default, php pages aren't cached. It was also mentioned that I should
make each url unique by using time() or uid of some kind. In the php
manual, under Header(), it listed four ways to disable caching. they are:
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
modified
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
Should I be concerned about page caching? If so, should I use one of the
header() statements, a combination of header() statements? Can I use a
combination of header() statements? The first page can't have a unique
url. The following one would be unique by use of sessions I would think,
but that may not keep them from being cached, would it?
Any direction would be of great help to me.
Thanks
Hi, my name is Victor from Namibia, I do web development with PHP, I
hapenned to find your email address on one of the PHP sites on the Net,
as one of the contributors on the PHP notes.
Can you please, if it is possible, tell me how to write in a form field
with PHP script. Like in Javascript, if one has a form named members and
a text field called memberid, one can write in the memberid field as
follows:
<script language =javascript>
member.memberid.value='M100';
</script>
I will appreciate your help very much.
Thanking you in advance.
Vict
e.g.
<input type=password name=memberid !!NOW!! value=<?php echo "whatever"; ?> >
Johannes
"Victor Hamutenya" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi, my name is Victor from Namibia, I do web development with PHP, I
> hapenned to find your email address on one of the PHP sites on the Net,
> as one of the contributors on the PHP notes.
>
> Can you please, if it is possible, tell me how to write in a form field
> with PHP script. Like in Javascript, if one has a form named members and
> a text field called memberid, one can write in the memberid field as
> follows:
> <script language =javascript>
> member.memberid.value='M100';
> </script>
>
> I will appreciate your help very much.
>
> Thanking you in advance.
>
> Vict
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
testing
I've been struggling with perl, till someone said why not give PHP a shot.
Where do I start?
Aside from manuals, are there any online courses/tutorials which will get me going?
TIA
Patrick L.
www.choozart.com
I am also new to PHP. I think www.wdvl.com has good resources.
NOBBY
----- Original Message -----
From: Patrick L. <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 2:55 PM
Subject: [PHP] Want to learn PHP
> I've been struggling with perl, till someone said why not give PHP a
shot.
>
> Where do I start?
>
> Aside from manuals, are there any online courses/tutorials which will get
me going?
>
>
> TIA
>
> Patrick L.
>
> www.choozart.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]
There are quite a few tutorials at www.devshed.com/Server_Side/PHP.
Also some at www.webmonkey.com/programming/php/index.html.
PHP is definitely quicker and easier to learn than Perl, and provided you
want to do web programming it will do just about everything Perl can do.
Mick
On Wed, 31 Jan 2001, Patrick L. wrote:
> I've been struggling with perl, till someone said why not give PHP a shot.
>
> Where do I start?
>
> Aside from manuals, are there any online courses/tutorials which will get me going?
>
>
> TIA
>
> Patrick L.
>
> www.choozart.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]
>
>
http://www.weberdev.com
> -----Original Message-----
> From: Michael Hall [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 10:08 AM
> To: Patrick L.
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Want to learn PHP
>
>
>
> There are quite a few tutorials at www.devshed.com/Server_Side/PHP.
> Also some at www.webmonkey.com/programming/php/index.html.
>
> PHP is definitely quicker and easier to learn than Perl, and
> provided you
> want to do web programming it will do just about everything
> Perl can do.
>
> Mick
>
> On Wed, 31 Jan 2001, Patrick L. wrote:
>
> > I've been struggling with perl, till someone said why not
> give PHP a shot.
> >
> > Where do I start?
> >
> > Aside from manuals, are there any online courses/tutorials
> which will get me going?
> >
> >
> > TIA
> >
> > Patrick L.
> >
> > www.choozart.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]
>
Using PHP Version 3.0.18, Apache Version: Apache/1.3.14
on a Linux RH6.2.
when i try to do mathematic function
eg 4,5*4,5 sometimes iget the result 16 and sometimes
the result 20,25.
After restarting apache it works for lets say 2-3 hours.
Then it comes again.
Does anybody had same or similar proplems?
thanks
}Dan
Hi
Lets say $foo=20.12345
In php4 you can use : $foo=$round($foo,2); to get $foo=20.12
What can I use in php3 to get the same result. $foo=$round($foo); gives
me $foo=20 Not what I realy want???
Thanks
Ajdin
Oh,
number_format (float number, int decimals, string dec_point, string
thousands_sep)
Sorry
Ajdin
On Wed, 31 Jan 2001, AJDIN BRANDIC wrote:
> Hi
>
> Lets say $foo=20.12345
>
> In php4 you can use : $foo=$round($foo,2); to get $foo=20.12
>
> What can I use in php3 to get the same result. $foo=$round($foo); gives
> me $foo=20 Not what I realy want???
>
> Thanks
>
> Ajdin
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
Is it possible to find out if a client finished to DL a file?
Suppose i put a link to a file and people start to DL the file.
Some people can stop the DL in the middle. I need to know
how many people completed the DL.
Any simple ideas how to do this?
thanks
berber
Hi, list,
I've been using the funcion INCLUDE like this:
<?include"("/header.htm");?> because file header.htm has to be included
in a lot of files. I want to use "/" because file header.htm is in main
directory (like E:) and there are files in very directories above E:.
But when I have a file in a directory above, like E:folder1/index.html
and I use the include function in the file index.html, there's next
error massage: Warning: Failed opening '/header.htm' for inclusion
(include_path='') in /home2/httpd/htdocs/www/index.html on line 21 .
Line 21 is the line I had put include function.
We don't want to use <?include("../header");?> because we have files in
other directories, and like that, we had to use
<?include("../header");?> in one file, <?include("../../header");?> in
another one, etc.What can we do?
--
================
Éder Henrique Vieira Ribeiro
Estagiário/Informática
Embrapa Agropecuária Oeste
Dourados - MS
================
I am using PHP on site using frames. I need to uppdate a frame called
basket_right everytime I run a file called cart_add.php (which contains no
HTML code) from the frame called menu_and_main
I tried using the header("Location: ") command, but don't know how to adress
the basket_right frame. Is this the right command to use?
Does anyone have suggestions?
Thanks in advance.
/Rickard
I include my frameset if this could be of any help:
I have replaced some information with *** and ... for easier wieving.
<FRAMESET ROWS="60,*,53" border="0" frameborder="0" framespacing="0">
<FRAME SRC="***" name="***" ... >
<FRAME SRC="shopping/shell/fs_mm.asp" name="menu_and_main" ...>
<FRAMESET COLS="168,*" ...>
<FRAME SRC="***" name="***" ...>
<FRAMESET COLS="391,*,0" ...>
<FRAMESET ROWS="21,*" ...>
<FRAME SRC="***" name="***" ...>
<FRAME SRC="***" name="***" ...>
</FRAMESET>
<FRAME SRC="shopping/shell/basket_right.php" name="basket_right" ...>
<FRAME SRC="***" name="***" ...>
</FRAMESET>
</FRAMESET>
In the begin of my site, I have the following code:
<?
$buffer = str_replace("%99", $total, $buffer);
?>
And somewhere on <html> tag I write %99.
I pretend to replace the %99 with $total. Why it doesn't work? When I
publish my site appears the %99 on screen, and not the $total.
thanks,
Augusto Cesar Castoldi
Hi all. I was wondering, can a reference be a function as well? Reason is, I've got to
do a little manipulating. I want to do a
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"\\1\"",$this->dataToBeParsed);
where I want \\1 to be fed into urlencode() I was thinking somewhere along the lines
$func=&urlencode;
$tmpParsing=eregi_replace("href=(\")([^*]*)(\")","href=\"$func(\\1)\"",$this->dataToBeParsed);
Cheers
Niklas Saers
Hi!
Is it posiible to check that an email exists before confirming a form
under windows NT ?
Thanks
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Return-Path: <[EMAIL PROTECTED]>
Received: (qmail 25765 invoked from network); 31 Jan 2001 12:10:05 -0000
Received: from f96.law10.hotmail.com (HELO hotmail.com) (64.4.15.96)
by mail.csoft.net with SMTP; 31 Jan 2001 12:10:05 -0000
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Wed, 31 Jan 2001 04:09:58 -0800
Received: from 212.217.5.93 by lw10fd.law10.hotmail.msn.com with HTTP; Wed,
31 Jan 2001 12:09:57 GMT
X-Originating-IP: [212.217.5.93]
From: "kaab kaoutar" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: code to check email exists? under Windows NT
Date: Wed, 31 Jan 2001 12:09:57 -0000
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Message-ID: <[EMAIL PROTECTED]>
X-OriginalArrivalTime: 31 Jan 2001 12:09:58.0103 (UTC)
FILETIME=[BAB66670:01C08B7E]
Hi!
Is it posiible to check that an email exists before confirming a form
under windows NT ?
Thanks
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.