Re: [PHP] variable in function parameter

2003-07-28 Thread Marek Kilimajer
www.php.net/variables.scope You need global $a; as the first line in your function. 386-DX wrote: Hello. Let's say I have something like this: function aa($test) { $a = 8; echo $test; } $a = 2; aa(a is . ($a5?greater:equal to or less). than 5.); I want this to output a is greater than

Re: [PHP] variable in function parameter

2003-07-28 Thread Curt Zirzow
* Thus wrote 386-DX ([EMAIL PROTECTED]): Hello. Let's say I have something like this: function aa($test) { $a = 8; echo $test; } $a = 2; aa(a is . ($a5?greater:equal to or less). than 5.); http://php.net/eval Curt -- I used to think I was indecisive, but now I'm not so

Re: [PHP] variable in function parameter

2003-07-28 Thread CPT John W. Holmes
* Thus wrote 386-DX ([EMAIL PROTECTED]): Hello. Let's say I have something like this: function aa($test) { $a = 8; echo $test; } $a = 2; aa(a is . ($a5?greater:equal to or less). than 5.); http://php.net/eval No... you need to make $a global within the function for

Re: [PHP] variable in function parameter

2003-07-28 Thread Curt Zirzow
* Thus wrote CPT John W. Holmes ([EMAIL PROTECTED]): * Thus wrote 386-DX ([EMAIL PROTECTED]): Hello. Let's say I have something like this: function aa($test) { $a = 8; echo $test; } $a = 2; aa(a is . ($a5?greater:equal to or less). than 5.);

[PHP] Variable not passed twixt pages..

2003-07-18 Thread Chris Blake
Greetings learned PHP(eople), Scenario : User fills in text box, pushes Submit and textbox data gets passed to MySQL database.. = The code from the HTML page : form action=savemail.php method=GET target=main input type=text class=mailinput

Re: [PHP] Variable not passed twixt pages..

2003-07-18 Thread desa15
echo $HTTP_GET_VARS['mailaddress'] ; Un saludo, Danny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variable not passed twixt pages..

2003-07-18 Thread Chris Blake
Thanks to all who contributed, I managed to get it to work using just $mailaddress. Much appreciated. -- Chris Blake Office : (011) 782-0840 Cell : 083 985 0379 One learns to itch where one can scratch. -- Ernest Bramah -- PHP General Mailing List

[PHP] variable sized arrays global vars - another newbie question

2003-07-15 Thread bob pilly
Hi all, yet again im struggling with php syntax after to many years with c. If anyone can help or point me to some good doc's i'd would really appreciate it! My two questions are: Can i declare an array that doesnt have a fixed size? Basically i want to assign the results of a query to the

Re: [PHP] variable sized arrays global vars - another newbie question

2003-07-15 Thread Marek Kilimajer
Every array does not have a fixed size: while($temp=mssql_fetch_array($tmresult)){ $array[] = $temp[fieldname]; // ads an element at the end // or $array[$temp[id]]= $temp[fieldname]; // the table id is the key } You can access global variables in functions or class methods by: 1. declaring

Re: [PHP] variable sized arrays global vars - another newbie question

2003-07-15 Thread Dirk Kredler
Am Dienstag, 15. Juli 2003 14:39 schrieb bob pilly: Can i declare an array that doesnt have a fixed size? Basically i want to assign the results of a query to the array but obviously the query results can change. Something along the lines of: $myarray= array();

Re: [PHP] variable sized arrays global vars - another newbie question

2003-07-15 Thread bob pilly
Thanks for the reply! I must admit i and confused by the answer to the global variables question. Can i ask another question? What if i want to increment a global counter from within a function. at the moment i am trying to declare the variable normally: $counter=0; then within the function:

Re: [PHP] variable sized arrays global vars - another newbie question

2003-07-15 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Tue, 15 Jul 2003 at 15:19, lines prefixed by '' were originally written by you. Can i ask another question? What if i want to increment a global counter from within a function. at the moment i am trying to declare the variable normally:

Re: [PHP] Variable Functions...

2003-07-11 Thread Burhan Khalid
On Friday, July 11, 2003, 3:11:51 AM, Michael wrote: MS Smarty has a class method where it calls: $this-$some_var(somevalue); Are you sure about that syntax? I'm not too familiar with Smarty, only used it once, but I think its $this-some_var(value); MS and this throws errors on Windows

[PHP] Variable Functions...

2003-07-10 Thread Michael Smith
Smarty has a class method where it calls: $this-$some_var(somevalue); and this throws errors on Windows versions of php that i've tried. why is that? -Michael -- Pratt Museum IT Intern All programmers are playwrights and all computers are lousy actors. -- PHP General Mailing List

[PHP] Variable from the form

2003-06-30 Thread Gladk
Hi! I'm getting result from the form. Are there any differences between using these 2 forms: $_POST['my_variable'] or just $my_variable Is it more safety to use the first one? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Variable from the form

2003-06-30 Thread Dan Joseph
Hi, I'm getting result from the form. Are there any differences between using these 2 forms: $_POST['my_variable'] or just $my_variable Is it more safety to use the first one? You have to use the first one if you have register_globals set to off. If you have it on, you can

[PHP] variable shortened in hidden fields?

2003-06-22 Thread Denis L. Menezes
Hello friends. I am passing a variable of two word like communications software from one form to the other. The variable passes as communications%20software . This is okay for some purpose, but not for the hidden text field that I want. The hidden text field gets the value communications only

Re: [PHP] variable shortened in hidden fields?

2003-06-22 Thread Chris Hayes
At 15:23 22-6-2003, you wrote: Hello friends. I am passing a variable of two word like communications software from one form to the other. The variable passes as communications%20software . This is okay for some purpose, but not for the hidden text field that I want. The hidden text field gets

[PHP] Variable from hidden fields shortens.

2003-06-22 Thread Denis L. Menezes
I have a form called feedback which has a hidden field as follows : ?php Printinput type=\text\ name=\SubCategoryName\ value=\$SubCategoryName\; ? I send this hidden field as a variable in form2 which sends an email with the following code : ?php // Build up email header fields $mailFrom

Re: [PHP] Variable from hidden fields shortens.

2003-06-22 Thread Philip Olson
For example: $a = 'a b c'; print $a;// a b c print urlencode($a); // a+b+c So, you want to urlencode your url (the query string). Regards, Philip On Sun, 22 Jun 2003, Denis L. Menezes wrote: I have a form called feedback which has a hidden field as follows : ?php Printinput

RE: [PHP] Variable variables question?

2003-06-16 Thread Ford, Mike [LSS]
-Original Message- From: Douglas Douglas [mailto:[EMAIL PROTECTED] Sent: 14 June 2003 00:57 Thanks for the explanation, but I think this is a different case, isn't? I'm not trying to do this ${$_POST}, I'm trying to make this string $_POST. Then why not just make it: $var =

[PHP] Variable variables question?

2003-06-13 Thread Douglas Douglas
Hello everybody. I have the following class method: function HTTPValidator($method) { $this-data = ${'_'.$method}; $this-rules= array(); $this-required = array(); } data, rules and required are arrays. The parameter $method can have the values: GET or POST. I'm trying to store

RE: [PHP] Variable variables question?

2003-06-13 Thread Ford, Mike [LSS]
-Original Message- From: Douglas Douglas To: [EMAIL PROTECTED] To get the superglobal array ($_GET or $_POST), I try to build these strings '_'.$method. I'm sure this part works, PHP builds the string _GET or _POST according to the $method parameter. I use ${'_'.$method} to get the

RE: [PHP] Variable variables question?

2003-06-13 Thread Douglas Douglas
Thanks for the answer Mike. Thanks for the explanation, but I think this is a different case, isn't? I'm not trying to do this ${$_POST}, I'm trying to make this string $_POST. And I have another question. Why does this code work? ?php echo 'pre'; print_r($_POST); echo '/prebrbr'; $method =

[PHP] Calling Multi-Row Result PHP Variable in Flash

2003-03-10 Thread Rahul.Brenda
Hi, I used a script to generate some result from a database, which i want to display in flash. In Flash, i created the Dynamic Text and declared newsbits as Vars, and set it to Multiline. I also loaded the PHP variables with the following command in the ActionScript of the Frame :

Re: [PHP] variable string names

2003-03-09 Thread Edwin Boersma
John's solution is the better one. But if you really wish to stick to your own, try and use eval() to complile $where$i. Edwin John W. Holmes wrote: I have: if ($where1 != '') { $whereArray = array_push($whereArray, $where1); } and I want to repeat for $where1 up to $where8 but

[PHP] Variable Undefined, even when global?

2003-03-08 Thread Ron Biggs
I'm getting a Variable Undefined error, even tho phpinfo() shows me that globals are set to ON. I've done massive searches on the web to find a solution, but I'm totally missing it. Help? (I've bolded where the Variable Undefined is occuring --- where $whatglass = $lkColor[$i]-glass; is

Re: [PHP] Variable Undefined, even when global?

2003-03-08 Thread Ernest E Vogelsinger
At 01:28 09.03.2003, Ron Biggs said: [snip] function ColorCollection($lkID){ $whatX = $lkID + 1; // Adding 1 turns makes the index correspond to the template number. // $aColLen = count($lkColor); //.length $aColLen = test; //sizeof($lkColor); //.length

Re: [PHP] Variable Undefined, even when global?

2003-03-08 Thread Ron Biggs
You are a god among men, Ernest. THANK YOU! -ron Ernest E Vogelsinger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] At 01:28 09.03.2003, Ron Biggs said: [snip] function ColorCollection($lkID){ $whatX = $lkID + 1; // Adding 1 turns makes

Re: [PHP] Variable Undefined, even when global?

2003-03-08 Thread Ernest E Vogelsinger
At 01:53 09.03.2003, Ron Biggs said: [snip] You are a god among men, Ernest. THANK YOU! [snip] Bless you :) Nope. You're welcome, -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^

[PHP] variable string names

2003-03-08 Thread julian haffegee
Hi all, I have something thats been driving me mad for days I have: if ($where1 != '') { $whereArray = array_push($whereArray, $where1); } and I want to repeat for $where1 up to $where8 but rather than write it out 8 times, I'd rather use a loop for ($i=1; $i=8 i++) { if

Re: [PHP] variable string names

2003-03-08 Thread Leif K-Brooks
for ($i=1; $i=8 i++) { if (${'where'.$i} != '') { $whereArray = array_push($whereArray, ${'where'.$i}); } } julian haffegee wrote: Hi all, I have something thats been driving me mad for days I have: if ($where1 != '') { $whereArray = array_push($whereArray, $where1);

Re: [PHP] variable string names

2003-03-08 Thread Liam Gibbs
You could probably do this. Set up a $$where variable, which would contain where . $i, $i being the iterator of your loop. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] variable string names

2003-03-08 Thread John W. Holmes
I have: if ($where1 != '') { $whereArray = array_push($whereArray, $where1); } and I want to repeat for $where1 up to $where8 but rather than write it out 8 times, I'd rather use a loop for ($i=1; $i=8 i++) { if ($where1 != '') { $whereArray =

[PHP] $$ Variable?

2003-02-12 Thread jtx
I'm trying to piece apart someone's code to see exactly what it is they're trying to do - This code was written for PHP 3.x, so it's not quite as nice as 4 (with $_POST, $_GET, $_SESSION, etc). There's this one part in particular that I have no idea what's trying to be done: if (isset ($cookie))

Re: Re: RE: [PHP] Variable Problem

2003-02-06 Thread Sunfire
Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 12:25 AM Subject: Re: Re: RE: [PHP] Variable Problem On Thursday 06 February 2003 07:48, Sunfire wrote: on any server i ever dealt with if i put: input type=sent value=?php\$sent\? in the edit box for the value

Re: Re: RE: [PHP] Variable Problem

2003-02-06 Thread Jason Wong
On Thursday 06 February 2003 22:50, Sunfire wrote: no that doesnt work either what you get when you do that one in the edit box is: using: input type=text name=sent value=?php echo \$sent\;? or any different with echo in the value field gives me in the box: ?php \\;?} ...rest of the script

[PHP] Variable Problem

2003-02-05 Thread Sierra Times.com
I have a variable that get's chopped off at the %20 character. In the form page I have: bFrom: ?= $name;? brE-mail address: ?= $email;?br ?= $sent;?/b/font/td $sent and $name shows up fine, but immedieately I added (for testing) input type=text name=sent value=?= $sent;? input

Re: [PHP] Variable Problem

2003-02-05 Thread Jason Wong
On Thursday 06 February 2003 04:41, Sierra Times.com wrote: I have a variable that get's chopped off at the %20 character. In the form page I have: bFrom: ?= $name;? brE-mail address: ?= $email;?br ?= $sent;?/b/font/td $sent and $name shows up fine, but immedieately I added

RE: [PHP] Variable Problem

2003-02-05 Thread Leonard Burton
: Wednesday, February 05, 2003 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Variable Problem I have a variable that get's chopped off at the %20 character. In the form page I have: bFrom: ?= $name;? brE-mail address: ?= $email;?br ?= $sent;?/b/font/td $sent and $name shows up fine

Re: Re: [PHP] Variable Problem

2003-02-05 Thread Sunfire
PM Subject: Spam: Re: [PHP] Variable Problem On Thursday 06 February 2003 04:41, Sierra Times.com wrote: I have a variable that get's chopped off at the %20 character. In the form page I have: bFrom: ?= $name;? brE-mail address: ?= $email;?br ?= $sent;?/b/font/td $sent

Re: RE: [PHP] Variable Problem

2003-02-05 Thread Sunfire
need to echo...specially if there are 300 lines of code a block... - Original Message - From: Leonard Burton [EMAIL PROTECTED] To: Sierra Times.com [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 4:16 PM Subject: Spam: RE: [PHP] Variable Problem You need to put

Re: RE: [PHP] Variable Problem

2003-02-05 Thread Chris Shiflett
--- Sunfire [EMAIL PROTECTED] wrote: you can do: echo BLOCK //any valid html code here input type=sent value=\sent\ BLOCK; No, he needed to output $sent, which is dynamic. Also, it is a lot cleaner (and likely faster) just to use ? (or ?php) and ? to switch in/out of PHP as needed. If

Re: Re: RE: [PHP] Variable Problem

2003-02-05 Thread Sunfire
Shiflett [EMAIL PROTECTED] To: Sunfire [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 5:44 PM Subject: Spam: Re: RE: [PHP] Variable Problem --- Sunfire [EMAIL PROTECTED] wrote: you can do: echo BLOCK //any valid html code here input type=sent value=\sent\ BLOCK

Re: Re: RE: [PHP] Variable Problem

2003-02-05 Thread Chris Shiflett
--- Sunfire [EMAIL PROTECTED] wrote: on any server i ever dealt with if i put: input type=sent value=?php\$sent\? in the edit box for the value i always always end up with ?php instead of what $sent stands for..the only way i found it to work is with echo but maybe im missing something You

Re: Re: RE: [PHP] Variable Problem

2003-02-05 Thread Jason Wong
On Thursday 06 February 2003 07:48, Sunfire wrote: on any server i ever dealt with if i put: input type=sent value=?php\$sent\? in the edit box for the value i always always end up with ?php instead of what $sent stands for..the only way i found it to work is with echo but maybe im missing

[PHP] Variable objects?

2003-02-04 Thread Leif K-Brooks
I'm planning to use variable objects in a new project I'm working on. The problem is, I can't find one page of documentation on them, so I can't be sure if I'm going to be using an accidential feature that will disappear. As an example of them working, the following outputs In a_class.: ?php

[PHP] Variable Fun

2003-01-30 Thread James E Hicks III
This code: ? $var1 = 02061030012452; $var2 = 02061030012451; $test1 = (string) $var1 $test2 = (string) $var2; echo gettype($test2).---.gettype($test1).BRBR; echo $test2.---.$test1.BRBR; if ( $test2 != $test1){ echo (The variables are not equal.); } ? Produces the following output

Re: [PHP] Variable Fun

2003-01-30 Thread Jason Wong
On Friday 31 January 2003 05:55, James E Hicks III wrote: This code: ? $var1 = 02061030012452; $var2 = 02061030012451; $test1 = (string) $var1 $test2 = (string) $var2; echo gettype($test2).---.gettype($test1).BRBR; echo $test2.---.$test1.BRBR; if ( $test2 != $test1){ echo

[PHP] PHP Variable Declare

2003-01-22 Thread Stephen Goehler
Hey guys, Thanks in advance for your help. I'm working on emailing the contents of a form using php. It worked fine, until I turned global_variables off in an attempt to secure the form (I still have yet to write the data validation part). Anyway, I have an IF statement that fires depending on

[PHP] Re: PHP Variable Declare

2003-01-22 Thread Thomas Seifert
try: if (isset($_POST['frmAction']) $_POST['frmAction'] == formmail) instead of your line. Thomas On Wed, 22 Jan 2003 09:47:46 -0500 [EMAIL PROTECTED] (Stephen Goehler) wrote: Hey guys, Thanks in advance for your help. I'm working on emailing the contents of a form using php. It

[PHP] Re: PHP Variable Declare

2003-01-22 Thread Stephen Goehler
Now it gets more confusing.I added: print 'pre'; print_r($_POST); print '/pre'; to my form and the variables are displayed properly, but only generate errors when I try to add it to fputs().any ideas? Stephen Goehler [EMAIL PROTECTED] wrote in message [EMAIL

[PHP] Re: PHP Variable Declare

2003-01-22 Thread Thomas Seifert
it won't work the way you are doing this. Try something like that line (changed from yours): fputs($fd, From: .$_POST['name']. .$_POST['email'].\n); Don't ask arrays directly in a string. Thomas On Wed, 22 Jan 2003 11:15:35 -0500 [EMAIL PROTECTED] (Stephen Goehler) wrote: Now it gets

[PHP] Re: PHP Variable Declare

2003-01-22 Thread Stephen Goehler
Thanks guys for helping out. I got it working now! Thomas Seifert [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... it won't work the way you are doing this. Try something like that line (changed from yours): fputs($fd, From: .$_POST['name'].

[PHP] variable scope in nested functions

2002-12-09 Thread Filippo Veneri
Is there a way to access a variable defined in a function from a nested function, without putting the variable in the global scope? Perhaps some code will make my question clearer: function enclosing() { $variable1; function enclosed() { can I access $variable1

[PHP] variable num of function args

2002-12-03 Thread christian haines
hi all, is it possible to somehow have a function which takes a variable number of arguments (with some kind of key association) which can then be converted to variables? i am sick of continually having to go back and add empty parameters to functions in use. an example would be.. function

RE: [PHP] variable num of function args

2002-12-03 Thread Ford, Mike [LSS]
-Original Message- From: christian haines [mailto:[EMAIL PROTECTED]] Sent: 03 December 2002 13:32 hi all, is it possible to somehow have a function which takes a variable number of arguments Yes -- look at the manual pages for func_num_args

[PHP] Variable passing through a form

2002-11-20 Thread Michael Benbow
Hi, I currently have a page divided into three areas, two of which are iframes. The user selects a component out of part 1, which decides what is shown in part 2. When something is clicked in part 2 the information updates in the second iframe, or part 3. This is all working fine through

[PHP] Variable Value 2 Session Name

2002-11-05 Thread Stephen of Blank Canvas Group
I'm trying to create what I believe should be a simple script to help with logging users into my site. My problem is that at the top of my script I set a variable with it's value and then at later script I cannot appear to access it. Extract of my code is as follows and fails: $IDField =

Re: [PHP] Variable over url

2002-10-31 Thread Sascha Cunz
Ops, of course. Sascha Am Donnerstag, 31. Oktober 2002 04:07 schrieb Chris Shiflett: I think you mean turn on register_globals. :-) Sascha Cunz wrote: try ?php echo $_GET['tmp']; ? or turn off register_globals in your php.ini file. Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel

[PHP] Variable over url

2002-10-30 Thread Manuel Jenne
Hi, I've just installed php 4.2.3 and wonder why I can't submit an variable over url. Example: My Script: Test.php ? echo $tmp; ? My URL: www.some.domain/test.php?tmp=5 My result: NOTHING !!! Where is the error? P.S. phpmyadmin run ok. Thanx Manuel

Re: [PHP] Variable over url

2002-10-30 Thread Sascha Cunz
Hi, try ?php echo $_GET['tmp']; ? or turn off register_globals in your php.ini file. - Sascha Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel Jenne: Hi, I've just installed php 4.2.3 and wonder why I can't submit an variable over url. Example: My Script: Test.php ? echo $tmp;

Re: [PHP] Variable over url

2002-10-30 Thread Philip Olson
Read this: Variables from outside PHP: http://www.php.net/manual/en/language.variables.external.php Some notes: a) Know your register_globals directive. b) register_globals defaults to off as of PHP 4.2.0. c) It's preferred not to rely on register_globals being on. d) Autoglobals,

Re: [PHP] Variable over url

2002-10-30 Thread Chris Shiflett
I think you mean turn on register_globals. :-) Sascha Cunz wrote: try ?php echo $_GET['tmp']; ? or turn off register_globals in your php.ini file. Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel Jenne: My Script: Test.php ? echo $tmp; ? My URL: www.some.domain/test.php?tmp=5 My

Re: [PHP] Variable over url

2002-10-30 Thread Leif K-Brooks
X.x No. It's turned off for a reason: security. Chris Shiflett wrote: I think you mean turn on register_globals. :-) Sascha Cunz wrote: try ?php echo $_GET['tmp']; ? or turn off register_globals in your php.ini file. Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel Jenne: My Script:

Re: [PHP] Variable Variables

2002-09-13 Thread Marek Kilimajer
Hi, Mike Smith wrote: I am stumped on a project for a receiving system. I'm not sure how to handle receiving more than one line item. I can UPDATE ... WHERE id=$detid when I have 1 item, but how would I get the SQL to fire X times depending on the number of line items I have AND UPDATE the

[PHP] Variable Variables

2002-09-11 Thread Mike Smith
I am stumped on a project for a receiving system. I'm not sure how to handle receiving more than one line item. I can UPDATE ... WHERE id=$detid when I have 1 item, but how would I get the SQL to fire X times depending on the number of line items I have AND UPDATE the appropriate record.

[PHP] Variable Assignment

2002-09-09 Thread Kicenko, Frank
Hi, I apologize for asking this question as it must have been asked many times before but I can't find it in any of the archives.. What I would like to do is setup forms in javascript and then on a submit to assign these variables to PHP variables. I know how to assign PHP to javascript with

Re: [PHP] Variable Assignment

2002-09-09 Thread Tom Rogers
Hi, Tuesday, September 10, 2002, 7:08:27 AM, you wrote: KF Hi, KF I apologize for asking this question as it must have been asked many times KF before but I can't find it in any of the archives.. KF What I would like to do is setup forms in javascript and then on a submit to KF assign these

[PHP] variable reference parameters

2002-08-29 Thread Timo Ewalds
I've created (with help from some code from the site) a function to make strings or arrays mysql safe. It works just fine, assuming you pass your variables by reference ( sqlSafe($var) ), but I get this error every time it is used: [error] PHP Warning: Call-time pass-by-reference has been

Re: [PHP] variable reference parameters

2002-08-29 Thread DL Neil
Timo, If you use func_num_args() to ascertain the number of arguments passed to the function and func_get_arg() to retrieve each argument in turn (from a list of unstated length), will that do the trick? Regards, =dn I've created (with help from some code from the site) a function to make

Fw: [PHP] variable reference parameters

2002-08-29 Thread Kevin Stone
Good luck, Kevin - Original Message - From: Timo Ewalds [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 27, 2002 11:21 PM Subject: [PHP] variable reference parameters I've created (with help from some code from the site) a function to make strings or arrays

Re: [PHP] variable variables i think... (solved)

2002-08-22 Thread Justin French
Solved it -- I *can* do what I wanted without variable variables... it was human error. Justin French on 22/08/02 4:09 PM, Justin French ([EMAIL PROTECTED]) wrote: Hi all, Having trouble with the logic behind this. I have a dynamic SKU, and a dynamic size_range array. Examples:

[PHP] variable variables i think...

2002-08-21 Thread Justin French
Hi all, Having trouble with the logic behind this. I have a dynamic SKU, and a dynamic size_range array. Examples: $sku = '44044'; $size_range = array('S', 'M', 'L'); Which I use to build a pull down select box: SELECT name=myselect ? foreach($sizes as $k = $v) { echo OPTION

[PHP] Passing a PHP variable to javascript

2002-08-19 Thread Michael
Hello everyone, This may seem a newbie question... I have a PHP variable containing the text of the alert I want to display ($text) and I want to have it displayed in a javascript alert box (something like alert($text) ). I couldn't find out how to sort this out... Regards, Michael

Re: [PHP] Passing a PHP variable to javascript

2002-08-19 Thread John Wards
alert(?echo $text?) - Original Message - From: Michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 19, 2002 1:54 PM Subject: [PHP] Passing a PHP variable to javascript Hello everyone, This may seem a newbie question... I have a PHP variable containing the text

Re: [PHP] Passing a PHP variable to javascript

2002-08-19 Thread Scott Houseman
- Original Message - From: Michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 19, 2002 2:54 PM Subject: [PHP] Passing a PHP variable to javascript Hello everyone, This may seem a newbie question... I have a PHP variable containing the text of the alert I want to display ($text

Re: [PHP] Passing a PHP variable to javascript

2002-08-19 Thread Justin French
a PHP variable containing the text of the alert I want to display ($text) and I want to have it displayed in a javascript alert box (something like alert($text) ). I couldn't find out how to sort this out... Regards, Michael

[PHP] Re: Passing a PHP variable to javascript

2002-08-19 Thread Chris Schoeman
everyone, This may seem a newbie question... I have a PHP variable containing the text of the alert I want to display ($text) and I want to have it displayed in a javascript alert box (something like alert($text) ). I couldn't find out how to sort this out... Regards, Michael

[PHP] Rep:[PHP] Re: Passing a PHP variable to javascript

2002-08-19 Thread regardepas Sanete
Nice, Thank you -Message d'origine- De: Chris Schoeman [EMAIL PROTECTED] A: [EMAIL PROTECTED] Date: 19/08/02 Objet: [PHP] Re: Passing a PHP variable to javascript This is one way to do it ?php echo SCRIPT LANGUAGE=\JavaScript\\n; echo !--\n; echo alert(\$text\)\n; echo //--\n

Re: [PHP] Re: Passing a PHP variable to javascript

2002-08-19 Thread Pag
Hi, i am coding a news manager backend for a client and i ran into a little problem. I have two tables, one with the news and one with the comments on each news. How can i count how many comments there are for each news entry? Simply put, is there some sort of Mysql

Re: [PHP] Re: Passing a PHP variable to javascript

2002-08-19 Thread Adam Williams
Look up on www.mysql.com documentation, you can do a count within a select statement SELECT whatever COUNT(whatever) AS COUNT FROM table GROUP BY 'something' HAVING something = 'something' -- | whatever | count | -- | stuff selected |50

Re: [PHP] Variable

2002-08-16 Thread Analysis Solutions
On Wed, Aug 14, 2002 at 08:23:18AM +, Remon Redika wrote: input type=text name=namasa size=40 input type=text name=namadu size=40 input type=text name=namati size=40 $Namak = $namasa; $Namak = $Namak.$namadu; $Namak = $Namak.$namati; Is that REALLY what you want

[PHP] Variable

2002-08-14 Thread Remon Redika
this is the form -- insert.php tr td width=105Nama Satu/td td width=289 input type=text name=namasa size=40 /td /tr td width=105Nama Dua/td td width=289 input type=text name=namadu size=40 /td /tr td

[PHP] Variable naming standards???

2002-08-13 Thread Gerard Samuel
A philosophical question Are there any standards to naming variables?? I was told that one should include a letter or combination of letters to describe a variable i.e. $sfoo = 'string'; // string $bfoo = true; // bool $nfoo = 10; // interger etc Thanks -- Gerard Samuel

RE: [PHP] Variable naming standards???

2002-08-13 Thread Jay Blanchard
[snip] A philosophical question Are there any standards to naming variables?? I was told that one should include a letter or combination of letters to describe a variable i.e. $sfoo = 'string'; // string $bfoo = true; // bool $nfoo = 10; // interger [/snip]

Re: [PHP] Variable naming standards???

2002-08-13 Thread Nicholas Mercier
My two cents, I think if you are working on a personal product you use what works for you. If working in a group find out or decide as a group what standards to use. The hungarian standards are well designed, but I've seen others that work as well. When posting data from a from to another

Re: [PHP] Variable naming standards???

2002-08-13 Thread Pushkar Pradhan
Samuel this is what you can use as a standard (at least for yourself): http://www.cs.msstate.edu/~cs1314/global/guide It describes how to name variables, functions, scripts etc. In short the variable names must tell the programmer what it is being used for, e.g. $countHits = 0; // initialize

[PHP] Url of frame in php variable

2002-08-01 Thread patrick anderson
Hi, does anyone know of an elegant way to get the Url of the current frame in a php variable. Thanks for any suggestions. Patrick PS I know that PHP_SELF will provide the url of the main frame -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] Url of frame in php variable

2002-08-01 Thread Justin French
of an elegant way to get the Url of the current frame in a php variable. Thanks for any suggestions. Patrick PS I know that PHP_SELF will provide the url of the main frame -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Url of frame in php variable

2002-08-01 Thread patrick anderson
of the current frame in a php variable. Thanks for any suggestions. Patrick PS I know that PHP_SELF will provide the url of the main frame -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] variable variables and Sessions

2002-07-30 Thread Anup
I have a question about the following $LoadResult = mysql_query(SELECT * from Items where username='test' and password='test'); $num_results =mysql_num_rows($LoadResult); for ($i=0; $i $num_results;$i++) { $myrow = mysql_fetch_array($LoadResult, MYSQL_ASSOC); $ProductName =

[PHP] Variable not passing to second page

2002-07-08 Thread Terry Cheung
I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old php script files. They can display successfully, but whei I submit the data, they cannot pass to the second page even they can be shown in the URL with get method. here is one of my script jobapp.php HTML !--

Re: [PHP] Variable not passing to second page

2002-07-08 Thread Philip Olson
Please don't repeat your questions, see the other post for details. In short, it has to do with register_globals directive in php.ini Regards, Philip Olson On Tue, 9 Jul 2002, Terry Cheung wrote: I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old php script files.

Re: [PHP] Variable not passing to second page

2002-07-08 Thread Analysis Solutions
Hi Terry: See the answer to the other thread you already started on this subject. In short, use the superglobal's to access the input: $_POST['variablename'] --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution

[PHP] variable statements

2002-06-26 Thread Henning Sittler
Question: Variable variables and variable functions work great, but how can you execute arbitrary code statements using php code stored inside variables? // Example function stuff() { echo 'pStuff/p'; } // end stuff() $function = 'stuff'; $function(); // works /* Given the above, I

Re: [PHP] variable statements

2002-06-26 Thread Jason Wong
On Thursday 27 June 2002 01:34, Henning Sittler wrote: Question: Variable variables and variable functions work great, but how can you execute arbitrary code statements using php code stored inside variables? eval() -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source

RE: [PHP] variable statements

2002-06-26 Thread Henning Sittler
Perfect. Thank you Jason. Henning Sittler www.inscriber.com -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 1:44 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] variable statements On Thursday 27 June 2002 01:34, Henning Sittler wrote

[PHP] variable declaration in class

2002-06-18 Thread Jens Lehmann
Can anyone explain me why the following code causes the parse error ... unexpected * ... ? class test { var $a = 2*10; } Of course I know why there's a parse error, but I don't know the reason why PHP doesn't allow this multiplication, although it allows a statement like e.g. var $a = 20.

Re: [PHP] variable declaration in class

2002-06-18 Thread Analysis Solutions
On Tue, Jun 18, 2002 at 07:21:51PM +0200, Jens Lehmann wrote: class test { var $a = 2*10; } Of course I know why there's a parse error, but I don't know the reason why PHP doesn't allow this multiplication, Because, that's why. :) --Dan -- PHP classes that make

<    1   2   3   4   5   6   7   8   9   >