|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Fri Mar 16 2001 - 20:24:05 CST
php-general Digest 17 Mar 2001 02:24:05 -0000 Issue 571
Topics (messages 44262 through 44351):
dbadmin improved
44262 by: Peter Van Dijck
Re: Strange Behaviour in non-reference globals?
44263 by: Yasuo Ohgaki
Can you recommend an ISP with the following?
44264 by: Jamie Jackson
44270 by: Mal McKay
44273 by: John Huggins
44277 by: Cal Evans
44285 by: Jamie Jackson
44293 by: Brett
44306 by: Boaz Yahav
echo only displays first character
44265 by: Tom Harris
44283 by: Chris Lee
44302 by: Mal McKay
Re: ODBC to mysql?
44266 by: yawstick
Re: Website, Design, hosting and maintenance for only $999.00 per year
44267 by: Mal McKay
Re: Benchmarks
44268 by: Chris Adams
44278 by: Pierre-Yves Lemaire
Re: the mail() again!!!!
44269 by: Romeo Manzur
passing variables using hidden fields
44271 by: george
44282 by: Chris Lee
44289 by: george
How do I get Variables out of a string?
44272 by: Shawn Pritchard
44276 by: Cal Evans
Re: PostToHost
44274 by: Boget, Chris
Building PHP on SYSV
44275 by: Dan Mahoney
protecting password file on ISP
44279 by: Jamie McClelland
Re: FAQ
44280 by: Keith Vance
44344 by: Nik Gare
send file truh mail() function???
44281 by: Romeo Manzur
Webmin
44284 by: Michael Kimsal
44343 by: Mike Tuller
sendmail
44286 by: Marius Kirschner
44287 by: Robert Covell
44288 by: Marius Kirschner
PHP standalone script
44290 by: Don Pro
44333 by: Meir kriheli
$PHP_SELF vs. functions, arrays and variable
44291 by: Scott Fletcher
44292 by: John Lim
Problem with VARIABLES
44294 by: Ian LeBlanc
44299 by: Hardy Merrill
Re: With all this talk about editors ...
44295 by: Boget, Chris
Re: Shopping Carts and Sessions
44296 by: DynamicHTML.aol.com
44297 by: Aaron Tuller
44304 by: Data Driven Design
44321 by: DynamicHTML.aol.com
Re: Putting php at end of html?
44298 by: Boget, Chris
phpinfo() displayed old info
44300 by: Revina
44301 by: Revina
44303 by: harun.crb.elga.net.id
Login System with access levels
44305 by: Jordan Elver
44307 by: Pierre-Yves Lemaire
44327 by: yavo
44328 by: yavo
Re: [PHP-DB] Login System with access levels
44308 by: Rick Emery
44313 by: Jack Sasportas
XML Newbie. HELP!
44309 by: Diego Fulgueira
XML Newbie.!
44310 by: Diego Fulgueira
inner workings of extract
44311 by: dempsejn.georgetown.edu
include php3 -vs- 4
44312 by: Jack Sasportas
44314 by: Boget, Chris
44315 by: Philip Olson
44316 by: rm
Re: Bug IDs #8772, #9002, maybe #9724 - session write handler and register_globals
44317 by: Jaime Bozza
dynamic url from MySql field data
44318 by: Claudia
FileUpload problematic
44319 by: Thalis A. Kalfigopoulos
managing image files with PHP/Mysql
44320 by: Mig
44325 by: Jack Sasportas
Hello! PHP
44322 by: Celestino Roberto Alejandro
44332 by: bard
Can CONSTANT's be made persistent?
44323 by: Johnson, Kirk
44324 by: Aaron Tuller
Associative vs normal arrays
44326 by: Joe
44331 by: Alexander Wagner
44335 by: Joe
44336 by: eschmid+sic.s.netic.de
Frames
44329 by: Randy Johnson
44330 by: Randy Johnson
I can't do a connection to POSTGRES from PHP4 as NSAPI
44334 by: Norberto Rojas
44337 by: Martin A. Marques
Radio Button Returns (Pleasre Read)
44338 by: Fred
44345 by: Nathan Cook
Change POST for GET
44339 by: Jorge Alvarez
highlight_string parsing in an article
44340 by: Jason Lotito
serialize/unzerialize help
44341 by: andrie
PHP not seeming to work
44342 by: Don Weeks
avoiding redirect
44346 by: mat t
Re: Good Free PHP Editor?
44347 by: Jeffrey A.Stuart
Sessions and CHECKBOXES :(
44348 by: karakedi
Re: Error with ldap
44349 by: Brett Bandy
Re: Opening/closing a DB
44350 by: Brett Bandy
JDBC? Was: [PHP] Hello! PHP
44351 by: andrew
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I just tried out
http://sourceforge.net/projects/phpmyedit/
it's like Paul's dbadmin script for generating admin, but seems bettter
(has paging, ...).
Peter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://liga1.com: building multiple language/culture websites
attached mail follows:
----- Original Message -----
From: "John" <jlim
natsoft.com.my>
To: <php-general
lists.php.net>
Sent: Friday, March 16, 2001 11:09 PM
Subject: Re: [PHP] Strange Behaviour in non-reference globals?
> Hi Yasuo,
>
> Thanks for taking the trouble to explain everything in such detail.
>
> Actually I understood your first message. What it doesn't explain is why:
>
> $gGlobal == 1 is changed permanently to $gGlobal == 55.
>
> in the following code:
It also expected behavior. Here is why.
>
> <?php
> function ChangeGlobalValue()
> {
> global $gGlobal;
>
> $local = 55;
> $gGlobal = $local;
$local is NOT a reference. $gGlobal is reference.
In this case, you are actually changing. $GLOBAL['gGlobal'] in this case.
I think you figures it out why now.
Regards,
-- Yasuo Ohgaki> print "Value:Global=$gGlobal<BR>"; > } > > $gGlobal = 1; > ChangeGlobalValue(); > print $gGlobal; <=============== THIS IS 55 NOW > > ?> > > > ========================== > ""Yasuo Ohgaki"" <yohgaki
hotmail.com> wrote in message > news:OE40R0rmTIVvLVKi3s100000984
hotmail.com... > > ----- Original Message ----- > > From: "John" <jlim
natsoft.com.my> > > To: <php-general
lists.php.net> > > Sent: Friday, March 16, 2001 9:12 PM > > Subject: Re: [PHP] Strange PHP Reference behaviour with globals > > > > > > > Thanks Yasuo, > > > > > > That might explain why $gGlobal is not permanently set to 99, > > > but that doesn't explain why $gGlobal is set to 55 in > ChangeGlobalValue() > > > permanently. So are you or am I missing something? > > > > Reference in PHP is not actually a pointer. It's a common pithole for > C/C++ > > programmers. > > In C/C++, you will get 99, instead of 55. But we get 55 in PHP. Here is > why. > > > > Reference is just a place holder for a value. > > > > Your code creates referece with "global" statement asI wrote in previous > mail. > > > > global $var; > > > > creates reference to $GLOBAL['var'] for local $var IN function scope. > > > > $var is actually a reference, NOT a variable itself nor a pointer. > > > > > > > function ChangeGlobalRef() > > > > > { > > > > > global $gGlobal; > > > > Creating reference here, for $GLOBAL['gGlobal']. > > > > > > > > > > > > $local = 99; > > > > > $gGlobal = &$local; > > > > You assign reference of "$local" to "$gGlobal" which is also a reference. > > > > $gGlobal = &$local; > > > > This replaces $gGlobal(reference) with $local(reference). > > Your code does not change $GLOBAL['gGlobal'], which is the value you want > to > > change. > > > > > > > print "Ref:Global=$gGlobal<BR>"; > > > > > } > > > > Since your code replace reference with reference inside function scope. > > You get $gGlobal = 99 inside the function, but not outside the function. > > (Note: Your $gGlobal is refered to $local that has 99 in the function) > > Because $gGlobal itself is local to the function. > > > > Therefore, you cannot get 99 outside the function, but 55. > > > > I hope I explained well, so that all readers understand what I'm talking > about. > > > > Regards, > > -- > > Yasuo Ohgaki > > > > > Bye, John > > > > > > ""Yasuo Ohgaki"" <yohgaki
hotmail.com> wrote in message > > > news:OE73yz5b6KZmcK8r6be00000a44
hotmail.com... > > > > This is expected behavior of PHP's reference. Reference works like a > > > pointer, > > > > but it dose NOT works like a pointer. This is case that reference > does > > > not > > > > works as many programmer expected. > > > > > > > > I think this is in manual. > > > > > > > > Hint: when programmer use 'global $var'. It is the same as do '$var = > & > > > > $GLOBALS['var']'. > > > > > > > > Regards, > > > > > > > > Yasuo Ohgaki > > > > ========================= > > > > My favorite links > > > > [RFC] http://www.faqs.org/rfcs/ [W3C] http://www.w3.org/ > > > > [PHP Manual] http://www.php.net/manual/en/ > > > > > > > > > Hello, > > > > > > > > > > Try the following code: > > > > > > > > > > <?php > > > > > > > > > > $gGlobal = 1; > > > > > function ChangeGlobalValue() > > > > > { > > > > > global $gGlobal; > > > > > > > > > > $local = 55; > > > > > $gGlobal = $local; > > > > > print "Value:Global=$gGlobal<BR>"; > > > > > } > > > > > > > > > > function ChangeGlobalRef() > > > > > { > > > > > global $gGlobal; > > > > > > > > > > $local = 99; > > > > > $gGlobal = &$local; > > > > > print "Ref:Global=$gGlobal<BR>"; > > > > > } > > > > > > > > > > print "Global=$gGlobal<BR>"; > > > > > ChangeGlobalValue(); > > > > > print "Global=$gGlobal<BR>"; > > > > > ChangeGlobalRef(); > > > > > print "Global=$gGlobal<BR>"; > > > > > ?> > > > > > > > > > > I get the following results: > > > > > > > > > > Global=1 > > > > > Value:Global=55 > > > > > Global=55 > > > > > Ref:Global=99 > > > > > Global=55 <=========== shouldn't this be 99 ??? > > > > > > > > > > Why does setting a global variable to a reference fail in a > function? > > > > > > > > > > Tested on PHP 4.0.4 on IIS5 (CGI version). > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > > > > For additional commands, e-mail: php-general-help
lists.php.net > > > > > To contact the list administrators, e-mail: > php-list-admin
lists.php.net > > > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > > > For additional commands, e-mail: php-general-help
lists.php.net > > > > To contact the list administrators, e-mail: > php-list-admin
lists.php.net > > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > > For additional commands, e-mail: php-general-help
lists.php.net > > > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > For additional commands, e-mail: php-general-help
lists.php.net > > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net > >
attached mail follows:
I'm looking to move from an old Web host (stormweb.net) that has entirely stopped responding to customer support emails. I liked what they had to offer, before they became unresponsive, so I'm looking for a similar ISP with:
*PHP4 *MySQL *Telnet access *Decent Support *Preferably a Cobalt server (or one with a VERY good Web-based administrator, most other types of Web administrators I've seen have been clunky and a PITA) *Pretty Cheap
I've checked out ISP check, and it would be great if they listed the type of Wed-based administrator, but they don't. It's VERY tedious to get a demo account, and see that their Web-based administrator is junk. I'm used to the very slick administrator found on Cobalt servers. I have given up after a half-dozen attempts at other servers. I sincerely hope someone can help.
Thank you very much, Jamie
attached mail follows:
www.avidhosting.com
check out the download for the manual to their "control panel" I have been _very_ impressed with their service and scalability.
mal
-----Original Message-----
From: Jamie Jackson [mailto:NOSPAMjacksonjNOSPAM
calib.com]
Sent: 16 March 2001 15:45
To: php-general
lists.php.net
Subject: [PHP] Can you recommend an ISP with the following?
I'm looking to move from an old Web host (stormweb.net) that has entirely stopped responding to customer support emails. I liked what they had to offer, before they became unresponsive, so I'm looking for a similar ISP with:
*PHP4 *MySQL *Telnet access *Decent Support *Preferably a Cobalt server (or one with a VERY good Web-based administrator, most other types of Web administrators I've seen have been clunky and a PITA) *Pretty Cheap
I've checked out ISP check, and it would be great if they listed the type of Wed-based administrator, but they don't. It's VERY tedious to get a demo account, and see that their Web-based administrator is junk. I'm used to the very slick administrator found on Cobalt servers. I have given up after a half-dozen attempts at other servers. I sincerely hope someone can help.
Thank you very much, Jamie
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
You mention a large desire for a good web based administrator. I wonder if there is a version of a web based system administrator available that works like Cobalt, but can be installed on any hosting setup. Have you folks heard of such a thing? I am aware of Webmin, but am not too impressed with it yet.
I have toyed with the idea of writing my own. Jamie, what items do you feel must be controllable in a web hosting account administration panel? Yes, we all know the basics, like email, dns, etc. but a bulleted list would be a good start at organizing a development effort.
John
> -----Original Message-----
> From: Jamie Jackson [mailto:NOSPAMjacksonjNOSPAM
calib.com]
> Sent: Friday, March 16, 2001 10:45 AM
> To: php-general
lists.php.net
> Subject: [PHP] Can you recommend an ISP with the following?
>
>
> I'm looking to move from an old Web host (stormweb.net) that has
> entirely stopped responding to customer support emails. I liked what
> they had to offer, before they became unresponsive, so I'm looking for
> a similar ISP with:
>
> *PHP4
> *MySQL
> *Telnet access
> *Decent Support
> *Preferably a Cobalt server (or one with a VERY good Web-based
> administrator, most other types of Web administrators I've seen have
> been clunky and a PITA)
> *Pretty Cheap
>
> I've checked out ISP check, and it would be great if they listed the
> type of Wed-based administrator, but they don't. It's VERY tedious to
> get a demo account, and see that their Web-based administrator is
> junk. I'm used to the very slick administrator found on Cobalt
> servers. I have given up after a half-dozen attempts at other servers.
> I sincerely hope someone can help.
>
> Thank you very much,
> Jamie
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Have you looked at www.webmin.com?
-----Original Message-----
From: John Huggins [mailto:huggins
tls2000.com]
Sent: Friday, March 16, 2001 10:16 AM
To: Jamie Jackson; php-general
lists.php.net
Subject: RE: [PHP] Can you recommend an ISP with the following?
You mention a large desire for a good web based administrator. I wonder if there is a version of a web based system administrator available that works like Cobalt, but can be installed on any hosting setup. Have you folks heard of such a thing? I am aware of Webmin, but am not too impressed with it yet.
I have toyed with the idea of writing my own. Jamie, what items do you feel must be controllable in a web hosting account administration panel? Yes, we all know the basics, like email, dns, etc. but a bulleted list would be a good start at organizing a development effort.
John
> -----Original Message-----
> From: Jamie Jackson [mailto:NOSPAMjacksonjNOSPAM
calib.com]
> Sent: Friday, March 16, 2001 10:45 AM
> To: php-general
lists.php.net
> Subject: [PHP] Can you recommend an ISP with the following?
>
>
> I'm looking to move from an old Web host (stormweb.net) that has
> entirely stopped responding to customer support emails. I liked what
> they had to offer, before they became unresponsive, so I'm looking for
> a similar ISP with:
>
> *PHP4
> *MySQL
> *Telnet access
> *Decent Support
> *Preferably a Cobalt server (or one with a VERY good Web-based
> administrator, most other types of Web administrators I've seen have
> been clunky and a PITA)
> *Pretty Cheap
>
> I've checked out ISP check, and it would be great if they listed the
> type of Wed-based administrator, but they don't. It's VERY tedious to
> get a demo account, and see that their Web-based administrator is
> junk. I'm used to the very slick administrator found on Cobalt
> servers. I have given up after a half-dozen attempts at other servers.
> I sincerely hope someone can help.
>
> Thank you very much,
> Jamie
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
The biggies are: *An intuitive email config interface, with list management, aliases, etc. *Ability to "sub-let" out webspace/ftp area to people ("users" directories) *Web-space administration and monitoring (to regulate "sub"-users' webspace) *Good backup system. (RAQs let you download a compressed backup, which can be easily uploaded, and reverted to).
Cobalt servers do these things.
Jamie
On 16 Mar 2001 08:10:24 -0800, huggins
tls2000.com ("John Huggins")
wrote:
>You mention a large desire for a good web based administrator. I wonder if
>there is a version of a web based system administrator available that works
>like Cobalt, but can be installed on any hosting setup. Have you folks
>heard of such a thing? I am aware of Webmin, but am not too impressed with
>it yet.
>
>I have toyed with the idea of writing my own. Jamie, what items do you feel
>must be controllable in a web hosting account administration panel? Yes, we
>all know the basics, like email, dns, etc. but a bulleted list would be a
>good start at organizing a development effort.
>
>John
>
>> -----Original Message-----
>> From: Jamie Jackson [mailto:NOSPAMjacksonjNOSPAM
calib.com]
>> Sent: Friday, March 16, 2001 10:45 AM
>> To: php-general
lists.php.net
>> Subject: [PHP] Can you recommend an ISP with the following?
>>
>>
>> I'm looking to move from an old Web host (stormweb.net) that has
>> entirely stopped responding to customer support emails. I liked what
>> they had to offer, before they became unresponsive, so I'm looking for
>> a similar ISP with:
>>
>> *PHP4
>> *MySQL
>> *Telnet access
>> *Decent Support
>> *Preferably a Cobalt server (or one with a VERY good Web-based
>> administrator, most other types of Web administrators I've seen have
>> been clunky and a PITA)
>> *Pretty Cheap
>>
>> I've checked out ISP check, and it would be great if they listed the
>> type of Wed-based administrator, but they don't. It's VERY tedious to
>> get a demo account, and see that their Web-based administrator is
>> junk. I'm used to the very slick administrator found on Cobalt
>> servers. I have given up after a half-dozen attempts at other servers.
>> I sincerely hope someone can help.
>>
>> Thank you very much,
>> Jamie
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> For additional commands, e-mail: php-general-help
lists.php.net
>> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>>
attached mail follows:
> I'm looking to move from an old Web host (stormweb.net) that has > entirely stopped responding to customer support emails. I liked what > they had to offer, before they became unresponsive, so I'm looking for > a similar ISP with: >
I would do a search on google for cobalt virtual hosts. If you want my recommendation, I have been using Interliant for a year now for co-location. They have excellent support, offer Cobalt RAQs virtual hosting, and have great connection speeds and uptime.
Brett
attached mail follows:
Check out :
http://www.weberdev.com/index.php3?GoTo=phenominet/prices.htm
This is your one stop shop for hosting. WeberDev.com is hosted there and I can tell you that their service is amazing. They are fast, reliable and more than anything, very professional (specially in PHP / MySQL).
Sincerely
berber
Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow.
-----Original Message-----
From: Jamie Jackson [mailto:NOSPAMjacksonjNOSPAM
calib.com]
Sent: Friday, March 16, 2001 5:45 PM
To: php-general
lists.php.net
Subject: [PHP] Can you recommend an ISP with the following?
I'm looking to move from an old Web host (stormweb.net) that has entirely stopped responding to customer support emails. I liked what they had to offer, before they became unresponsive, so I'm looking for a similar ISP with:
*PHP4 *MySQL *Telnet access *Decent Support *Preferably a Cobalt server (or one with a VERY good Web-based administrator, most other types of Web administrators I've seen have been clunky and a PITA) *Pretty Cheap
I've checked out ISP check, and it would be great if they listed the type of Wed-based administrator, but they don't. It's VERY tedious to get a demo account, and see that their Web-based administrator is junk. I'm used to the very slick administrator found on Cobalt servers. I have given up after a half-dozen attempts at other servers. I sincerely hope someone can help.
Thank you very much, Jamie
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Here's an interesting problem.
The following only prints the first letter of the name
for ($i=0; isset($empid[$i]); $i++) {
echo "$empid[$i] $name[$i]<br>";
}
But if I change the variable $name to $employeename throughout the script it displays fine.
$empid[] and $name[] are both assigned earlier in the script by pulling data from a MySQL database.
Is $name a reserved word or something? Anyone know why just changing the array's name fixes the problem?
Thanks,
-Tom
attached mail follows:
please post more code, ie where $name is set.
in the mean time try this, shouldnt help but might
foreach($empid as $pos => $val) { echo "{$empid[$pos]} {$name[$pos]}<br>"; }
--Chris Lee lee
mediawaveonline.com
""Tom Harris"" <stry_cat
yahoo.com> wrote in message news:98tcfg$bn3$1
toye.p.sourceforge.net... Here's an interesting problem.
The following only prints the first letter of the name
for ($i=0; isset($empid[$i]); $i++) {
echo "$empid[$i] $name[$i]<br>";
}
But if I change the variable $name to $employeename throughout the script it displays fine.
$empid[] and $name[] are both assigned earlier in the script by pulling data from a MySQL database.
Is $name a reserved word or something? Anyone know why just changing the array's name fixes the problem?
Thanks,
-Tom
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Are you sure $name is an array. t appears to be a string and the $name[$i] references one character in that string
mal
-----Original Message-----
From: Tom Harris [mailto:stry_cat
yahoo.com]
Sent: 16 March 2001 15:50
To: php-general
lists.php.net
Subject: [PHP] echo only displays first character
Here's an interesting problem.
The following only prints the first letter of the name
for ($i=0; isset($empid[$i]); $i++) {
echo "$empid[$i] $name[$i]<br>";
}
But if I change the variable $name to $employeename throughout the script it displays fine.
$empid[] and $name[] are both assigned earlier in the script by pulling data from a MySQL database.
Is $name a reserved word or something? Anyone know why just changing the array's name fixes the problem?
Thanks,
-Tom
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
there is an article on devshed.com thats details this
attached mail follows:
The message isn't actually from www.pspl.co.in, or in your case from your
smtp host.
I forget exactly what header you leave out to result in an email appearing
to be from <string>
yourhost.com
Or maybe its when the from: header is a non email string.
-----Original Message-----
From: Harshdeep S Jawanda [mailto:harsh
pspl.co.in]
Sent: 16 March 2001 10:41
To: php-general
lists.php.net
Subject: Re: [PHP] Website, Design, hosting and maintenance for only
$999.00 per year
Hey! What the hell is happening? That's my company's domain name!!
Please don't anybody bother to reply to this posting by "Netmark.Desing" - its an obvious fake. A visit to www.pspl.co.in will prove to you that we're not into anything even remotely connected with this posting.
Netmark.Desing
pspl.co.in wrote:
> Website, Design, hosting and maintenance for only $999.00 per year, > by NetmarkDesign. > > Looking for a cost effective, professionally designed website? Our program > enables you to budget your internet base expenses upfront. We offer > in-house > design, hosting and marketing. Put all your internet operations under one > roof. > > If you have an existing site and would like a quotation to convert, upgrade > or redesign we offer 48 hour no obligation proposals tailored to your needs. > > See us at Top Ten Traffic Sites at www.greatfreesite.net/bestten where > we've been ranked number 5 as the most cost effective website provider and > take the next step to your success. > > NetmarkDesign
-- Regards, Harshdeep Singh Jawanda.-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On 16 Mar 2001 04:39:06 -0800, Phil Driscoll <phil
dialsolutions.co.uk> wrote:
>http://www.perlmonth.com/features/benchmarks/benchmarks.html?issue=4&id=9351
>4159
>
>A performance comparison of various web scripting languages. PHP does rather
>well!
It's also important to note that their comment that PHP doesn't cache compiled scripts and thus may not scale as well isn't completely true. The default install doesn't, but you can use one of several products (Zend Cache, Afterburner and a third whose name escapes me) to ensure that your scripts are cached.
attached mail follows:
Third one would be http://apc.communityconnect.com/ ??
py
----- Original Message -----
From: Chris Adams <chris
improbable.org>
To: <php-general
lists.php.net>
Sent: Friday, March 16, 2001 3:37 PM
Subject: Re: [PHP] Benchmarks
> On 16 Mar 2001 04:39:06 -0800, Phil Driscoll <phil
dialsolutions.co.uk>
wrote:
>
>http://www.perlmonth.com/features/benchmarks/benchmarks.html?issue=4&id=935
1
> >4159
> >
> >A performance comparison of various web scripting languages. PHP does
rather
> >well!
>
> It's also important to note that their comment that PHP doesn't cache
compiled
> scripts and thus may not scale as well isn't completely true. The default
> install doesn't, but you can use one of several products (Zend Cache,
> Afterburner and a third whose name escapes me) to ensure that your scripts
are
> cached.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
well, you try to send mail without a program to do it, you need a program like sendmail to send mail on your windows machine, I use it on linux and works very well...try to find sendmail for windows and confugure the php.ini on the line to send mail...
Nilesh Parmar wrote:
> Hi
> I have installed php4 with apache onto my windows 98 machine .I am trying
> to send an email using the mail() function . When i run the following piece
> of code i get a warning .Can anyone please help me figure what has gone
> wrong and suggest me with what to do.
> ****************************
> This is the code!!
> <?php
> $mailto = "nilesh_parmar
rediff.com;
> $mailsub = "this is a php mail() function";
> $body = " i hope this works";
>
> if (mail($mailto ,$mailsub, $body))
> echo("successfully sent an email to $mailto");
> else
> echo("failed to send the email \"$mailsub\" to $mailto");
> ?>
> *************************************
> the following is the warining i get.
> Warning: Server Error in c:\program files\apache
> group\apache\htdocs\nilesh\mail.php on line 6
> failed to send the email "this is a php mail() function" to
> nilesh_parmar
rediff.com
>
> ********************************************
> Hoping someone can help me in this regard
> bye and thanx in advance
> Nilesh Parmar
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- -------------------------------------- Romeo Manzur Web Application Developer iSilicom Av. 27 de Febrero 904-A Desp 1, Centro C.P.:86000 Villahermosa, Tabasco, Mexico Tel.:(52)(9)3-12-4790 --------------------------------------
attached mail follows:
Hi, I am building a contact form, which goes into a db I them pull the information out and display it, then I pass the values to another page using hidden fields but for some reason even though it displays the full thing on the first page when I pass a variable to the next page it only displays the first word. so on the first page where it has pulled it from the db it will say "this is a test" next page it just says "test"
TIA
george
attached mail follows:
your not putting it in quotes.
echo " <input type=hidden name=people_name value=$people_name> ";
change to
echo " <input type='hidden' name='people_name' value='$people_name'> ";
quotes are your friend :)
--Chris Lee lee
mediawaveonline.com
""george"" <chiefmonkey
wisemonkeydesign.co.uk> wrote in message news:98tdl2$ps2$1
toye.p.sourceforge.net... Hi, I am building a contact form, which goes into a db I them pull the information out and display it, then I pass the values to another page using hidden fields but for some reason even though it displays the full thing on the first page when I pass a variable to the next page it only displays the first word. so on the first page where it has pulled it from the db it will say "this is a test" next page it just says "test"
TIA
george
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Thanks Chris.
George
attached mail follows:
Hello!
I have been bashing my head trying to figure this out, and I'm hoping somebody can show me the correct way to do this:
A PGP signed set of variables is passed to our URL via GET. I use HTTP_GET_VARS to grab the PGP string, which is contained in a variable called "trnResponse". I run that through pgpv to end up with the raw string, which I store in a variable called $rawstring
The string looks like: trnId=10000019&messageId=1&messageText=Approved&authCode=&trnDate=3%2F16%2F2 001+8%3A07%3A14+AM&trnOrderNumber=435643
That's where I get confused about the best way to pull the variables out of the string.
I was using something like: $thearray = explode ("&", rawurldecode($rawstring)); (this still leaves me with "+" in some places, but I can use str_replace to get rid of them)
I was exploding on "&", but that leaves me with an array with things like trnId=10000019 in each "cell" It does explode properly, but now, how do I pull these things out of the array and get them defined as variables?? Or...do I even need to put them into the array in the first place?
THANK YOU for any help someone might be able to provide!!
-- Shawn Pritchard
attached mail follows:
urldecode it first. Then explode it.
-----Original Message-----
From: Shawn Pritchard [mailto:shawn
webexceed.com]
Sent: Friday, March 16, 2001 10:16 AM
To: php-general
lists.php.net
Subject: [PHP] How do I get Variables out of a string?
Hello!
I have been bashing my head trying to figure this out, and I'm hoping somebody can show me the correct way to do this:
A PGP signed set of variables is passed to our URL via GET. I use HTTP_GET_VARS to grab the PGP string, which is contained in a variable called "trnResponse". I run that through pgpv to end up with the raw string, which I store in a variable called $rawstring
The string looks like: trnId=10000019&messageId=1&messageText=Approved&authCode=&trnDate=3%2F16%2F2 001+8%3A07%3A14+AM&trnOrderNumber=435643
That's where I get confused about the best way to pull the variables out of the string.
I was using something like: $thearray = explode ("&", rawurldecode($rawstring)); (this still leaves me with "+" in some places, but I can use str_replace to get rid of them)
I was exploding on "&", but that leaves me with an array with things like trnId=10000019 in each "cell" It does explode properly, but now, how do I pull these things out of the array and get them defined as variables?? Or...do I even need to put them into the array in the first place?
THANK YOU for any help someone might be able to provide!!
-- Shawn Pritchard-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> I am not sure exactly what you are asking but by this do you mean .. > <page1> > process_statements > ... > ... > Header("Location:http://www.some.net?id=$row->ID"); > .... > </page1> > <page2> > then use the string in $QUERY_STRING to retreive/parse your data. > </page2>
Yes, more or less. However, I'm trying to find some way to be able to pass those variables via POST, not GET as suggested above. Using GET, the end user can modify the values of the variables and there is little way for me to determine if that had happened. With POST I have a little more control, though not much.
So while you can transfer control to another page server side using the header() function and GET variables, I'm curious to find out if there is a way to do something similar server side but using POST.
Chris
attached mail follows:
I am trying to build PHP 4.0.2 on a box running SYSV Unix and am getting a number of errors. I'm using gcc 2.6.0. The OS is version 4.0.
1) In ext/standard/mail.c, the include file, sysexits.h, doesn't exist. I did a little hunting. mail.c is looking for EX_TEMPFAIL, so I replace <sysexits.h> with #define EX_TEMPFAIL 75. I got the value from a SCO box.
2) After fixing the above problem, I again type, "make" from the top-level directory of the distribution and get the following: Making all in . /bin/sh /users/dmahoney/source/php-4.0.2/libtool --silent --mode=link gc c -I. -I/users/dmahoney/source/php-4.0.2/ -I/users/dmahoney/source/php-4.0.2 -I /users/dmahoney/source/php-4.0.2/main -I/users/dmahoney/source/php-4.0.2/Zend -I /users/dmahoney/source/php-4.0.2 -I/users/dmahoney/source/php-4.0.2/ext/mysql/li bmysql -g -O2 -o libphp4.la -rpath /users/dmahoney/source/php-4.0.2/libs / usr/ucblib stub.lo Zend/libZend.la sapi/cgi/libsapi.la main/libmain.la regex /libregex.la ext/db/libdb.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/posi x/libposix.la ext/session/libsession.la ext/standard/libstandard.la -ldl -lres olv -lresolv -lresolv -lm -ldl -lcrypt -lsocket -lsocket UX:sh (libtool): ERROR: /usr/bin/ar: arg list too long *** Error code 1 (bu21)
make: fatal error. *** Error code 1 (bu21)
make: fatal error.
Does anyone have any ideas about the problem?
Thanks,
DOM II
attached mail follows:
Hi all -
I am using php/MySQL on an ISP in which there are other users. Everyone has SSH access and can therefore enter everyone else's directories and read any world-readable files. I have a config.inc file which contains my MySQL username and password. This file is located outside of my web directory (to prevent web browsers from reading it). In addition, my ISP added the user 'www' to my group, enabling me to make config.inc group readable but not user readable. Therefore, none of the other users can SSH into the system and read my username and password.
This is great, but there is one more concern: if the user 'www' can read this file, isn't it possible for any other user to write a php script, executable by 'www', that instructs the web server to echo the contents of this file? All they have to know is the directory and name of the file they are looking for.
Anyone have suggestions on how to close this security hole?
Thanks, Jamie
attached mail follows:
I agree with everything you have said. I just don't think there is a good way to get people from asking these types of questions, without someone sitting there reading every message and filtering them according to topic. We are stuck with a high-volume list where lots of newbies come to ask us questions. If PHP wasn't so damn good and so popular we wouldn't be having this conversation.
K E I T H V A N C E Software Engineer n-Link Corporation
On Thu, 15 Mar 2001, Jason Lotito wrote:
> > How many times are people going to complain about no-brainer questions
> > being posted to the list. The fact of the matter is people are going to
> > post things on the list without reading the manual or the FAQ. It goes
> > with the territory. It annoys me too, but there is no good solution for
> > the problem. There is the fact that a lot of people are new and don't
> > really know where to go to find answers. Even if they go to the web site,
> > they still may not know that they need to be looking for information on
> > naming variables with variables or that fopen opens a file or whatever.
> >
> > K E I T H V A N C E
>
> I think the argument has less to do with people asking questions about PHP
> and how it works, and more about people asking basica programming questions
> without knowing it. Fundamental programming concepts, like the scope of a
> variable, passing by reference or by value, or even looping are things
> newbie's simply do not understand. Why? Because they don't know they need
> to learn the concepts and theories of programming before learning to
> program. It sounds odd, but that is the way it is.
>
> People asking questions about how a loop works are not usually asking how a
> PHP loop works. The same for arrays. They are really saying: "This is the
> first real programming language I am out to learn, and I don't understand
> the concept behind a For/Next Loop." This isn't a bad thing, heck, we were
> all newbies at one point, and in a sense, we are all newbies at something.
>
> I think the argument is that their are many people who don't want to learn
> how and why a For/Next Loop works, but instead simply want someone to fix
> the problem for them. That isn't programming. Programming (and yes, I
> know, PHP is technically a scripting language, but lets not jump that fence
> as well) is about trial and error, logic, and creativity, but most
> importantly, problem solving. Most of the newbies get into PHP expecting a
> tutorial on every topic. If they can't find a tutorial on how to print out
> 5 numbers, they expect someone to show them how to do it. They don't try
> and solve the problem themselves, and that is a problem. I don't mind
> assisting where I can, however, I don't like rewriting a script for someone
> when they don't even take the time to try and learn the fundamentals. Most
> newbies I have met fall into two categories. The majority start out wanting
> to learn PHP because someone said it was easy to learn, which it is, from a
> programmers point of view. However, when in the second week of learning
> their first programming language they can't program that PHP Database
> Content Management System with Instant Yahoo News Retrival complete with
> User Database, Forums, and Real Time Foo, they start getting upset and say
> that PHP sucks. Those same people may also complain because they can't find
> a tutorial on how to create a Forum Database, and all they can find are
> tutorials on the basics of Database Design.
>
> I think this is the real problem. Try to run before they have learned to
> crawl and walk.
>
> Jason Lotito
> www.NewbieNetwork.net
> Where those who can, teach;
> and those who can, learn.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
In article <4.3.2.7.0.20010315133446.00dcb290
mail.internet.look.ca>,
Rick St Jean <rstjean
internet.look.ca> wrote:
> The problem is that people are lazy or just to stupid to look for
> stuff.
<snip>
I guess people are either too lazy or just too stupid to learn how to quote in emails. ;-)
> I guess I am frustrated because all the lists I am on are filled with > lazy people who whine and want someone else to do all their work for > them. <big snip>
I get frustrated by people sending huge quotes, and leaving 4 of those auto generated list tags behind. If they didn't, the traffic on the list, size wise, would be halved.
Nik
attached mail follows:
how could I send a .doc file truh mail() function??? if anybody know, send me the way...
-- -------------------------------------- Romeo Manzur Web Application Developer iSilicom Av. 27 de Febrero 904-A Desp 1, Centro C.P.:86000 Villahermosa, Tabasco, Mexico Tel.:(52)(9)3-12-4790 --------------------------------------
attached mail follows:
Although I somewhat agree with the webmin sentiment, after having tried to do simple maintenance on a cobalt for someone, it seems a real dog for anything outside the normal scope of what they want you to do. We needed to edit an httpd.conf file, but there doesn't seem to be a way to do it. Ditto for restarting Apache. Add a MIME type? No dice.
Webmin is not the slickest interface, but seems to offer a lot of flexibility.
Rather than rewriting something, perhaps you could vounteer to design a better interface for existing webmin stuff.
A PHP-based version of webmin would be nice, but it's already a rather developed project, and after considering how to do it myself, I realized there's a whole hell of a lot of configurations and systems to have to consider beyond my few linux distros.
John Huggins wrote:
> You mention a large desire for a good web based administrator. I wonder if > there is a version of a web based system administrator available that works > like Cobalt, but can be installed on any hosting setup. Have you folks > heard of such a thing? I am aware of Webmin, but am not too impressed with > it yet. > > I have toyed with the idea of writing my own. Jamie, what items do you feel > must be controllable in a web hosting account administration panel? Yes, we > all know the basics, like email, dns, etc. but a bulleted list would be a > good start at organizing a development effort. > > John
attached mail follows:
Webmin uses templates, so you could create anything you want. If you go into Webmin configuration under the Webmin tab, you will see templates. When you go in there you will see a menu for current theme. It should have Calderas theme. That at least means they are open to template creation.
I agree though, it would be nice in PHP, but I think that you can still do a little more system level scripting in Perl right now.
> From: Michael Kimsal <michael
tapinternet.com>
> Reply-To: michael
tapinternet.com
> Date: Fri, 16 Mar 2001 11:33:46 -0500
> To: php-general
lists.php.net
> Subject: [PHP] Webmin
>
> Although I somewhat agree with the webmin sentiment,
> after having tried to do simple maintenance on a cobalt for someone,
> it seems a real dog for anything outside the normal scope of what
> they want you to do. We needed to edit an httpd.conf file,
> but there doesn't seem to be a way to do it. Ditto for restarting Apache.
> Add a MIME type? No dice.
>
> Webmin is not the slickest interface, but seems to offer a lot of flexibility.
>
> Rather than rewriting something, perhaps you could vounteer to design
> a better interface for existing webmin stuff.
>
> A PHP-based version of webmin would be nice, but it's already a rather
> developed project, and after considering how to do it myself, I realized
> there's a whole hell of a lot of configurations and systems to have to
> consider beyond my few linux distros.
>
> John Huggins wrote:
>
>> You mention a large desire for a good web based administrator. I wonder if
>> there is a version of a web based system administrator available that works
>> like Cobalt, but can be installed on any hosting setup. Have you folks
>> heard of such a thing? I am aware of Webmin, but am not too impressed with
>> it yet.
>>
>> I have toyed with the idea of writing my own. Jamie, what items do you feel
>> must be controllable in a web hosting account administration panel? Yes, we
>> all know the basics, like email, dns, etc. but a bulleted list would be a
>> good start at organizing a development effort.
>>
>> John
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I'm at a loss....I've searched throught the knowledgebase, archives, docs, etc but I can't figure out what's going on. The problem is when using the mail() function nothing gets send and I don't get any error messages either. It's like the message gets eaten by a black hole.
I'm running PHP4 on a BSDI 3.1 box with Apache 3.9 and sendmail 8.9.3, my php.ini file has the "sendmail_path = /usr/sbin/sendmail" in there, but still when I click on submit nothing gets send. I know the script is working (works on another system) plus I've tried other "form mailers" with the same problem. Does anybody have some clue as to where I should start looking to fix this? Thanks,
---Marius
attached mail follows:
Do you have the switches for sendmail in your path?
Our installs have: /usr/sbin/sendmail -t -i for the path information...
Sincerely,
Robert T. Covell
President / Owner
Rolet Internet Services, LLC
Web: www.rolet.com
Email: rcovell
rolet.com
Phone: 816.210.7145
Fax: 816.753.1952
-----Original Message-----
From: Marius Kirschner [mailto:marius
agoron.com]
Sent: Friday, March 16, 2001 10:43 AM
To: php-general
lists.php.net
Subject: [PHP] sendmail
I'm at a loss....I've searched throught the knowledgebase, archives, docs, etc but I can't figure out what's going on. The problem is when using the mail() function nothing gets send and I don't get any error messages either. It's like the message gets eaten by a black hole.
I'm running PHP4 on a BSDI 3.1 box with Apache 3.9 and sendmail 8.9.3, my php.ini file has the "sendmail_path = /usr/sbin/sendmail" in there, but still when I click on submit nothing gets send. I know the script is working (works on another system) plus I've tried other "form mailers" with the same problem. Does anybody have some clue as to where I should start looking to fix this? Thanks,
---Marius
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Damn, the "-t -i" did the trick!!!! I can't believe the fix was so easy and I spent DAYS (really) trying to figure out what's wrong! Thanks so much, Robert. :)
---Marius
> -----Original Message-----
> From: Robert Covell [mailto:rcovell
rolet.com]
> Sent: Friday, March 16, 2001 11:41 AM
> To: Marius Kirschner; php-general
lists.php.net
> Subject: RE: [PHP] sendmail
>
>
> Do you have the switches for sendmail in your path?
>
> Our installs have: /usr/sbin/sendmail -t -i for the path information...
>
> Sincerely,
>
> Robert T. Covell
> President / Owner
> Rolet Internet Services, LLC
> Web: www.rolet.com
> Email: rcovell
rolet.com
> Phone: 816.210.7145
> Fax: 816.753.1952
>
> -----Original Message-----
> From: Marius Kirschner [mailto:marius
agoron.com]
> Sent: Friday, March 16, 2001 10:43 AM
> To: php-general
lists.php.net
> Subject: [PHP] sendmail
>
>
> I'm at a loss....I've searched throught the knowledgebase, archives, docs,
> etc but I can't figure out what's going on. The problem is when using the
> mail() function nothing gets send and I don't get any error
> messages either.
> It's like the message gets eaten by a black hole.
>
> I'm running PHP4 on a BSDI 3.1 box with Apache 3.9 and sendmail 8.9.3, my
> php.ini file has the "sendmail_path = /usr/sbin/sendmail"
> in there,
> but still when I click on submit nothing gets send. I know the script is
> working (works on another system) plus I've tried other "form
> mailers" with
> the same problem. Does anybody have some clue as to where I should start
> looking to fix this? Thanks,
>
> ---Marius
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
>
attached mail follows:
Hi,
I've used PHP scripts in my HTML to provide dynamic content but I was wondering if I can also use PHP to create standalone scripts on my UNIX box. If so, where is the PHP interpreter and how do I invoke it?
attached mail follows:
On Friday 16 March 2001 19:31, Don Pro wrote: > Hi, > > I've used PHP scripts in my HTML to provide dynamic content but I was > wondering if I can also use PHP to create standalone scripts on my UNIX > box. If so, where is the PHP interpreter and how do I invoke it?
You should configure and compile PHP as a standalone executeable (without --with-apxs or without --with-apache) and in the top of your script you should put
#!/usr/bin/php -q
or whatever the path to PHP is (check the output of phpinfo() ).
the -q flag is to supress headers.
-- Meir KriheliThere's someone in my head, but it's not me - Pink Floyd
attached mail follows:
Hi!
I noticed when using $PHP_SELF in the script, you can use only the variables. So, I tried it with the arrays or functions and found that it does not work. So, is $PHP_SELF limited to variables only?
Scott
attached mail follows:
Hi Scott,
Good question! $PHP_SELF is a global variable, so you need to declare it in functions:
function a() { global $PHP_SELF;
print $PHP_SELF; }
John
"Scott Fletcher" <scott
abcoa.com> wrote in message news:98tjgv$40e$1
toye.p.sourceforge.net...
> Hi!
>
> I noticed when using $PHP_SELF in the script, you can use only the
> variables. So, I tried it with the arrays or functions and found that it
> does not work. So, is $PHP_SELF limited to variables only?
>
> Scott
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
I have this page where I am printing some items that are defined by size and color which all the info is pulled from a database.
in the first item loop PRINT ("<td><input type=\"text\" name=\"$Color$Temp[$f]\" size=\"3\"></td>\n"); translated looks like this. <td><input type="text" name=\"WhiteS" size="3"></td>
meaning the color white and the size Small.
Now the next loop does what it is suppose to and returns a value of <td><input type="text" name=\"BlackS" size="3"></td>
These get posted to the next page. Now for the PROBLEM
without hard coding it how can I get the value of BlackS meaning I know the color and sizes but how do I put the variable together to print the value of it.
On the 2nd page I would like to echo $Color$Temp[$f] but that does not return the value of the item. I need $Color$Temp[$f] to turn into the variable not a value. So I can echo the variable. Someone please help.
(*NOTE* the reason I do not want to hard code it is that I have a list of 102 colors which makes for a really long script.)
PLEASE CC ME ON THE MESSAGE BECAUSE I AM ONLY SUBSCRIBED TO THE DIGEST (I will have to wait some 12 odd hours for the answer) Regards,
Ian LeBlanc Web Development Rask, Inc. - www.rask.com Phone: (727) 517-2000 Fax: (727) 517-2001
attached mail follows:
Ian, I think what you want is a variable variable - have a look at
http://www.php.net/manual/en/html/language.variables.variable.html
I think you might want something like this:
${$Color$Temp[$f]}
HTH.
-- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.comIan LeBlanc [Ian
rask.com] wrote: > I have this page where I am printing some items that are defined by size > and color which all the info is pulled from a database. > > in the first item loop > PRINT ("<td><input type=\"text\" name=\"$Color$Temp[$f]\" size=\"3\"></td>\n"); > translated looks like this. > <td><input type="text" name=\"WhiteS" size="3"></td> > > meaning the color white and the size Small. > > Now the next loop does what it is suppose to and returns a value of > <td><input type="text" name=\"BlackS" size="3"></td> > > These get posted to the next page. > Now for the PROBLEM > > without hard coding it how can I get the value of BlackS > meaning I know the color and sizes but how do I put the variable together > to print the value of it. > > On the 2nd page I would like to echo $Color$Temp[$f] but that does not > return the value of the item. > I need $Color$Temp[$f] to turn into the variable not a value. So I can echo > the variable. > Someone please help. > > (*NOTE* the reason I do not want to hard code it is that I have a list of > 102 colors which makes for a really long script.) > > PLEASE CC ME ON THE MESSAGE BECAUSE I AM ONLY SUBSCRIBED TO THE DIGEST (I > will have to wait some 12 odd hours for the answer) > Regards, > > Ian LeBlanc > Web Development > Rask, Inc. - www.rask.com > Phone: (727) 517-2000 > Fax: (727) 517-2001 > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> http://www.php.net/manual/en/ref.funchand.php > This page must be your friends.
I took a look at this page (and all the functions referenced therein). While there must be a use for these functions otherwise they wouldn't have been included in PHP, I'm at a total loss as to why anyone would ever use them. Why wouldn't you just call the function (or do whatever) yourself? Could anyone offer some insight?
Chris
attached mail follows:
In a message dated 3/16/01 9:39:16 AM Eastern Standard Time,
phpretard
yahoo.com writes:
> I thought Search engines couldnt spyder dynamic pages such as > "1.php?foo=bar" >
True - but with the magic of Apache's mod_rewrite -- you can make a URL appear to a browser as: http://www.yourdomain.com/bar -- but on your server, it can be rewritten as: http://www.yourdomain.com/1.php?foo=bar.
mod_rewrite is extremely cool. you can read more about it at: http://httpd.apache.org/docs/mod/mod_rewrite.html
don
attached mail follows:
or you can use Apache to ForceType bar to use PHP.
then just write a generic URL parsing script and you're done.
if you want it for all of your URL's, make DocumentRoot a PHP script. you might tricky problems with images and other non-script files, but that's ok because you can just check for the file extensions, echo he mie tpye and readfile() it.
-aaron
At 1:15 PM -0500 3/16/01, DynamicHTML
aol.com wrote:
>In a message dated 3/16/01 9:39:16 AM Eastern Standard Time,
>phpretard
yahoo.com writes:
>
>
>> I thought Search engines couldnt spyder dynamic pages such as
>> "1.php?foo=bar"
>>
>
>True - but with the magic of Apache's mod_rewrite -- you can make a URL
>appear to a browser as: http://www.yourdomain.com/bar -- but on your server,
>it can be rewritten as: http://www.yourdomain.com/1.php?foo=bar.
>
>mod_rewrite is extremely cool. you can read more about it at:
>http://httpd.apache.org/docs/mod/mod_rewrite.html
>
>don
attached mail follows:
Can this be used via .htaccess in a shared hosting situation?
----- Original Message -----
From: <DynamicHTML
aol.com>
To: <php-general
lists.php.net>
Sent: Friday, March 16, 2001 10:15 AM
Subject: Re: [PHP] Shopping Carts and Sessions
> In a message dated 3/16/01 9:39:16 AM Eastern Standard Time,
> phpretard
yahoo.com writes:
>
>
> > I thought Search engines couldnt spyder dynamic pages such as
> > "1.php?foo=bar"
> >
>
> True - but with the magic of Apache's mod_rewrite -- you can make a URL
> appear to a browser as: http://www.yourdomain.com/bar -- but on your
server,
> it can be rewritten as: http://www.yourdomain.com/1.php?foo=bar.
>
> mod_rewrite is extremely cool. you can read more about it at:
> http://httpd.apache.org/docs/mod/mod_rewrite.html
>
> don
>
attached mail follows:
In a message dated 3/16/01 2:02:07 PM Eastern Standard Time,
jeff
datadrivendesign.com writes:
> Can this be used via .htaccess in a shared hosting situation? >
I believe it can -- never done it personally though...
don
attached mail follows:
> YES! > The only "problem" will be that these .php pages will be > maybe 5% slower since PHP is "parsing" them.
That and all the links pointing to the old .html files will be broken...
So if you mix PHP and HTML in a file, PHP will be slower to parse those files? I thought it was smart enough to parse only what was within the recognized start and end tags (<? ?>, <?php ?>, <script language="php"></script>, etc)?
Chris
attached mail follows:
I'va migrated from apache 1.3.12 + php 3.0.16 to apache 1.3.19 + php 4.0.2. but <? phpinfo(); ?> still displaying old info like : Configure Command : ./configure' '--with-mysql=/usr/local/mysql' '--with-apache=../apache_1.3.12' ........ Apache Version : Apache/1.3.12 some informations displayed correcly : page title : PHP Version 4.0.2 SERVER_SOFTWARE : Apache/1.3.19 (Unix) PHP/4.0.2
help me, please.
--revin--
attached mail follows:
I've migrated from apache 1.3.12 + php 3.0.16 to apache 1.3.19 + php 4.0.2. but <? phpinfo(); ?> still displaying old info like : Configure Command : ./configure' '--with-mysql=/usr/local/mysql' '--with-apache=../apache_1.3.12' ........ Apache Version : Apache/1.3.12 some informations displayed correcly : page title : PHP Version 4.0.2 SERVER_SOFTWARE : Apache/1.3.19 (Unix) PHP/4.0.2 help me, please.
--revina--
attached mail follows:
I've migrated from apache 1.3.12 + php 3.0.16 to apache 1.3.19 + php 4.0.2. but <? phpinfo(); ?> still displaying old info like : Configure Command : ./configure' '--with-mysql=/usr/local/mysql' '--with-apache=../apache_1.3.12' ........ Apache Version : Apache/1.3.12 some informations displayed correcly : page title : PHP Version 4.0.2 SERVER_SOFTWARE : Apache/1.3.19 (Unix) PHP/4.0.2 help me, please. --revina--
attached mail follows:
Hi, I've got a db with a username and password in it. I can let people log in, like SELECT * FROM table WHERE username = username AND password = password.
But how can I add an access level column so that I can have different levels of security. So admin's can read everything, but users can only read certain sections.
How could I add to my db and structure a query?
Any ideas would be good,
Cheers,
Jord
attached mail follows:
One solution: You set up a separate table: user_level { level_id (unsigned int), level_description (varchar 100 )}
it looks like this: level_id level_description 100 admin 200 user
In your user table you add level_id as a field. After a good validation of the user (username and password), you grab the level_id and make a session variable out of it.
Than in you page you decide what you show or not to the user based upon the level_id
if( $level_id <= 100 ){ show link for admin } if( $level_id >= 101 && $level_id <= 200 ){ show link for user }
Having another table and separating the id by a hundred number lets you add more security level as the site grows.
This is one solution, I am shure there is many more and I would like to see what other people do as well...
py
----- Original Message -----
From: Jordan Elver <jord.elver
virginnet.co.uk>
To: PHP General Mailing List <php-general
lists.php.net>; PHP DB Mailing
List <php-db
lists.php.net>
Sent: Friday, March 16, 2001 7:28 PM
Subject: [PHP] Login System with access levels
> Hi,
> I've got a db with a username and password in it. I can let people log in,
> like SELECT * FROM table WHERE username = username AND password =
password.
>
> But how can I add an access level column so that I can have different
levels
> of security. So admin's can read everything, but users can only read
certain
> sections.
>
> How could I add to my db and structure a query?
>
> Any ideas would be good,
>
> Cheers,
>
> Jord
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
"Jordan Elver" <jord.elver
virginnet.co.uk> wrote in message
news:01031619280300.01338
localhost...
> Hi,
> I've got a db with a username and password in it. I can let people log in,
> like SELECT * FROM table WHERE username = username AND password =
password.
How about you make another table with permisions and have a many-to-many relationship with the users table. Then you'll just check if the user has the given permission. It's harder to do but you'll apresiate the flexibility it provides.
--yavo
attached mail follows:
"Jordan Elver" <jord.elver
virginnet.co.uk> wrote in message
news:01031619280300.01338
localhost...
> Hi,
> I've got a db with a username and password in it. I can let people log in,
> like SELECT * FROM table WHERE username = username AND password =
password.
How about you make another table with permisions and have a many-to-many
relationship with the users table. Then you'll just check if the user has
the given permission. It's harder to do but you'll apresiate the flexibility
it provides.
--yavo
attached mail follows:
First, I would NOT store passwords in a database. Rather, I'd store a hash based upon the password and username. Storing a password is dangerous as regards security.
Second, if you're asking for syntax on how to add the security level column: ALTER TABLE mytable ADD access tinyint unsigned not null default "0";
This will allow you to assigned security levels from 0 to 255. You would set 0 as the lowest level and 255 (admin) as the highest.
While you're at it, add the has security hash entry (discussed above): ALTER TABLE mytable ADD md5hash char(32) not null default "";
Hashes are always 32 characters.
Finally, as far as a query: SELECT * FROM mytable WHERE access <= $level;
This will permit the searcher to locate anything whereby the level is at
$level or lower.
-----Original Message-----
From: Jordan Elver [mailto:jord.elver
virginnet.co.uk]
Sent: Friday, March 16, 2001 1:28 PM
To: PHP General Mailing List; PHP DB Mailing List
Subject: [PHP-DB] Login System with access levels
Hi, I've got a db with a username and password in it. I can let people log in, like SELECT * FROM table WHERE username = username AND password = password.
But how can I add an access level column so that I can have different levels
of security. So admin's can read everything, but users can only read certain
sections.
How could I add to my db and structure a query?
Any ideas would be good,
Cheers,
Jord
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribelists.php.net For additional commands, e-mail: php-db-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Just a note...you can hash the password in the database.....
Rick Emery wrote:
> First, I would NOT store passwords in a database. Rather, I'd store a hash
> based upon the password and username. Storing a password is dangerous as
> regards security.
>
> Second, if you're asking for syntax on how to add the security level column:
> ALTER TABLE mytable ADD access tinyint unsigned not null default "0";
>
> This will allow you to assigned security levels from 0 to 255. You would
> set 0 as the lowest level and 255 (admin) as the highest.
>
> While you're at it, add the has security hash entry (discussed above):
> ALTER TABLE mytable ADD md5hash char(32) not null default "";
>
> Hashes are always 32 characters.
>
> Finally, as far as a query:
> SELECT * FROM mytable WHERE access <= $level;
>
> This will permit the searcher to locate anything whereby the level is at
> $level or lower.
> -----Original Message-----
> From: Jordan Elver [mailto:jord.elver
virginnet.co.uk]
> Sent: Friday, March 16, 2001 1:28 PM
> To: PHP General Mailing List; PHP DB Mailing List
> Subject: [PHP-DB] Login System with access levels
>
> Hi,
> I've got a db with a username and password in it. I can let people log in,
> like SELECT * FROM table WHERE username = username AND password = password.
>
> But how can I add an access level column so that I can have different levels
>
> of security. So admin's can read everything, but users can only read certain
>
> sections.
>
> How could I add to my db and structure a query?
>
> Any ideas would be good,
>
> Cheers,
>
> Jord
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe
lists.php.net
> For additional commands, e-mail: php-db-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- ___________________________________________________________ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net
attached mail follows:
Hi! Ok, this is not a question about PHP, but since this is such a great discussion forum, I am certain it is a good place to get started with a new technology.
The thing is I have a DTD specification and I want to translate it into a DB schema, and then create an "add-delete-modify" application.
OK!! It might seem I am asking too much, but I don´t even know if this can be done, so any comments will appreciated. It would be great if you just gave me a link to a good XML and DTD tutorial.
I also want to know if I can create XML documents with PHP, what kind of software do i need to parse those documents, and how can I put the data in my DB. Any clue, and I mean ANY, will be appreciated.
THANKS A LOT IN ADVANCE! Cheers, Diego.
attached mail follows:
Hi! Ok, this is not a question about PHP, but since this is such a great discussion forum, I am certain it is a good place to get started with a new technology.
The thing is I have a DTD specification and I want to translate it into a DB schema, and then create an "add-delete-modify" application.
OK!! It might seem I am asking too much, but I don´t even know if this can be done, so any comments will appreciated. It would be great if you just gave me a link to a good XML and DTD tutorial.
I also want to know if I can create XML documents with PHP, what kind of software do i need to parse those documents, and how can I put the data in my DB. Any clue, and I mean ANY, will be appreciated.
THANKS A LOT IN ADVANCE! Cheers, Diego.
attached mail follows:
Hi all,
I've recently discovered the extract function (thanks to the poster regarding it), and have found it to save lots of time. I'm having a problem though. 99 times out of 100 when someone thinks they've found a "bug" it's actually their misuse of the function, so i'm pretty sure this is the case with me. Anyway, here's the deal:
I have a function. Inside this function i have
global $name, $type, $location; (and others)
I make a call to a mysql database and get the result in $result. Then I used to do this:
$name = $row["name"]; $type = $type["type"]; etc.
extract makes this a lot nicer. However, at the end of this function i call another function. This also uses the same global variables. Previous this worked fine. But now that i'm using extract, while i do have access to the variables in the function, i can't get them in the next.
My guess is that the way extract works, (somehow, who knows), its creating a local variable named $name and setting my info to that, as opposed to $name = $row["name"] which sets the global. So, even though i can access $name in the function, its lost to the next. This isn't a huge issue--i can go back to the old way, or pass the variables in the function, but there are enough that i wanted to know if anyone else has experienced this. Is there some way to tell extract to extract the variables and set the results to the global versions? Maybe i'm way off and its a small code error, but I really do doubt this, as i've commented out lines and gone back and forth and get the same result. here's the basic idea though: function tester(){ global $name; $row = mysql_fetch_array($sql_result); $name = $row["name"]; nextone(); /*this works fine, but if i have extract($row) and comment out the $name = $row["name"] line, then i can't see the variable in the next function*/
} function nextone(){ global $name; echo $name; }
any ideas?
thanks, jack
attached mail follows:
Is there a workaround under php3 for include_once ?
Thanks
___________________________________________________________ Jack Sasportas
attached mail follows:
> Is there a workaround under php3 for include_once ?
if( !$this_include_file_only_variable_declared ) { $this_include_file_only_variable_declared = 1;
// your include script here
}
And if you attempt to include the file more than once in a script, the IF() will resolve true and skip past the include script.
Chris
attached mail follows:
there's a few worthy notes within user comments under include() in manual, have a look here :
http://www.php.net/manual/en/function.include.php
regards, philip
On Fri, 16 Mar 2001, Jack Sasportas wrote:
> Is there a workaround under php3 for include_once ?
>
> Thanks
>
> ___________________________________________________________
> Jack Sasportas
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
try something like
define("CONFIGURATION", "YES"); in xyz-inc-1.php
if (CONFIGURATION != "YES") { include("/xyz-inc-1.php"); in the script
--- Jack Sasportas <jack
innovativeinternet.com>
wrote:
> Is there a workaround under php3 for include_once ?
>
> Thanks
>
>
___________________________________________________________
> Jack Sasportas
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
attached mail follows:
Hello, (Using both 4.0.4pl1 and latest CVS as of today.) I have been having similar problems with defining my own session handling routings and register_globals. If register_globals is off, a new session doesn't seem to call the "write" handler, thus the session never gets stored. With register_globals=on, the session gets stored correctly.
I've done some testing and found out a fix to the problems which ends up being better than keeping register_globals on. Here's my code for my "read" handler (PostgreSQL-based).
------------------ function sess_read($sid) { global $SESS_DBH;
$qry = "SELECT value FROM sessions WHERE sid = '$sid'"; $qid = pg_exec($SESS_DBH, $qry);
if (pg_numrows($qid) > 0) { list($value) = pg_fetch_row($qid, 0); return $value; }
return ""; } -------------------
Originally (last line in function above)php-general
lists.php.net, I was
returning a FALSE instead of a blank string. When I switched over to
returning a blank string (when there wasn't any data in the session
database), my "write" handler gets called correctly.
I'm not sure if this will fix anybody else's problems, but if you change your read handler to return a blank string instead of a FALSE condition, it may start working for you as well! (If it DOES help you out, please let me know.)
Jaime Bozza
attached mail follows:
I am attempting to create a dynamic url from a field that has the value of the dynamic url.
Here is the scenario:
1 - Field in MySql database = $logo_link_var = page.php3?afl=$afl&site=$site&page=contact&ad=$ad_type 2 - Select logo_link_var from database and assign to $logo_link -- code is:
$search_query = "select site.logo_link_var from site where ( $afl = site.afl_name )"; $result = mysql_query ( $search_query );
$logo_link = mysql_result ( $result, 0, "site.logo_link_var" ); (only 1 record matches query) $logo = "<a href='$logo_link'><img src='../allimages/$logo_graphic' width='$logo_link_width' height='$logo_link_height' border='0' alt='$logo_alt_text'></a>";
When I click on the link I receive parse errors -- and the window displays this section in the url:
page.php3?afl=$afl&site=$site&page=contact&ad=$ad_type
The program is not finding the $afl or $site values
if I create the $logo variable as follows -- it works OK.
$logo = "<a href='page.php3?afl=$afl&site=$site&page=contact&ad=$ad_type'><img src='../allimages/$logo_graphic' width='$logo_link_width' height='$logo_link_height' border='0' alt='$logo_alt_text'></a>";
Any suggestions?
attached mail follows:
Helloppl, a problem with a file_upload form :-( Here is what I've done so far:
File test.php which has the form is this: <HTML> <BODY> <?php include("handle_upload.php"); ?> <FORM ENCTYPE="multipart/form-data" ACTION="<?php print $PHP_SELF ?>" METHOD="POST"> <INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="64000"> <INPUT TYPE="submit" VALUE="go!"> <INPUT TYPE="file" NAME="up_file"> </FORM> </BODY> </HTML>
Here is the included php file (handle_upload.php): <?php if(isset($up_file)){ print "<P>You have succesfully sent the following file:<BR>\n"; print "path: $up_file<BR>\n"; print "filename: $up_file_name<BR>\n"; print "filesize: $up_file_size<BR>\n"; print "filetype: $up_file_type<BR>\n"; } ?>
When one submits a file (file exists and is within given MAX_FILE_SIZE boundaries), the handle_upload.php condition is true, so I get the following output in my browser:
You have succesfully sent the following file: path: /tmp/phpvtMKjj filename: test2.jpg filesize: 27365 filetype: image/jpeg <and again the form to upload another file>
Then I go and check under /tmp and I do not find anything :-(
I have in my php.ini: ;;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; file_uploads = On upload_tmp_dir = /tmp upload_max_filesize = 2M
I am using Apache 1.3.14 with DSO and php is a .so and Php is version 4.0.4
It is not a permissions problem cause I checked the Apache logs, and all dirs that need to be accessed are actually writable by the httpd user. I have read through "Handling file uploads" (http://www.php.net/manual/it/features.file-upload.php) and I don't see what is wrong :-(
thanks ins advance, thalis
attached mail follows:
Hello, I want to thank Kathleen and other people for ideas about uploading / displaying images using PHP and Mysql. I checked these ideas and they work very well, so I will use them into my program. For storing and retrieving image streams, I used addslashes and stripslashes PHP functions.
The only problem still remaining is on client-side point of view. When somebody going to upload file, browsers open little box to let user choose file (<input type="FILE"...>). I wish user to know somewhat is the image he/she is going to upload, so I want to display this image before user uploading. For this action, I would be able to control the 'BROWSE' button that appears on form. Since this button doesn't apply to POST method, nor it will execute function on Form command, how can I control this action? Is there some doc explaining features of these objects?
Thanks
Miguel
attached mail follows:
Don't know how to do this, but basically I beleive Java will be the only way to execute on the fly and load the image in question so it can be approved so to speak which is what I beleive you are trying to do....
Good Luck...
Mig wrote:
> Hello, I want to thank Kathleen and other people for ideas about uploading / displaying images using PHP and Mysql.
> I checked these ideas and they work very well, so I will use them into my program. For storing and retrieving image streams, I used addslashes and stripslashes PHP functions.
>
> The only problem still remaining is on client-side point of view. When somebody going to upload file, browsers open little box to let user choose file (<input type="FILE"...>).
> I wish user to know somewhat is the image he/she is going to upload, so I want to display this image before user uploading. For this action, I would be able to control the 'BROWSE' button that appears on form.
> Since this button doesn't apply to POST method, nor it will execute function on Form command, how can I control this action?
> Is there some doc explaining features of these objects?
>
> Thanks
>
> Miguel
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- ___________________________________________________________ Jack Sasportas
attached mail follows:
Hello, i'm working with PHP, and i need use a classes that this company have developed in java, can i use it from php? ...yes, i know that i can, but, when i make the configuration of the php.ini, run the hello example, all rights, but, when i make a class that use a frame of awt, for show a window, doesn't work, WHY?, the errors are, of Null pointer, and not found classes, but?, i need copy all classes of the basic structure of java, in my java.classpath?...where i can found more info? :-) Robert
attached mail follows:
If you want to e mail me privately I'll go into greater detail. But, to be brief, let me just say this.
DON'T DO IT.
Use jsp or python or anything else that talks to java. I've tried every available permutation of php/java on SEVERAL different plat- forms with simlilarly bad results on all of them.
Just say NO.
Brad
On Fri, 16 Mar 2001, Celestino Roberto Alejandro wrote:
> Hello, i'm working with PHP, and i need use a classes that this company have developed in java, can i use it from php? > ...yes, i know that i can, but, when i make the configuration of the php.ini, run the hello example, all rights, but, when i make a class > that use a frame of awt, for show a window, doesn't work, WHY?, the errors are, of Null pointer, and not found classes, but?, i need copy all classes of the basic structure of java, in my java.classpath?...where i can found more info? > :-) > Robert >
attached mail follows:
Can a defined()'d CONSTANT be made persistent between pages? According to my experiments, the answer is "no". Am I missing something?
TIA
Kirk
attached mail follows:
put your defines in an include that all your pages include.
-aaron
At 2:28 PM -0700 3/16/01, Johnson, Kirk wrote:
>Can a defined()'d CONSTANT be made persistent between pages? According to my
>experiments, the answer is "no". Am I missing something?
>
>TIA
>
>Kirk
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Is there a way to determine if an array is associative or not? Maybe something similar to the is_array() function ??
Thanks,
JOE
attached mail follows:
Joe wrote: > Is there a way to determine if an array is associative or not? Maybe > something similar to the is_array() function ??
There are only assotiative arrays in PHP.
regards Wagner
-- Assumption is the mother of all fuck-ups.
attached mail follows:
Oops, how embarassing :-( My son must have been playing with it. Thanks!
----- Original Message -----
From: Chris Mulcahy <cmulcahy
poboxes.com>
To: 'Joe' <joe
nitewaryr.com>
Sent: Friday, March 16, 2001 3:51 PM
Subject: RE: [PHP] Associative vs normal arrays
> Joe:
>
> Were you aware your system time was set to March 16, 2018?
>
> Chris
>
> -----Original Message-----
> From: Joe [mailto:joe
nitewaryr.com]
> Sent: Friday, March 16, 2018 3:44 PM
> To: php-general
lists.php.net
> Subject: [PHP] Associative vs normal arrays
>
>
> Is there a way to determine if an array is associative or not? Maybe
> something similar to the is_array() function ??
>
> Thanks,
>
> JOE
>
attached mail follows:
On Fri, Mar 16, 2001 at 11:43:17PM +0100, Alexander Wagner wrote: > Joe wrote: > > Is there a way to determine if an array is associative or not? Maybe > > something similar to the is_array() function ?? > > There are only assotiative arrays in PHP.
PHP has associative and numeric (normal) arrays. But is_array() says only if it is an array or not. The distinction could only be made if you look at keys. Keys can be integers or strings. I hope this was correct, if not, Andrei can correct me :)
-Egon
-- http://www.linuxtag.de/ http://php.net/books.php http://www.concert-band.de/ http://www.php-buch.de/
attached mail follows:
is there a way in php if a page is supposed to be in frames and the user tries to view it outside of the frame it automatically reloads the page into the frame.
thanks
Randy
attached mail follows:
is there a way in php if a page is supposed to be in frames and the user tries to view it outside of the frame it automatically reloads the page into the frame.
thanks
Randy
attached mail follows:
Hi,
I built the latest PHP4 to use it as NSAPI with postgress connection:
./configure --with-nsapi=/usr/netscape/server4/ --with-pgsql=/var/lib/pgsql --enable-libgcc --enable-track-vars make make install "stop web server" & "restart"
,but when I try to pg_connect to postgres, I get the following:
PHP Fatal Error: call to undefined function : pg_connect line 8
I dont understand why this is happening. What can I do? I searched for this error and could not find any help.
Thanks in advance
attached mail follows:
El Vie 16 Mar 2001 19:53, Norberto Rojas escribió: > Hi, > > I built the latest PHP4 to use it as NSAPI with postgress connection: > > ./configure --with-nsapi=/usr/netscape/server4/ > --with-pgsql=/var/lib/pgsql --enable-libgcc --enable-track-vars > make > make install > "stop web server" & "restart" > > ,but when I try to pg_connect to postgres, I get the following: > > PHP Fatal Error: call to undefined function > > : pg_connect line 8
Norberto, check the compilation (make command), because you are simple not compiling PHP with postgres support. Check the configure, to see if it really finds the postgres distro, or if it checks it, doesn't find it, and says "I won't give support for postgres".
> I dont understand why this is happening. > What can I do? I searched for this error and could not find any help. > > Thanks in advance
-- System Administration: It's a dirty job, but someone told me I had to do it. ----------------------------------------------------------------- Martín Marqués email: martinmath.unl.edu.ar Santa Fe - Argentina http://math.unl.edu.ar/~martin/ Administrador de sistemas en math.unl.edu.ar -----------------------------------------------------------------
attached mail follows:
this is the code: $page .= "<input type =\"radio\" name=\"pageid\" value\"$info[PageID]\">";
this is the html source generated: <input type ="radio" name="pageid" value"index">
and this is what $pageid returns: 'on'
2 questions is why? and how do i fix it?
thanks to all who take the time to awnser :-) ~Fred
attached mail follows:
This question baffles me. Just to clarify do you have at least two radio buttons on this page and are they both under the same name?
It also could be if the HTML you mailed the list is the same you have in your generated page then you may want an '=' sign between the value"index"
.:: Nathan Cook [ ncook
pcsedu.com ] ::.
PCS Edventures.com
Programmer :: Systems & Network Administrator
[ phone - 208.343.3110 ][ pager - 208.387.9983 ]
\"You know you\'re in big trouble when you try to escape character your e-mail\'s\"
----- Original Message -----
From: "Fred" <fred
aybsl.net>
To: <php-general
lists.php.net>
Sent: Friday, March 16, 2001 4:22 PM
Subject: [PHP] Radio Button Returns (Pleasre Read)
> this is the code:
> $page .= "<input type =\"radio\" name=\"pageid\"
> value\"$info[PageID]\">";
>
> this is the html source generated:
> <input type ="radio" name="pageid" value"index">
>
> and this is what $pageid returns:
> 'on'
>
> 2 questions is
> why? and how do i fix it?
>
> thanks to all who take the time to awnser :-)
> ~Fred
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hi there,
I was using POST method on all my forms but I had to change them to GET because of "expired page" errors (I noticed this as soon as I began using PHP4 sessions).
It seems that GET works well so far, but I wonder if there's something else I should be aware of. Are both methods equivalent?
TIA,
Jorge Alvarez
attached mail follows:
Okay, I have a bugger here. I am working on a script for my site to parse articles, comments, so that people use a special markup (like [b] [/b] for <b> </b>, etc). One of the feature I want to implement is a [code] feature that will parse the code between [code] and [/code] like it would in hightlight_string().
The problem is, I want this for all the code that could possible be represented in a comment or an article. In some of the articles I write, I have several examples of the code, and I would like each instance put through the above process, but not the entire article.
So, I have hit a snag. First, highlight_string actually prints out the results, so as far as I know, it doesn't return anything (http://www.php.net/manual/en/function.highlight-string.php) except for a true/false result.
What I want to have happen is parse the document, and take the stuff between the [code] tags, and parse that out. Of course, the entire article is being put through, so I imagine I will have to be using regular expressions or explode(), though I expect more the former.
For example, take this:
------------- A quick overview of echo, and how and why you should try and use inline HTML instead of outputting with echo. Just something real quick and easy that I think is rather important.
A quick overview of echo, and how it compares to coding your HTML as Inline. Test results have shown that inline display is 2 times faster than echo.
echo - 0.063347 secs inline - 0.035276 secs
For example: [code] <?phpif ($yes != "yes"){ echo "Yes is not Yes";}?> [/code] If you compare that to this: [code] <?phpif ($yes != "yes"){ ?>Yes is not Yes <?php}?> [/code] While this may not be immediately noticeable in small programs, if the program is large, or it starts to recieve a lot of hits, than you will appreciate the little extra speed that inline prints give you. Sure, it requires a bit of extra work on your part, but it does make for nicer programming.
Also, if you think about it, its much easier to use inline than echo'ing everything you do. No more escaping the " in the HTML in the echo's. And you should use the " even if you plan on using echo, as its good form. ---------------
Now, that would be in the database. When the article is veiwed, it is sent through a parser. The parser will pick up the code tags, and parse what is in between through highlight_string().
Unfortunately, like I said, I cannot figure out how to do this, maintaining the structure of the article, while keeping it in one area. I don't want to create a seperate table to hold the code, and have that inserted into the articles as need parsed, just doesn't seem efficient enough.
Any help would be appreciated. If you could point me to even a script that does something like this, I could hack my way through it, but I have don't know where to start with this. Thanks.
Jason Lotito
jason
lehighweb.com
attached mail follows:
Hello all members, i am confuse to pass my class object over page (read my quote below). can u give a little example to demonstrate this using serialize and unserialize function. thaks for your attention..
andrie
Tuesday, March 13, 2001, 9:03:08 PM, Loe nulis gini:
PK> do you have register_globals enabled in your php.ini? you also have to have PK> the class definition available when unserializing it to properly reconstruct PK> the class with all the methods. if you're using PHP4 it's quite handy to use PK> the built-in session functionality to implement persistent classes.
PK> Pavel
PK> ----- Original Message -----
PK> From: "andrie" <andrie
ajk.its-sby.edu>
PK> To: <php-db
lists.php.net>
>> Hello php-db,
>>
>> if i have a class
>> class myDog {
>> VAR $name;
>> Function bark();
>> }
>>
>> $dog = new myDog;
>>
>> and i want to pass this class over page. someone in this forum said
>> to me to use serialize and pass it using cookies.
>> setcookie("dog", serialize($dog));
>> the question is, when i used unserialize to get this class from
>> other page ,
>> unserialize($dog);
>>
>> i have found out that i can find my class structure or any
>> properties and it values there.
>> anybody can help me ?
>>
>> --
>> Best regards,
>> andrie mailto:andrie
ajk.its-sby.edu
attached mail follows:
I am having a helluva time getting PHP 4.0 to work with my apache browser. I add code for the PHP software for instance: <?php phpinfo(); ?> And all I get is a blank screen. I built php as an apache DSO. I know it is getting loaded cause it bitches if the libphp file is not available. I have recompiled several time. I'd sure like some help with this. Spending way to much time getting it to work and no time developing the app.
-- <?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" />
Don .~.
Weeks /V\ L I N U X
dweeks
ipVerse.com // \\ >Phear the Penguin<
dlweeks
home.com /( )\
^^-^^
- image/bmp attachment: ipv.bmp
attached mail follows:
I have a form that allows user to either upload a file from the client to the server or take the contents of the textarea and dump it in a new file on the server. Unfortunately I have tried to make the form write the new file to the server and at the same time redirect to the this new file. It seems that php takes a second to write the new file and therefore only works if I delay the process by redirecting as follows: printf ("<meta http-equiv=\"refresh\" content=\"3;URL=http://coolsite/test/newfile.html\">"); Is there any better process I can use?
_____________________________________________________________ Pick up your email anywhere in the world ---> http://www.remail.net
attached mail follows:
In article <avj1bts1sun6d1vj4f29smqpgubgcgsijh
4ax.com>, keyser.soze
soon.com says...
> On 12 Mar 2001 03:51:13 -0800, nick
sensei.co.uk (Nick Davies) wrote:
>
> >How about linux ones?
> >
> >I just tend to use vim or emacs but i'm sure there are some out there.
>
> I've used Xemacs. Do you know if there is a PHP mode for it?
>
> Otherwise you could check out Screem (www.screem.org) or Quanta
> (quanta.sourceforge.com).
>
> V
>
>
yes, there is a number of PHP modes for Xemacs... Go here (http://www-public.tu-bs.de:8080/ ~y0008422/krabutzig/emacsphp.html) for a good listing.
-- Jeff Stuart jstuartneo.rr.com
attached mail follows:
i ve 20 film names stored at database, and i want to show them in alphebetical order. And i want to show 10 of them at each page. Nothing is wrong here. At the end of each film name there is a CHECKBOX, here is the code:
$count = 0; while ($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td valign=middle align=left>" ; // getting film names here echo $row['film'] ; echo "</td>" ;
$sepet = $row['tur'] ; // putting checkboxes here $sepet2 = $row['film']; $sepetsonuc = $sepet. " " .$sepet2 ; echo "<input type=checkbox name=\"siparis[]\" value=\"$sepetsonuc\">" ;
echo "</td></tr>" ; $count++; }
its good till here. everything is working... now since there are two pages i want to register checkbox variables which are CHECKED with "session_register "so that i can use them at the second page. without that my code simply cant remember the checked ones at the previous pages.
Can someone help me to register these checkbox values into sessions ? PLS dont refer me to php.net manual/sessions :(
i spent my last two days working on this so really need help :( any help is HIGHLY APPRECIATED!!! thx in adv.
attached mail follows:
php_ldap.dll also requires libsasl.dll, so make sure you move this dll to \winnt\system32 as well.
Brett
"Alain ROMERO" <a.romero
free.fr> wrote in message
news:3AA642EF.F8C7A27
free.fr...
I copy 'msvcrtd.dll' in winnt\system32 and php3 works fine, but not php4
HELP !!!!!
Alain ROMERO a écrit :
> PHP 4.0.2 on Win32
> or PHP 3 on Win32
> extension=php_ldap.dll is on in the php.ini file
>
> I get 'Unable to load php_ldap.dll' (PHP4) when I call a php file ?
> I get 'Call to an unsupported function ldap_connect()' (PHP3) ?
>
> Help please ?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
With InterBase using persistent connections will save a lot of time. However, you need to be extra careful with how you manage transactions. InterBase uses a versioning engine for transaction management and you can easily screw up the system performance if you don't manage your transactions correctly.
Make sure you use short quick transactions. Don't leave a transaction open, always make sure the transaction is committed or rolledback. Lingering transactions are probably the biggest performance problem you'll encounter with InterBase.
Brett
""Daniel Grace"" <rubein
earthlink.net> wrote in message
news:004101c0a992$80fa98c0$b4bc9a40
hades...
> On Saturday, March 10, 2001 at 7:03 AM, Todd Cary
<todd
aristesoftware.com>
> wrote:
>
> > I have some questions about PHP and it's interaction with a DB (namely,
> > Interbase). My client's application uses a DB extensively and I am not
> > clear about opening and closing a DB - the price one pays.
> >
> > First, I notice that the approximate time to open a connection to my DB
> > on my test system is 1 second with a "locate time" of another second.
> > So, 50% of the time is opening the DB.
> -- snip --
>
> I haven't used Interbase, but if it's like most of PHP's database
> interfaces, it isn't too critical to worry about closing the database
> connection. PHP will do so automatically when your script ends.
>
> -- unsnip --
> >
> > The next question envolves closing the DB and returning memory.
> >
> > ibase_free_result;
> > ibase_close($dbh);
> >
> > What will happen if in my code I forget to do this in a place or two?
> > Will the system eventually crash?
> -- snip --
>
> The Interbase extensions to PHP support persistent connections:
> http://www.php.net/manual/en/function.ibase-pconnect.php (see
> mysql_pconnect() as well for more general info on persistent connections).
> With persistent connections, the overhead in connecting to the database
> backend is minimized since the same connection can be shared across
multiple
> pages. This won't work with the CGI version of PHP however.
>
> - Daniel Grace <http://dewin.oldbattery.com/>
>
> "Space may be the final frontier but its made in a Hollywood basement."
> - Red Hot Chili Peppers - Californication
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
On a related noted, does PHP have JDBC support?
I'm unable to find anything about this - anyone know if it's possible?
regards, andrew
On 3/15/01 5:49 PM, "bard" <mccrorey
optushome.com.au> wrote:
> If you want to e mail me privately I'll go into greater detail. > But, to be brief, let me just say this. > > DON'T DO IT. > > Use jsp or python or anything else that talks to java. I've tried > every available permutation of php/java on SEVERAL different plat- > forms with simlilarly bad results on all of them. > > Just say NO. > > Brad > > On Fri, 16 Mar 2001, Celestino Roberto Alejandro wrote: > >> Hello, i'm working with PHP, and i need use a classes that this company have >> developed in java, can i use it from php? >> ...yes, i know that i can, but, when i make the configuration of the php.ini, >> run the hello example, all rights, but, when i make a class >> that use a frame of awt, for show a window, doesn't work, WHY?, the errors >> are, of Null pointer, and not found classes, but?, i need copy all classes of >> the basic structure of java, in my java.classpath?...where i can found more >> info? >> :-) >> Robert >> >
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]