Derick Rethans http://derickrethans.nl/
PHP Magazine - PHP Magazine for Professionals http://php-mag.net/
-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
+-
llation is set up to not echo PHP errormessages back
to the screen, that's why you didn't see an error message.
-steve
++
| Steve Edberg [EMAIL PROTECTED] |
| Databa
of obscure ID instead of the data. I
would check out the use of sessions here:
http://www.php.net/manual/en/ref.session.php
-steve
--
++
| Steve Edberg [EMAIL PROTECTED] |
| University
2&unit=BX
> > &short_desc=ENVELOPE,25%COT 24#,IY&wholesaler=US&cost=18.690
>
> gets cut off at the # sign, so $wholesaler and $cost come out empty.
>
> Any suggestions to get around this?
You could use urlencode() and urldecode().
http://www.php.net/manual/en/functio
o count the number of words in a string?
Untested, but this should work.
$string = "Is there a way to count the number of words in a string?"
$numOfWords = count( explode( " ", $string ));
Chris
--
+--------+
s[1]);
echo $count . ' addresses found:';
for($x=0;$x<$count;$x++)
{
$city = trim($matches[1][$x]);
$state = trim($matches[2][$x]);
$zip = trim($matches[3][$x]);
echo "City: $city, State: $state, ZIP: $zip";
}
?>
---John Holmes...
i think it will help
Friendship is always a sweet responsibility, never an opportunity.
HaSeEb IqBaL.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
+----+
t; } while ();
> if() {} //(4x)
>}
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
--
++
| Steve Edberg
e error message. With
>register_globals ON, it works fine.
>
>I thought register_globals only affected session, cookie and get type
>variables? Why is PHP ignoring the variables passed via the URL?
'variables passed via the URL' = 'GET variables'
sponse from the host.
>I do it by fopen each url one by one and save the response to a separated
>file. But it slow!
>I wonder if i can open 10 connnect (or more) in parallel?
>
>Thanks in advance.
>NoWhErEMaN
>
--
+-
though the set, or (if you
have version >= 4.0.5) you can use array_reduce() in conjunction with the
count() function.
If these values are coming from a database, most databases have aggregate
functions to do sums, averages, etc.
-steve
+-
.external.php
-steve
>Jeff
>UWG Student
>[EMAIL PROTECTED]
+--------+
| Steve Edberg [EMAIL PROTECTED] |
| Database/Programming/SysAdmin(530)754-9127 |
| Unive
eplace.php
http://www.php.net/manual/en/pcre.pattern.syntax.php
http://www.php.net/manual/en/pcre.pattern.modifiers.php
-steve
++
| Steve Edberg [EMAIL PROTECTED] |
|
creating,editing and deleting virtual hosts using
>PHP via a website?? I have already thought of a way but seems a little long
>winded.
>
>Thanks in advance.
--
+--------+
| Steve Edberg
che
>log file.
>
>This is the entire program:
>http://www.cekkent.net/upload/mp3anal/mp3anal.phps
>
--
++
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis
ilename is
something like this:
drwxrwxrwx 1 ownergroup 0 Nov 5 23:19 6 fantasy
Notice in this case the filename is "6 fantasy" however $regs[1] returns
only: "fantasy"
Can anyone help me to fix this problem.
Thanks a bunch
--
+---
COUNT portion of the array? I know the company_name would be
$row['company_name'] and agent_name is $row['agent_name'];
Thanks,
Ed Curtis
--
+----+
| Steve Edberg [EMAIL
there was no change in
the numbers. I've never seen anything like this...perhaps I need more
coffee?
Versions:
Apache 1.3.26/php 4.1.2, using mysql client API 3.23.47
MySQL 3.23.47-log
Platform: SunOS 5.8 sun4u sparc SUNW,Sun-Fire-280R
Thanks in advance,
steve
--
+---
Boy do I REALLY need some coffee...one query was on the production
database, the other was on the development copy. I suppose I should
set the programmer_first_check_database_parameter_you_idiot setting
in php.ini...
Sorry for consuming unnecessary list space.
-steve
I have a query oddit
rough the credits
http://www.php.net/credits.php
and count how many times his name appears. In short, PHP sprang from his
brain. Now, it springs from many brains.
-steve
+--------+
| Steve Edberg
ql-fetch-array.php
-steve
>I'm hoping someone will spot my dumb mistake. Thanks very much for any help
>at all on this.
>
>Brad
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
--
+---
rses($session[id]))
{
print "", $Row['C.CourseName'];
}
-steve
--
+----+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis
feature,
and retrieve only the associated indexes (the behavior you normally
want), you can use
mysql_fetch_array($result, MYSQL_ASSOC);
Incidentally, I just learned something here myself; there's a
relatively new (>= version 4.0.3) function mysql_fetch_assoc() wh
thing.
-steve
--
+----+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis (530)754-9127 |
| Programming/Database/SysAdmin http://pgfs
) and convert it to HEX values?
>
>Thanx...
>
--
+--------+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis (530)754-9127 |
| Programming/Database
an't find the php-gd.so on my computer.
>> >
>> > Anybody can help?
>>
>> Looks like the problem is that you haven't installed GD.
>>
> > Dave
>
--
++
| Steve Edber
do it this way anymore.
-steve
>
>?? Thanks,
>
>
>Henning Sittler
>www.inscriber.com
>
--
++
| Steve Edberg [EMAIL PROTECTED] |
| University of California, D
random characters?
Thank You,
Jason Williard
+----+
| Steve Edberg [EMAIL PROTECTED] |
| Database/Programming/SysAdmin(530)754-9127 |
| University o
h that.
Any help is appreciated,
Carlton.
--
+----+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis (530)754-9127 |
| Programming/Database/SysAdmin
d myIncluded.php from the browser. You may have to pay
close attention to the paths of the files, but it is pretty simple
really.
HTH!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
+------
require.php
-steve
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Computer Consultant |
| http://aesric.ucdavis.edu/
g new today :)
My production systems are still PHP3; PHP4.0.4 is still on my test system.
- steve
>-Original Message-
>From: Maxim Maletsky
>Sent: Thursday, January 11, 2001 2:26 PM
>To: 'Steve Edberg'; Jon Rosenberg; PHP List .
>Subject: RE: [PHP] case ?
>
>
http://www.w3.org/Protocols/
-steve
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Computer Consulta
tml pages
through php (as opposed to just statically serving the html pages).
This person had set his server to php-parse the .html extension.
- steve
>--
>Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
>
+--- "They've got a cherry pie there, that'll kill y
http://www.php.net/str_replace
http://www.php.net/preg_replace
-steve
(The usual off-the-top-of-my-head-untested-code-snippet caveats apply)
+--------+
| Steve Edberg University of California,
$Number = (float)$SanitizedNumber;
although in most cases PHP handles type conversion correctly on-the-fly.
- steve
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of California, Davis |
|
oIt($Answer) {
echo "Noodles are happy? $Answer";
}
}
It's been awhile, but I believe that should work. If not, give us more info:
What version of PHP?
What, exactly, DID you try?
- steve
--
+--- "They've got a cherry pie there, that'll kill y
gt; Does PHP works with Netscape Web Server or IPlanet???
>> If it does.HOW
>>
>> [EMAIL PROTECTED]
>> Thanks
--
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of
you don't need the functionality of regexps, explode()
is faster.
-steve
--
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED]
but I want to move it to my server at work. Does
>anyone know of a script of some sort that will go to my site, copy all the
>files to a specified folder, and follow my internal links? Thanks for the
>info.
>
--
+--- "They've got a cherry pie there, that'll ki
the value of a textarea tag is not put in a 'value' attribute
within the tag as with the INPUT tag; it is put in the textarea
'container' - that is, between the and tags.
- steve
--
+--- "They've got a cherry pie there, that'll kill ya&q
h any existing data
(from HTTP_POST_VARS, etc.) filled in and error messages, if any,
displayed. Basically, the FORM tag action attribute refers to the
same program as displayed the form - that is, $PHP_SELF.
Hope this is clear...I getting tired, and I don't even think an
intr
ich free php editor is more suitible
>> for me ? and also what links to get free more tutorials, i got one of
>phpnet
>> but still
>>
>> Regards
>> _
> > Get Your Private, Free
can I do this?
>>
>> $php_code = "echo 'hello';"
>>
>> I would like to evaluate the code to "hello" in another string...
>>
>>
> > --
--
+--- "They've got a cherry pie there, that&
ey've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Computer Consultant |
| http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ |
+-
ogin, $DB_Password");
>>mysql_select_db("$DB_Name",$db);
>> $results = mysql_query("SELECT * FROM language ORDER BY language
>> ",$db);
>>
>>while ($row = mysql_fetch_array($results)){
>>$rowid = $row["
mbling.
And showing my age...
- steve
Usual untested, off-top-of-head, no-warranty code caveats apply.
--
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of California, Davis |
| [EMAIL PR
#x27;wednesday'),
array('a'=>'apple', 'b'=>'banana', 'c'=>'carrot')
)
or
$foo[0] = array('bean', 'noodle', 'wednesday');
allowed?
>
>$test = new Simple();
>echo $test->a;
>
>
Yep.
You can also _set_ $a this way:
$test = new simple;
$test->a = 77;
echo $test->first();
will display 77.
See
http://www.php.net/manual/en/language.oop.php
for more info.
r
>WebIntellects Design/Development Manager
>[EMAIL PROTECTED]
>800-994-6364
>www.webintellects.com
>--------
--
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of Californ
gt;
>The resule is that it always displays NA whether or not it has vaule
>in the field, what is the correct way of using isset for this
>purpose? Or should I use empty() ?
>Jack
>[EMAIL PROTECTED]
>"There is nothing more rewarding than reaching the goal you set for
e:
http://www.php.net/manual/en/control-structures.while.php
for more info.
-steve
>Felipe Lopes
>MailBR - O e-mail do Brasil -- http://www.mailbr.com.br
>Faça já o seu. É gratuito!!!
--
+--- "They've got a cherry pie there, that'll kill ya" ---
Table() function, use
$this->attributes[] = array("border", "0");
$this->attributes[] = array("cellpadding", "0");
otherwise, PHP thinks $attributes is a variable local to that
function, rather that a class variable.
-steve
&g
on't
use this, though, so I'm just copying from the provided .ini file.
-steve
--
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED]
http://www.php.net/manual/en/function.print-r.php
-steve
--
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Compute
ng mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01
++
| Steve Edberg
use a
library like PHPLIB (phplib.netuse.de).
-steve
>Jack
>[EMAIL PROTECTED]
>"There is nothing more rewarding than reaching the goal you set for yourself"
--
+--- "They've got a cherry pie there, that'll kill ya" --+
| Steve Edber
##
># Rick St Jean,
># [EMAIL PROTECTED]
># President of Design Shark,
># http://www.designshark.com/
># Quick Contact: http://www.designshark.com/messaging.ihtml
># Tel: 905-684-2952
>#
tried things like
split('[^[:alnum:]]*'.$word.'[^[:alnum:]]*', " $phrase ")
...didn't work.
-steve
--
+--- 12 April 2001: Forty years of manned spaceflight ---+
| Steve Edberg University of California, Davis |
:]]*'.$word.'[^[:alnum:]]*', " $phrase ")
...didn't work.
-steve
--
+--- 12 April 2001: Forty years of manned spaceflight ---+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED]
[$i] >= $threshold) {
$WordList[] = $Temp[$i];
} else {
break; # all subsequent words will be below the threshold
}
Again, this is all untested code.
-steve
At 3:43 PM -0700 4/14/01, Steve Edberg wrote:
>OK, this is less elegant (to me, an
de:
> >
> > if($login) { echo "blab"; } or
> > if(isset($login)) { echo "blab"; }
> >
> > It always returns FALSE. I think that is because the string
> > is empty. Shouldn't PHP, even if a var is empty, put it in
> > his var-list?
> &g
gt;> error message.)
>>>
>>> Marcus R.
>>
>>Try testing the value of mysql_errno() and echo mysql_error accordingly.
>>
>>--
>>David Robley| WEBMASTER & Mail List Admin
>>RESEARCH CENTRE FOR INJURY
an out of
>time
> > on that line. BTW '}' is the closing of an if statement so it isnt stuck
>in
> > a loop. And when I go to the page I make sure to use the same querystring
> > that the user sent.
> > >
> > > Another thought, is the php engine
e syntax read??
>>
>> Thnx,
>>
>> sands
>>
>
>Check out explode()
>www.php.net/manual/en/function.explode.php
>
>- --
>
>Nick Wilson
>
>Tel: +45 3325 0688
>Fax: +45 3325 0677
>Web: www.explodingnet.com
>
--
+---
more
>than halfway down).
>
>
>Erik
>
>>
>>>Actually, using the [] syntax is deprecated - using {} is the new way
>>>- but I'm a creature of habit...
>>>
>
>
--
+
a5$fa7d60e0$0401a8c0@philip">news:003d01c1a6a5$fa7d60e0$0401a8c0@philip...
>Any Ideas how I can remove !@#$%^&*()_+=-';:"/.,<>? charactors from a
>string?
>
>Philip J. Newman
>Philip's Domain - Internet Project.
>http://www.philips
am looking for service that is free, if possible, since this project is not
>for commercial at all (academic purposes).
>
>Any information on this will be greatly appreciated.
>
>Thanks.
>Reuben D. Budiardja
>
--
+-------
range.
>
>Thanks
+--------+
| Steve Edberg [EMAIL PROTECTED] |
| Database/Programming/SysAdmin(530)754-9127 |
| University of California, Davis http://pgfsun.ucdavis.edu/ |
+-- Gort, Klaatu barada nikto! --+
ager [EMAIL PROTECTED]
>800-994-6364
>www.webintellects.com
>
>
--
+--------+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis (530)754-9127 |
--
>Martín Marqués |[EMAIL PROTECTED]
>Programador, Administrador, DBA | Centro de Telematica
>Universidad Nacional
> del Litoral
>-
--
+-
;>--
>--
>
>If You want to buy computer parts, see the reviews at:
>http://www.cnet.com/
>**OR EVEN BETTER COMPILATIONS**!!
>http://sysopt.earthweb.com/userreviews/products/
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.n
Subject: [PHP] Making varibles (more than one) with a function.
>> > I am aware that return can return strings but is their a set global or a
>> > function similar to return?
>>
>> hi there!,
>> There sure is, it's called global.
>&
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
++
| Steve Edberg [EMAIL PROTECTED] |
| Database/Programming/SysAdmin(530)754-9127 |
|
with it. And, I think there's some
nominal license fee to use it on Windows.
Thus endeth my spiel -
- steve edberg
--
++
| Steve Edberg [EMAIL PROTECTED] |
users
>> values I'd rather just use one memory space for all users.
>>
>> Thanks
>>
>> Roger Ramirez
>> Web Developer
> > LifeFiles.com Inc.
>>
--
++
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis
#x27;track_vars' on to enable
$HTTP_POST_VARS and other $HTTP_xxx_VARS arrays. If that's the case -
and you can't upgrade immediately - you need to turn track_vars on in
httpd.conf, php.ini, or .htaccess (whatever's appropriate in your
setup).
Hope that helps -
- steve e
)?
>
>Thanks.
>
--
+--------+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis (530)754-9127 |
| Programming/Database/SysAdmin http
by a simple regular expression call,
>but I'm no pro with them yet.
>
>Any help?
>
>Thanks,
>Ken
>[EMAIL PROTECTED]
>
--
++
| Steve Edberg [EMAIL PROTECTED
the last id but to no avail.
>
>Thanks
>Yoed
>
--
+----+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis (530)754-9127 |
| Programm
;thanks in advance.
>
--
+--------+
| Steve Edberg [EMAIL PROTECTED] |
| University of California, Davis (530)754-9127 |
| Programming/Database/SysAdmin http
e regsiter.\n";
>echo "Membership";
>exit;
>}
>else echo "welcome, $username!";
>
>
>Now for some strange reasons it tries to access my web direcorty
>that does not contain any file, and i get the 404 page not found
>error.
>
>any
hnologies Inc.
>Homepage : http://www.abraxastech.com
>Email : [EMAIL PROTECTED]
>Tel : 91-4546512/4522124
>*******
>
--
++
| Steve Edberg [EMAIL PROTECTED] |
| University of Californi
rote:
>
> > I would like to format numbers to be a fixed width.
> >
> > I want all numbers to be 2 characters in width to the left of the
> > decimal point.
> >
> > 1 should be 01
> > 2 should be 02
> > 3 should be 03
> >
> > How can I do this
shortened to:
>
>hi ...
>
> Any help appreciated.
>
--
+--- 12 April 2001: Forty years of manned spaceflight ---+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED]
>
>Check out the regular expression documentation or "Mastering Regular
>Expressions" over at ora.com.
>
If by 'spaces' you want to include tabs, newlines & stuff, you can also do:
if (!ereg("^[[:alnum:][:space:]_-]+$
"Array". And I know it works because I've done it once and can't do it
>again!
>Am I missing something glaringly obvious?
>
>Thanks for the help,
>
>Mat
>PS. track_vars is ON!
>
--
+--- 12 April 2001: Forty years of manned spaceflight --
$row[5]=mysql_fetch_row($result);
would simply create a 1-element array $row, with the array index 5.
If this was your first fetch statement, $row[5] would still contain
the first row of the result set.
-steve
--
+--- 12 April 2001: Forty years of manned
r editing, blah blah blah
>
>thank you for you help!
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Computer Consultant |
| http://a
- - - - - -
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Computer Consultant |
| http://aesric.ucdavis.edu/ http://pgfsun
t;Thanks,
>Marcus
>--
>Marcus James Christian - UNLIMITED -
>Multimedia Internet Design
>http://mjchristianunlimited.com
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg University of California, Davis |
| [EMAIL PROT
at the '&' or '//' separator but if I
>>do
> >> split('[&//]', $field);
>>> it splits on the '/' not the '//'.
>>> Can I do this in one function call to split() or will I have to do it
>>twice?
>
>
>
ctions - fopen, fwrite, fclose will be of
particular interest:
http://www.php.net/manual/en/ref.filesystem.php
>thanks,
>
>rory
>
>providing the finest in midget technology
>
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Stev
;>
>> skjdks
>>
>>
>> kjkdfjdfkjfd
>>
>> I've tried replacing the br's with blank spaces or new line characters,
>but
>> in the html code it still breaks on those breaks when I echo it back out.
>> How can I force this string to be
ECTED]
>Programmer
>
>If we didn't have Microsoft, we'd have to blame ourselves for all of
>our programs crashing
>
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg University of California, Davis |
| [EM
Thanks.
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Computer Consultant |
| http://aesric.ucdavis.edu/ http://p
?
>
>$dir = opendir(".");
>
>while ($file=readdir($dir)) {
>
>
> if($file!= "." && $file != "..")
> {
> echo("$file");
> }
>}
>
--
+-- Factoid: Of the 100 largest economies in the world, 51 are
sportas
>Innovative Internet Solutions
>Phone 305.665.2500
>Fax 305.665.2551
>www.innovativeinternet.com
>www.web56.net
>
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg University of California, Davis |
|
gt;with a windows dll file or something annoying like that but no luck.
>
>Any ideas? Anyone encountered a problem like this?
>
>Thanks,
>
>Greg
>
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg Univ
pression that I could access my
>variable this way. Am I missing something basic here??
>
>Thanks!
>
>Mark
>
--
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg University of California, Davis |
| [EMAIL PROTEC
1 - 100 of 167 matches
Mail list logo