Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
John Nichel wrote: Well, you're not telling fgets how much to read for one, and I'd do this a different way to begin with... if ( $file = file ( $filename ) ) { foreach ( $file as $line ) { if ( $file != ) { echo ( $line . @mdah.state.ms.us ); } } } else {

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread John Nichel
Adam Williams wrote: John Nichel wrote: Well, you're not telling fgets how much to read for one, and I'd do this a different way to begin with... if ( $file = file ( $filename ) ) { foreach ( $file as $line ) { if ( $file != ) { echo ( $line . @mdah.state.ms.us );

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
got it! i had to have my block of code look like this: if ( $file = file ( $filename ) ) { foreach ( $file as $line ) { if ( $line != ) { $line = trim($line); echo ( $line . @mdah.state.ms.us ); echo \n; } } } else { echo (

Re: [PHP] HOSTNAME Environment variable

2006-02-21 Thread Kim Christensen
On 2/21/06, Ruben Rubio Rey [EMAIL PROTECTED] wrote: How to set Hostname environment variable? (It contains the servers name, not the servers domain) Its a Linux server. Try the hostname command. Depending on your linux distro, you might want to edit /etc/hostname manually afterwards to

Re: [PHP] HOSTNAME Environment variable

2006-02-21 Thread Ruben Rubio Rey
Kim Christensen wrote: On 2/21/06, Ruben Rubio Rey [EMAIL PROTECTED] wrote: How to set Hostname environment variable? (It contains the servers name, not the servers domain) Its a Linux server. Try the hostname command. Depending on your linux distro, you might want to edit

Re: [PHP] HOSTNAME Environment variable

2006-02-21 Thread Kim Christensen
On 2/21/06, Ruben Rubio Rey [EMAIL PROTECTED] wrote: Strange. Its already set (in hostname and echo $HOSTNAME). I have realized that is working on version (in my servers) 5.0.5 and its not working in 5.0.4 version. Is it an old bug? Im updating, we ll see Have you rebooted your machine

Re: [PHP] HOSTNAME Environment variable

2006-02-21 Thread Richard Lynch
On Tue, February 21, 2006 1:37 am, Ruben Rubio Rey wrote: How to set Hostname environment variable? (It contains the servers name, not the servers domain) Its a Linux server. The environment variables come *FROM* the environment into PHP. If you want them changed, you have to change your

[PHP] HOSTNAME Environment variable

2006-02-20 Thread Ruben Rubio Rey
Hi, How to set Hostname environment variable? (It contains the servers name, not the servers domain) Its a Linux server. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread Jochem Maas
Chris wrote: Hi Matt, I use define's. me too. mostly because unless you use the runkit extension or something you can't undefine or change the values of a constant. bare in mind though that define() is horribly slow (to paraphrase Rasmus) which may be the reason many projects choose to use

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread Matt Arnilo S. Baluyos (Mailing Lists)
On 2/9/06, Jochem Maas [EMAIL PROTECTED] wrote: bare in mind though that define() is horribly slow (to paraphrase Rasmus) which may be the reason many projects choose to use variables instead. see here: Thanks Chris and Jochem! That should've been my follow up question - which is, if define()

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread tedd
Matt: That should've been my follow up question - which is, if define() is a lot safer and more elegant to use than variables, why do many projects use variables? My use of CONSTANCE's and variables depend upon need. If I require a constant throughout the main() portion of my code, then I

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread Barry
tedd wrote: Matt: That should've been my follow up question - which is, if define() is a lot safer and more elegant to use than variables, why do many projects use variables? My use of CONSTANCE's and variables depend upon need. If I require a constant throughout the main() portion of my

Re: [PHP] define() or $variable for application settings?

2006-02-09 Thread Paul Novitski
At 07:56 PM 2/8/2006, Matt Arnilo S. Baluyos (Mailing Lists) wrote: I have a config.inc.php file which basically contains all the configuration info that the applications needs (directory/file locations, database credentials, etc). The information there is set using the define() function.

[PHP] Re: global variable declaration

2006-02-08 Thread Barry
suresh kumar wrote: hai, this is my sample code: i am having user table with SponsorID as one field in mysql database,this is my query; for($j=0;$j5;$j++): $result=mysql_query(select * from user where SponsorID='$id[$j]' ); endfor;

[PHP] define() or $variable for application settings?

2006-02-08 Thread Matt Arnilo S. Baluyos (Mailing Lists)
Hello Everyone, I have a config.inc.php file which basically contains all the configuration info that the applications needs (directory/file locations, database credentials, etc). The information there is set using the define() function. However, I've seen some open-source projects which either

Re: [PHP] define() or $variable for application settings?

2006-02-08 Thread Chris
Hi Matt, I use define's. With variables it's easy to forget to global'ise it when you go into a function, define's don't have this issue. Matt Arnilo S. Baluyos (Mailing Lists) wrote: Hello Everyone, I have a config.inc.php file which basically contains all the configuration info that the

[PHP] Results In Variable

2006-02-06 Thread Pastor Steve
Greetings, I am attempting to put the results of a ³while² loop into a variable. Example: $result = mysql_query(³SELECT filename, page_title FROM table²); while ($row = mysql_fetch_assoc($result)) { $var = ³a href=\²$htmldir{$row[Œfilename¹]}\²{$row[Œpage_title¹]}/abr

RE: [PHP] Results In Variable

2006-02-06 Thread Peter Lauri
Put it in an array? -Original Message- From: Pastor Steve [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 8:14 PM To: PHP eMail List Subject: [PHP] Results In Variable Greetings, I am attempting to put the results of a ³while² loop into a variable. Example: $result

Re: [PHP] Results In Variable

2006-02-06 Thread Austin Denyer
On Mon, 06 Feb 2006 07:14:21 -0600 Pastor Steve [EMAIL PROTECTED] wrote: Greetings, I am attempting to put the results of a ³while² loop into a variable. Example: $result = mysql_query(³SELECT filename, page_title FROM table²); while ($row = mysql_fetch_assoc($result)) {

RE: [PHP] Results In Variable

2006-02-06 Thread Arno Kuhl
DotContent www.dotcontent.net -Original Message- From: Pastor Steve [mailto:[EMAIL PROTECTED] Sent: 06 February 2006 03:14 To: PHP eMail List Subject: [PHP] Results In Variable Greetings, I am attempting to put the results of a ³while² loop into a variable. Example: $result

[PHP] Re: test variable value?

2006-01-11 Thread James Benson
If your talking values in submitted form data I would use: if(isset($var) trim($var) == '') { echo Please give a value; } James William Stokes wrote: Hello What is the best way to determine if a variable has no value? if ($var= '') or if ($var= 'null') Can 'null' be used

[PHP] Re: test variable value?

2006-01-11 Thread David Robley
William Stokes wrote: Hello What is the best way to determine if a variable has no value? if ($var= '') or if ($var= 'null') Can 'null' be used here? Look at isset() and empty() Cheers -- David Robley You cannot achieve the impossible without attempting the absurd. -- PHP

Re: [PHP] Re: Set variable outside of scope (redo)

2006-01-06 Thread Mike Tuller
Thanks. That is what I needed. That part works now. On Jan 5, 2006, at 4:09 PM, comex wrote: if ($row[range] != ) This should be $row['range'], not $row[range], although it doesn't make a difference unless you define a constant named range. Your problem isn't actually scope, it's

[PHP] Re: Set variable outside of scope (redo)

2006-01-05 Thread Al
Mike Tuller wrote: Excuse the last post, I didn't have all the code it there. I have a table listing items in a database, and have a delete button next to each item, and I want to be able to click on the delete and delete only that record in the database and then reload the page where it would

Re: [PHP] Re: Set variable outside of scope (redo)

2006-01-05 Thread comex
if ($row[range] != ) This should be $row['range'], not $row[range], although it doesn't make a difference unless you define a constant named range. Your problem isn't actually scope, it's that your PHP script is being called twice. Once to show the form, once to submit it. The second

Re: [PHP] Store a variable name in a database field.

2005-10-13 Thread Liam Delahunty
On 10/10/05, Richard Lynch [EMAIL PROTECTED] wrote: $email_body is a free form text field, and he wants to be able to type in anything he desires and have it pulled from the contact table. Firstly please accept my aplogies for the deay in responding to your questions, I;ve had the most

[PHP] Store a variable name in a database field.

2005-10-10 Thread Liam Delahunty
I'm sure this is a pretty basic question, but I have searched for a decent answer and can't find one. I have a client that want to be able to write newsletters (newsleters_tbl.email_body) and use fields from his contact table, so as we grind through the contact list for newsletters subscribers it

Re: [PHP] Store a variable name in a database field.

2005-10-10 Thread Richard Lynch
On Mon, October 10, 2005 12:17 pm, Liam Delahunty wrote: I'm sure this is a pretty basic question, but I have searched for a decent answer and can't find one. I have a client that want to be able to write newsletters (newsleters_tbl.email_body) and use fields from his contact table, so as we

Re: [PHP] passing a variable with php_self

2005-10-03 Thread Jeffrey Sambells
can someone show me the right way to do the following... a href=?=$PHP_SELF?action=bigger; ? I want to pass a variable to a self submitting link. Thanks, a href=? echo $_SERVER['PHP_SELF'].'?action=bigger';? $PHP_SELF should not be used because it will not work without

Re: [PHP] passing a variable with php_self

2005-10-03 Thread Jeffrey Sambells
oops, that should be htmlentities, not htmlspecialchars. - Jeff On 3-Oct-05, at 11:51 AM, Jeffrey Sambells wrote: $PHP_SELF should not be used because it will not work without register_globals being enabled. Rather, you should use $_SERVER ['PHP_SELF'] for it as above however... Don't

[PHP] passing a variable with php_self

2005-09-27 Thread Ross
can someone show me the right way to do the following... a href=?=$PHP_SELF?action=bigger; ? I want to pass a variable to a self submitting link. Thanks, R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] passing a variable with php_self

2005-09-27 Thread Jay Blanchard
[snip] can someone show me the right way to do the following... a href=?=$PHP_SELF?action=bigger; ? I want to pass a variable to a self submitting link. [/snip] echo $_GET['action'] . \n; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] passing a variable with php_self

2005-09-27 Thread Jim Moseby
-Original Message- From: Ross [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 27, 2005 8:58 AM To: php-general@lists.php.net Subject: [PHP] passing a variable with php_self can someone show me the right way to do the following... a href=?=$PHP_SELF?action=bigger; ? I

Re: [PHP] passing a variable with php_self

2005-09-27 Thread Torgny Bjers
Ross wrote: can someone show me the right way to do the following... a href=?=$PHP_SELF?action=bigger; ? I want to pass a variable to a self submitting link. Easiest way to do that is to use sprintf() or printf(): ?php $link_title = click my self-referring link; printf('a

Re: [PHP] passing a variable with php_self

2005-09-27 Thread A.J. Brown
Subject: [PHP] passing a variable with php_self can someone show me the right way to do the following... a href=?=$PHP_SELF?action=bigger; ? I want to pass a variable to a self submitting link. Thanks, a href=? echo $_SERVER['PHP_SELF'].'?action=bigger';? -- PHP General Mailing List

Re: [PHP] passing a variable with php_self

2005-09-27 Thread Norbert Wenzel
A.J. Brown wrote: a href=?=$PHP_SELF?action=bigger? works well too works only if register_globals is on, doesn't it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] passing a variable with php_self

2005-09-27 Thread Gustav Wiberg
- Original Message - From: A.J. Brown [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, September 27, 2005 3:26 PM Subject: Re: [PHP] passing a variable with php_self a href=?=$PHP_SELF?action=bigger? works well too -- Sincerely, A.J. Brown Jim Moseby [EMAIL

[PHP] Re: Retrieving variable name?

2005-09-21 Thread l0t3k
Jeffrey Sambells [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] is it possible to retrieve the name of a variable passed into a function from within the function? Short Answer : No Longer Answer : Maybe, if you have knowledge of PHP internals and a willingness to write an

Re: [PHP] Re: Retrieving variable name?

2005-09-21 Thread Thorsten Suckow-Homberg
Short Answer : No Longer Answer : Maybe, if you have knowledge of PHP internals and a willingness to write an extension. Even then it may not work.. g Well, PHP5's magic methods __get()/ __set() could be used to resolve the variable's name... -- PHP General Mailing List

[PHP] Re: Retrieving variable name?

2005-09-21 Thread Jake Gardner
Maybe something fancy with references? http://us2.php.net/manual/en/language.references.php On 9/21/05, Thorsten Suckow-Homberg [EMAIL PROTECTED] wrote: Short Answer : No Longer Answer : Maybe, if you have knowledge of PHP internals and a willingness to write an extension. Even then it may

Re: [PHP] Re: Retrieving variable name?

2005-09-21 Thread Jeffrey Sambells
oh well, thanks for the help. Jeffrey Sambells Director of Research and Development We-Create Inc. 519.897.2552 cell 519.745.7374 office 888.615.7374 toll free http://www.wecreate.com On 21-Sep-05, at 6:02 PM, Jake Gardner wrote: Maybe something fancy with references?

[PHP] Re: edit $variable online?

2005-08-17 Thread Mark Rees
Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have in a php page one ($variable = 85), I woud like to change the value from this variable online, without any data base, for example ussing a form where I can put the new value and it change the value

Re: [PHP] Re: edit $variable online?

2005-08-17 Thread André Medeiros
If I were you I'd have a file just to define those kind of values (ie. config.php), wich would be included as needed. On 8/17/05, Mark Rees [EMAIL PROTECTED] wrote: Jesús Alain Rodríguez Santos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have in a php page one ($variable

Re: [PHP] PHP 4.3.9 - Undefined variable: authed in

2005-08-06 Thread Jochem Maas
script for a web page and get the following errors, it works fine on a earlier versions of php / mysql PHP Notice: Undefined variable: help_out_uid in /var/www/html/lcc/secure/secure.php on line 87, PHP Notice: Undefined variable: authed in /var/www/html/lcc/secure/secure.php on line 34 mysql

[PHP] PHP 4.3.9 - Undefined variable: authed in

2005-08-06 Thread Trevor Tregoweth
Hi There I am trying to run a simple password /php / mysql script for a web page and get the following errors, it works fine on a earlier versions of php / mysql PHP Notice: Undefined variable: help_out_uid in /var/www/html/lcc/secure/secure.php on line 87, PHP Notice: Undefined variable

[PHP] Data and variable transfer

2005-07-18 Thread Jon
OK this may not be the correct place to ask but maybe someone can help. Related to the Post URL ? How do I see the information passed from my browser to a site? I have httpLiveHeaders for mozilla and that does not provide all the info that I need. Or I am not getting something right. I have

Re: [PHP] imap_open with variable fails

2005-05-18 Thread Michael Baas
Hi, just did want to let this sink unanswered, but I see that 6 days means quite a lot of messages piled up. Should have answered earlier, but... Anyway, I think I had tried the \{ or '{-combinations as well and it didn't work - but I can't remember exactly and can't reproduce now, since I was

[PHP] imap_open with variable fails

2005-05-11 Thread Michael Baas
Hi, I'm using imap_open and the script works fine on my server with 4.3.11. Now as user with 4.3.10 reported that the script does not work. He finally got it working by replacing my variable-names in the imap_open-command with strings containing exactly the same data (except for the leading

Re: [PHP] imap_open with variable fails

2005-05-11 Thread Richard Lynch
{ } became special characters in PHP strings, at some point... You may or may not be able to change a php.ini setting to change that... I wouldn't have expected it to change from 4.3.10 to 4.3.11, but I don't really KNOW when it changed. I suck at tracking version numbers and small changes with

Re: [PHP] passing a variable through 2 required files embedded in Javascript

2005-04-29 Thread Petar Nedyalkov
On Friday 29 April 2005 07:08, Mark Cain wrote: What a mess this has turned out to be -- But perhaps you can help me. I have a dynamic site that pulls headers, navigation, and footers from text files. The content for the pages is pulled from mySQL. On each page I have a JavaScript rotating

Re: [PHP] passing a variable through 2 required files embedded in Javascript

2005-04-29 Thread Richard Lynch
. If I use $_SERVER[PHP_SELF], that variable reports the name of #4. It gets a little tricky because #3 is called from within a JavaScript tag. Have you looked at $_SERVER['HTTP_REFERER']? You may need to pass it around in a new variable ?php $source_page = $_SERVER['HTTP_REFERER']? from PHP

[PHP] passing a variable through 2 required files embedded in Javascript

2005-04-28 Thread Mark Cain
What a mess this has turned out to be -- But perhaps you can help me. I have a dynamic site that pulls headers, navigation, and footers from text files. The content for the pages is pulled from mySQL. On each page I have a JavaScript rotating banner that displays Upcoming Events. The banners

[PHP] Set session variable if link is clicked, do not want to use GET

2005-04-04 Thread Kent
Hi! I am writing a simple shopping cart system which uses sessions and PHP. I would like a normal link that says Add to cart which the user can click and the item is added to the cart. However, i do not want to use GET for this as it could introduce unwanted features if the user bookmarks the

Re: [PHP] Set session variable if link is clicked, do not want to use GET

2005-04-04 Thread Leif Gregory
Hello Kent, Monday, April 4, 2005, 6:21:41 PM, you wrote: K It would have been easy if i would have used a normal FORM and K would have had a button called Add to cart. But i would like it K to be in url-style or using some img .. which i understand that K the BUTTON item does not support (or am

Re: [PHP] Set session variable if link is clicked, do not want to use GET

2005-04-04 Thread emre
@lists.php.net Sent: Tuesday, April 05, 2005 3:21 AM Subject: [PHP] Set session variable if link is clicked, do not want to use GET Hi! I am writing a simple shopping cart system which uses sessions and PHP. I would like a normal link that says Add to cart which the user can click and the item

Re: [PHP] Set session variable if link is clicked, do not want to use GET

2005-04-04 Thread emre
lol, sorry for mess, I was in a bit hurry. here is the right one: form name=TestForm action=test.php method=post input type=hidden name=op value=5 IMG src=a.gif onclick=SubmitMyForm();' !--or a text mabe? -- span onclick='SubmitMyForm();'brSubmit/span /form then define the javascript

[PHP] Re: Newbie Variable Question

2005-03-09 Thread Jason Barnett
Jackson Linux wrote: ... php include_once /path/to/cv.$r.include.php; ? asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category? Not 100% certain that it will work, but try casting the variable

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jackson Linux
On 9 Mar 2005, at 11:15, Jason Barnett wrote: Jackson Linux wrote: ... php include_once /path/to/cv.$r.include.php; ? asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category? Not 100% certain that it

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jochem Maas
Jackson Linux wrote: On 9 Mar 2005, at 11:15, Jason Barnett wrote: Jackson Linux wrote: ... php include_once /path/to/cv.$r.include.php; ? asks for cv.'1'.include.php ... And I need it to ask for cv.1.include.php How can I make a variable to fetch the literal number from the field cv.category?

Re: [PHP] Re: Newbie Variable Question

2005-03-09 Thread Jackson Linux
Jochem and everyone, Thanks, this solved the problem. Regarding someone's much appreciated comment: snip[this]...allows any user to simply change the value of r to something more to their liking. given the reset of the code that you included in your first message, who knows what nice holes

[PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Jason Barnett
Nick Zukin wrote: ... line 79, if ($forum_admin == 1) { line 486, $uname = $cookie[1]; line 216, $pwd = $user[2]; Line 79 is not part of a function or class. It is the first reference to $forum_admin in the script. The other two are within functions and the first call within those

[PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Jason Barnett
Please keep responses on the mailing list / newsgroup... Nick Zukin wrote: Thanks for the quick response. Yes, had to turn register_globals on because it broke things. Many of these sites aren't mine and I have no idea what's involved in trying to fix them all. If you saw a full 1.2 GB

RE: [PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Nick Zukin
@lists.php.net Subject: [PHP] Re: Undefined Variable Problems... Please keep responses on the mailing list / newsgroup... Nick Zukin wrote: Thanks for the quick response. Yes, had to turn register_globals on because it broke things. Many of these sites aren't mine and I have no idea what's involved

Re: [PHP] Re: Undefined Variable Problems...

2005-03-06 Thread Guillermo Rauch
Also, since this is a very massive list with high traffic, quote when necessary. For example, consider this message: Can i draw something ? Yes you can Thanks You're welcome In that case quote is quite useful :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] classes and variable scope

2004-12-01 Thread Josh Howe
Hi all, If I have the following code: $some_global_variable; Class foo { Function test() { set_global(); echo $some_global_variable; } Function set_global () { $some_global_variable = abcd; echo $some_global_variable; } } The first echo

Re: [PHP] classes and variable scope

2004-12-01 Thread Richard Lynch
Josh Howe wrote: Hi all, If I have the following code: $some_global_variable; Class foo { Function test() { set_global(); echo $some_global_variable; } Function set_global () { $some_global_variable = abcd; echo $some_global_variable;

[PHP] Re: header variable ?

2004-11-11 Thread Sebastian Mendel
Jerry Swanson wrote: What variable header use? If I send something in header, what GLOBAL variable header use? do you mean $_SERVER ? $_SERVER holds some header-information sent by the client to the webserver -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de

RE: [PHP] Re: Determine variable with the lowest value?

2004-10-18 Thread Paul Fine
Than you very much Matt. Does what I needed. Now I will have to read up on as and the function key. -Original Message- From: Matt M. [mailto:[EMAIL PROTECTED] Sent: October 14, 2004 11:27 AM To: BOOT Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Determine variable with the lowest value

[PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread Eric McGrane
Why use the min function? Just sort the array and then grab the first element in the sorted array. No random picking required. E Paul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks guys. Yes I figured using an array and the MIN function would be a start. Now the random

[PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread BOOT
OK thanks but I guess I didn't explain what I am trying to do properly. I need to be able to identify the variable name as well as pick the variable with the lowest value. Something like this: Whose turn is it to take out the garbage? Mike has done it 3 times Bob has done it 2 times Jane has

Re: [PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread Matt M.
On Thu, 14 Oct 2004 10:52:20 -0500, BOOT [EMAIL PROTECTED] wrote: OK thanks but I guess I didn't explain what I am trying to do properly. I need to be able to identify the variable name as well as pick the variable with the lowest value. Something like this: Whose turn is it to take out

Re: [PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread ApexEleven
/* Untested Code */ $arr[0]['id'] = 3; $arr[0]['name] = 'Mike'; $arr[1]['id'] = 2; $arr[1]['name'] = 'Bob'; $arr[2]['id'] = 5; $arr[2]['name'] = 'Jane'; array_multisort($arr['id'],$arr['name']); print It's .$arr[0]['name'].'s Turn To Take Out The Garbage!; /* End Untested Code */ On Thu, 14

Re: [PHP] Re: Determine variable with the lowest value?

2004-10-14 Thread Greg Donald
On Thu, 14 Oct 2004 10:52:20 -0500, BOOT [EMAIL PROTECTED] wrote: OK thanks but I guess I didn't explain what I am trying to do properly. I need to be able to identify the variable name as well as pick the variable with the lowest value. Something like this: Whose turn is it to take out

RE: [PHP] Novice PHP Variable/Link Question

2004-09-17 Thread Gryffyn, Trevor
, September 16, 2004 6:02 PM To: revDAVE Cc: PHP Subject: Re: [PHP] Novice PHP Variable/Link Question On Thu, 16 Sep 2004 14:54:34 -0700, revDAVE [EMAIL PROTECTED] wrote: How can I use a PHP variable as the destination for a link? ? $mylink = 'thispage.htm' a href=thispage.htmgo

Re: [PHP] Novice PHP Variable/Link Question

2004-09-17 Thread Jason Wong
On Friday 17 September 2004 21:49, Gryffyn, Trevor wrote: Alternately, you can do it the lazy way like me: a href=?=$url??=$url?/a ? Echo $url; ? Is the same as... ?=$url? I also think that's a little easier to read. But that's my preference in style. The use of this syntax is

[PHP] Novice PHP Variable/Link Question

2004-09-16 Thread revDAVE
How can I use a PHP variable as the destination for a link? ? $mylink = 'thispage.htm' a href=thispage.htmgo here/a With var...? How do I write this? a href=??? $mylink ???go here/a ? -- Thanks - RevDave [EMAIL PROTECTED] [db-lists] Check out some great Domain Names at: http

Re: [PHP] Novice PHP Variable/Link Question

2004-09-16 Thread Greg Donald
On Thu, 16 Sep 2004 14:54:34 -0700, revDAVE [EMAIL PROTECTED] wrote: How can I use a PHP variable as the destination for a link? ? $mylink = 'thispage.htm' a href=thispage.htmgo here/a With var...? How do I write this? a href=??? $mylink ???go here/a a href=?php echo $url;??php

Re: [PHP] Novice PHP Variable/Link Question

2004-09-16 Thread revDAVE
On 9/16/04 3:01 PM, Greg Donald [EMAIL PROTECTED] wrote: a href=?php echo $url;??php echo $url;?/a It worked great - thanks a lot. -- Thanks - RevDave [EMAIL PROTECTED] [db-lists] Check out some great Domain Names at: http://www.domains4days.com -- PHP General Mailing List

[PHP] dynamical class variable definition

2004-09-13 Thread Mario Lopez
Hi, I have a class, but the problem is that its variables need to be defined dynamically. example: class class_myclass{ var $variable1; var $variable2; var $variable3; ... var $variableN how to initialize these $variableN class variables from a global array which contains the

Re: [PHP] dynamical class variable definition

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 18:26:56 +0300, Mario Lopez [EMAIL PROTECTED] wrote: Hi, I have a class, but the problem is that its variables need to be defined dynamically. example: class class_myclass{ var $variable1; var $variable2; var $variable3; ... var $variableN how to

Re: [PHP] dynamical class variable definition

2004-09-13 Thread Mario Lopez
Oh Thanks, I thought that only those variables that are defined with VAR will be accessible and trieted as class variables Mario -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamical class variable definition

2004-09-13 Thread Greg Donald
On Mon, 13 Sep 2004 19:06:20 +0300, Mario Lopez [EMAIL PROTECTED] wrote: Oh Thanks, I thought that only those variables that are defined with VAR will be accessible and trieted as class variables Nope, it'll work: #!/usr/bin/php ?php function bindArray($array, $obj){ is_array($array) or

[PHP] Image and variable

2004-08-10 Thread Henri Marc
Hello, I would like to use a variable instead of an image file name in a html page with this instruction: ?php echo 'img src=$myimage'; ? I tried but the image doesn't show up. Is it impossible or do I do something wrong? My goal is to have a random image print in the page, that's why I want to

Re: [PHP] Image and variable

2004-08-10 Thread Kevin Waterson
This one time, at band camp, Henri Marc [EMAIL PROTECTED] wrote: Hello, I would like to use a variable instead of an image file name in a html page with this instruction: ?php echo 'img src=$myimage'; ? hmm, something like this may help for random images ?php // just so we know it is

[PHP] Accessing a variable from inside a local function

2004-07-28 Thread Frank Munch
Would anyone know how to resolve this scope problem? Or is this possibly something PHP can't (yet) do? The problem is to access a variable in a function foo from a function local to foo. - - - function foo($var_foo) { $my_foo_local = 10; //How can I reach this from inside function

RE: [PHP] Accessing a variable from inside a local function

2004-07-28 Thread Ford, Mike [LSS]
On 28 July 2004 12:29, Frank Munch wrote: Would anyone know how to resolve this scope problem? Or is this possibly something PHP can't (yet) do? The problem is to access a variable in a function foo from a function local to foo. Actually, your problem is that the function bar is *not*

RE: [PHP] Accessing a variable from inside a local function

2004-07-28 Thread Frank Munch
At 07:39 PM 7/28/2004, Ford, Mike [LSS] wrote: Actually, your problem is that the function bar is *not* local to foo. Even though PHP lets you declare functions lexically within the scope of other functions snip Ouch! Thanks! Got that much wiser! So for keeping the namespace cleaner

[PHP] Re: catch $variable with spaces, and convert them

2004-07-18 Thread Jason Barnett
This should work... enjoy! ## code, using PEAR DB ## while ($q-fetchInto($row)) { print ( tr td width=90 align=center .$row[0]. /td tda href=FILES/ .$row[1]. .$row[1]. /a/td tda href=FILES/ .rawurlencode($row[1]). .$row[1]. /a/td td .$row[2]. /td /tr ); }; ## end

[PHP] Problem Stuffing Variable Value into an E-mail

2004-07-17 Thread Harlequin
I've generated a page where the user selects and completes a form. One of these is a free text area with the name TXT_Question. this is used later as $Question = $_Post['TXT_Question']; but for some reason when I send this in an e-mail like so: \nUser has selected eventID:\t$EventID \nAnd

[PHP] session looses variable

2004-06-17 Thread Anthony Weston
Hi, This is what is probably a newbie session problem. I've been having some trouble with sessions on php 4.0.6, I'm developing a website in which I don't have direct control over the server. Due to some other problems I created a test counter script to try to narrow down where the problem

[PHP] Problems with variable handling !

2004-06-08 Thread php-general
Hi ! I have a Problem with hand over of variables; My Page consists of three files which I have enclosed to demonstrate the problem. test.php: -- html head titletest.php/title /head frameset rows=274,* cols=* framespacing=1 frameborder=yes border=1 bordercolor=#00

Re: [PHP] Problems with variable handling !

2004-06-08 Thread Jason Wong
On Tuesday 08 June 2004 18:36, php-general wrote: In test_oben.php I want to insert two strings. pressing the Display strings-button will output them in the button frame. Only pressing the Display concatenated strings-button should output the concatenated string, but this does not work, and

Re: [PHP] Problems with variable handling !

2004-06-08 Thread Marek Kilimajer
php-general wrote: Hi ! I have a Problem with hand over of variables; My Page consists of three files which I have enclosed to demonstrate the problem. test.php: -- html head titletest.php/title /head frameset rows=274,* cols=* framespacing=1 frameborder=yes border=1

[PHP] RE: Empty Variable Values Between Scripts

2004-06-08 Thread Frank Hahn
Jay Blanchard [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: register globals is off, so all of your variables are in the POST array $_POST['first'] $_POST['last'] etc. Replace all your variable references with the appropriate array references and you'll be off to the races. Jay:

Re: [PHP] Keep PHP variable values between script calls - XML RPC

2004-05-29 Thread Santiago Peirano
://pwee.sourceforge.net/ Lance -Original Message- From: Santiago Peirano [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 11:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Keep PHP variable values between script calls - XML RPC Ok, here we go. I would like to implement an XML-RPC

[PHP] Re: Changing variable names in a while loop

2004-05-28 Thread Torsten Roehr
I.A. Gray [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, Easy question (I hope). My brain seems not be working today, so could someone help me with this one? I have a while loop outputting part of an html form which inputs track information for CDs: $countything = 1;

RE: [PHP] Re: Changing variable names in a while loop

2004-05-28 Thread I.A. Gray
... as I have about 8 variables to change? Best wishes, Ian Gray -Original Message- From: Torsten Roehr [mailto:[EMAIL PROTECTED] Sent: 28 May 2004 12:30 To: [EMAIL PROTECTED] Subject: [PHP] Re: Changing variable names in a while loop I.A. Gray [EMAIL PROTECTED] wrote in message news

Re: [PHP] Re: Changing variable names in a while loop

2004-05-28 Thread Torsten Roehr
I.A. Gray [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks, Torsten. That clears things up quite a bit. I do find the PHP manual a little heavy going sometimes. Does this mean then that I have to do this: $tempcomposer = 'composer' . $countything; $tempsubheading =

RE: [PHP] Re: Changing variable names in a while loop

2004-05-28 Thread Ford, Mike [LSS]
On 28 May 2004 12:30, Torsten Roehr wrote: I.A. Gray [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, Easy question (I hope). My brain seems not be working today, so could someone help me with this one? [...] How can I get the value to change in each form? The

[PHP] Keep PHP variable values between script calls - XML RPC

2004-05-27 Thread Santiago Peirano
Ok, here we go. I would like to implement an XML-RPC server (a script of course) that keeps the value of certain variables between the different invocations of the script. I think that it should be possible, but I dont know where to start (none of the search in internet gave me a starting

<    1   2   3   4   5   6   7   8   9   10   >