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

2004-05-27 Thread Matt Matijevich
[snip] 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. [/snip] Could you store them in a file? Maybe a database. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

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

2004-05-27 Thread Jay Blanchard
[snip] 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 don't know where to start (none of the search in internet gave me a

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

2004-05-27 Thread Santiago Peirano
Jay Blanchard wrote: [snip] 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 don't know where to start (none of the search in

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

2004-05-27 Thread Jason Barnett
If you're trying to prevent hitting the database then just cache the page result and store it as a temporary html file. Then serve the temporary file whenever people visit (and update every 15 minutes). Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

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

2004-05-27 Thread Lance Lovette
[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 server (a script of course) that keeps the value of certain variables between

[PHP] R: [PHP] variable passing using URL

2004-05-14 Thread Alessandro Vitale
[mailto:[EMAIL PROTECTED] Inviato: venerdì 14 maggio 2004 8.24 A: [EMAIL PROTECTED] Oggetto: [PHP] variable passing using URL hello list, I have a problem in passing variables using URLs. I have a link from a PHP 'Page One' and passing some variables thru URL. This link should now open another

RE: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-07 Thread gvarosky
, and it seemed to fix the problem. I also upgraded to php 4.3.5 and have not seen the problem since. Thanks again everyone! Regards, Geoff Varosky -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 3:58 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Weird

[PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Kim Steinhaug
My first thought is that some dynamic code on this page has an error. Typical like this : input type=var value=?=$var?' ^^ Or maby a quote is missing? Looking at your examples it looks like there are different parts of the HTML code comming

RE: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread gvarosky
Public Key - http://gvarosky.conversent.net/gvarosky.txt -Original Message- From: Kim Steinhaug [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 6:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Weird variable issue encountered... help needed! My first thought is that some dynamic

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Jason Wong
On Monday 05 April 2004 22:46, [EMAIL PROTECTED] wrote: Thank you all for your ideas so far, however, I ahve gone through all my code, and cannot seem to find the culprit. I believe it is a known bug with a particular old version of PHP, try using the latest. -- Jason Wong - Gremlins

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread John W. Holmes
From: Jason Wong [EMAIL PROTECTED] On Monday 05 April 2004 22:46, [EMAIL PROTECTED] wrote: Thank you all for your ideas so far, however, I ahve gone through all my code, and cannot seem to find the culprit. I believe it is a known bug with a particular old version of PHP, try using the

[PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread DvDmanDT
Hmm.. Are there any PHP settings that only applies to that vhost? Can you please try to run PHP as CGI few tries.. If the input is corrupt, that _could_ be caused by the Apache2 which accutually is marked as experimental... Basicly, this would get currupt? (wierd-var-test.php) ?

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Blake Schroeder
One problem wrong form action=wierd-var-test.php?action=post right form action=wierd-var-test.php method=post ?action is a variable with a value of post -Blake DvDmanDT wrote: Hmm.. Are there any PHP settings that only applies to that vhost? Can you please try to run PHP as CGI few tries.. If

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Blake Schroeder
Is this what your are trying to do? ?php $var = $_POST['var']; if($var) var_dump($_REQUEST); else { ? form action=index.php method=post input type=text name=var input type=submit /form ? } ? DvDmanDT wrote:

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Daniel Clark
I agree. I believe the default FORM METHOD is GET. One problem wrong form action=wierd-var-test.php?action=post right form action=wierd-var-test.php method=post ?action is a variable with a value of post -Blake DvDmanDT wrote: Hmm.. Are there any PHP settings that only applies to

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread DvDmanDT
Accutually, I intented ?action=post, and if($action=='post'), just forgot to add method=post.. :p -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Blake Schroeder [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] One problem wrong form

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Ben Ramsey
Just don't use register globals and use if ($_POST) instead of if($action=='post') so you don't have to include that ?action=post in the query string of your action. Dvdmandt wrote: Accutually, I intented ?action=post, and if($action=='post'), just forgot to add method=post.. :p -- Regards,

[PHP] Re: $this variable reference question

2004-04-02 Thread Jason Barnett
It's not the same thing. When an variable references an object then you can change either the original object or the new variable and you will be changing the *same* object, not a new one. Maybe this example helps? ?php class test { function test($val) { global

[PHP] Re: $this variable reference question

2004-04-02 Thread Jason Barnett
My question is actually regarding the line $myref = $this;. The author states that this is a reference to the class/object itself. Isn't this like saying outside the class $myref = new test;? What would be the point of referring to itself inside the class in this manner? Thanks for your

Re: [PHP] Re: $this variable reference question

2004-04-02 Thread Adam Reiswig
Jason, thanks. Yes, I understand your example here very well. My question actually had more to do with understanding what value was added to the class by $myref = $this;. Perhaps it is some misunderstanding I have of classes but, since a class is just a pattern and not an actual, usable

[PHP] passing a variable value of PHP into the alert of JavaScript.

2004-03-30 Thread Prabu Subroto
Dear my friends... I want to make an alert which can display a value from the database. I am meaning : how can I pass a value of a variable from PHP into JavaScript alert ( alert($Firstname, $LastName and $Address); Is it possible

[PHP] evaluating a variable

2003-12-22 Thread Carey Baird
Hey, I have stored the name of a function as a variable. I have then passed the variable to another function as follows: //put function name in a variable $contentfunction = newsadmincontent(); //pass variable to another function Html_content($contentfunction); //function is: function

Re: [PHP] evaluating a variable

2003-12-22 Thread Brad Pauly
On Mon, 2003-12-22 at 12:36, Carey Baird wrote: Hey, I have stored the name of a function as a variable. I have then passed the variable to another function as follows: //put function name in a variable $contentfunction = newsadmincontent(); //pass variable to another function

Re: [PHP] evaluating a variable

2003-12-22 Thread Matt Matijevich
try eval($contentfunction); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] evaluating a variable

2003-12-22 Thread Carey Baird
December 2003 19:43 To: Carey Baird Cc: php-gen Subject: Re: [PHP] evaluating a variable On Mon, 2003-12-22 at 12:36, Carey Baird wrote: Hey, I have stored the name of a function as a variable. I have then passed the variable to another function as follows: //put function name in a variable

RE: [PHP] evaluating a variable

2003-12-22 Thread Matt Matijevich
[snip] Eval ($contentfunction); gave me a parse error: Parse error: parse error in /home/pickled/public_html/main/inc/html.php(145) : eval()'d code on line 1 [/snip] try to add a semicolon to the end of the variable $contentfunction = newsadmincontent();; -- PHP General Mailing List (http

RE: [PHP] evaluating a variable

2003-12-22 Thread Brad Pauly
On Mon, 2003-12-22 at 12:43, Carey Baird wrote: Eval ($contentfunction); gave me a parse error: Parse error: parse error in /home/pickled/public_html/main/inc/html.php(145) : eval()'d code on line 1 $$contentfunction didnt output anything Any other ideas? What are you trying to do

Re: [PHP] evaluating a variable

2003-12-22 Thread John W. Holmes
Carey Baird wrote: Hey, I have stored the name of a function as a variable. I have then passed the variable to another function as follows: //put function name in a variable $contentfunction = newsadmincontent(); Take off the parenthesis... $contentfunction = 'newsadmincontent'; To call the

Re: [PHP] evaluating a variable

2003-12-22 Thread Brad Pauly
On Mon, 2003-12-22 at 13:09, John W. Holmes wrote: Carey Baird wrote: Hey, I have stored the name of a function as a variable. I have then passed the variable to another function as follows: //put function name in a variable $contentfunction = newsadmincontent(); Take off the

[PHP] Re: $_POST[$variable]

2003-12-11 Thread Mike
If you change the name of the data field to something[] then the $_POST['something'] will be an array containing your data The code you have will result in 2 fields (one hidden one normal) with the same name ($i), this will cause lots of problems It is not a good idea to give form fields

[PHP] Re: $_POST[$variable]

2003-12-11 Thread Christian Jancso
thx Mike that works :-) thx also to the others for their help :-)) Christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] in a Variable

2003-12-02 Thread Dimitri Marshall
Hi there, I'm sure this is an easy fix, but how do you either prevent users from being able to input in a field or make it so that it doesn't affect the code? Thanks in advance, Dimitri Marshall -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] in a Variable

2003-12-02 Thread Chris Shiflett
--- Dimitri Marshall [EMAIL PROTECTED] wrote: how do you either prevent users from being able to input in a field or make it so that it doesn't affect the code? Can you give an example of affecting the code? You can store spaces in variables just fine. Chris = Chris Shiflett -

Re: [PHP] in a Variable

2003-12-02 Thread Dimitri Marshall
Sorry, what I mean is... I have a field in a form where users input text. If the user inputs something like: Hi there, this is a quote and you should know it. Then only... Hi there, get's inserted because of the double quotes. Is that more clear? Dimitri Marshall Chris Shiflett [EMAIL

Re: [PHP] in a Variable

2003-12-02 Thread Richard Davey
Hello Dimitri, Wednesday, December 3, 2003, 3:28:19 AM, you wrote: DM I'm sure this is an easy fix, but how do you either prevent users from being DM able to input in a field or make it so that it doesn't affect the code? Assuming you mean the double quote marks, and not a blank space, use

Re: [PHP] in a Variable

2003-12-02 Thread Jason Sheets
Try using htmlentities() to convert the characters to the html entities that can be stored and displayed. http://www.php.net/htmlentities Jason Dimitri Marshall wrote: Sorry, what I mean is... I have a field in a form where users input text. If the user inputs something like: Hi there,

[PHP] getting an variable value from an array entry

2003-11-30 Thread Ian Truelsen
I am trying to do the following: I have a text file to read in that contains something like The temperature is $temp This gets read into an array so that I can parse it out word by word (the only way I could think to do this, any other ideas are welcome). I do a test to see whether the first

RE: [PHP] getting an variable value from an array entry

2003-11-30 Thread Bronislav Klucka
The temperature is $$temp Brona -Original Message- From: Ian Truelsen [mailto:[EMAIL PROTECTED] Sent: Sunday, November 30, 2003 9:27 PM To: php Subject: [PHP] getting an variable value from an array entry I am trying to do the following: I have a text file to read

Re: [PHP] getting an variable value from an array entry

2003-11-30 Thread Ian Truelsen
On Sun, 30 Nov 2003 21:44:50 +0100 Bronislav Klucka [EMAIL PROTECTED] wrote: The temperature is $$temp Unfortunately, that is not working for me. I have tried changing it in the text file, but that just outputs $$temp instead of the value of $temp. What I have is the array words, for which the

Re: [PHP] getting an variable value from an array entry

2003-11-30 Thread zhuravlev alexander
On Sun, Nov 30, 2003 at 01:04:08PM -0800, Ian Truelsen wrote: On Sun, 30 Nov 2003 21:44:50 +0100 Bronislav Klucka [EMAIL PROTECTED] wrote: The temperature is $$temp Unfortunately, that is not working for me. I have tried changing it in the text file, but that just outputs $$temp instead

Re: [PHP] getting an variable value from an array entry

2003-11-30 Thread Ian Truelsen
On Mon, 1 Dec 2003 00:16:07 +0300 zhuravlev alexander [EMAIL PROTECTED] wrote: Use eval. http://www.php.net/eval % cat temp.txt Temperature $temp degree. % cat temp.php ?php $temp = '5'; $filename = ./temp.txt; $handle = fopen ($filename, r); $code

Re: [PHP] getting an variable value from an array entry

2003-11-30 Thread Curt Zirzow
* Thus wrote zhuravlev alexander ([EMAIL PROTECTED]): % cat temp.txt Temperature $temp degree. % cat temp.php ?php $temp = '5'; $filename = ./temp.txt; $handle = fopen ($filename, r); $code = fread ($handle, filesize ($filename)); fclose ($handle);

[PHP] Re: giving variable value in URL problem

2003-11-17 Thread Lucian Cozma
Try: if (isset($_GET['status']) $_GET['status'] ==0) { echo Trying; } The warning is triggered by the fact that you use a variable that was not previously defined. Check it before use with isset. If in php.ini the value error_reporting = E_ALL, it will output warnings. If you want the

[PHP] testing a variable

2003-11-12 Thread Adam Williams
Hello, I need to test a variable to see if it contains a value or not, and if not, do something. My php is a little rusty, so which would be better? if ( !$var ) { echo do something;} or if ( !isset($var ) { echo do something;} or are both of those wrong, and if so, how hsoudl I check if a

RE: [PHP] testing a variable

2003-11-12 Thread Jay Blanchard
[snip] if ( !isset($var ) { echo do something;} [/snip] self answering questions, gotta' love 'em! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] testing a variable

2003-11-12 Thread CPT John W. Holmes
From: Adam Williams [EMAIL PROTECTED] I need to test a variable to see if it contains a value or not, and if not, do something. [snip] if ( !isset($var ) { echo do something;} That's the correct way. What I am doing is checking a field in an sql table, and if the field is null, empty,

Re: [PHP] testing a variable

2003-11-12 Thread R'twick Niceorgaw
Adam Williams said the following on 11/12/2003 11:37 AM Hello, I need to test a variable to see if it contains a value or not, and if not, do something. My php is a little rusty, so which would be better? if ( !$var ) { echo do something;} or if ( !isset($var ) { echo do something;} or are

Re: [PHP] testing a variable

2003-11-12 Thread Chris Shiflett
--- Adam Williams [EMAIL PROTECTED] wrote: I need to test a variable to see if it contains a value or not, and if not, do something. My php is a little rusty, so which would be better? This is a good page for understanding how things like isset(), is_null(), and empty() work:

[PHP] Re: Posting variable in url

2003-10-29 Thread Alexander Mueller
Frank Tudor wrote: I have a redirect that if conditions are right it will pass the user to a new page via $_POST. I am posting variables in the url and on this next page more form stuff awaits the user. If a user submits incorrect stuff in the form is posts to itself. The url holds

[PHP] limits on variable/classname length

2003-10-25 Thread Greg Beaver
Hi, Are there any limits on the length a variable or classname may be in PHP? I was unable to find anything in the manual, and my tests found that a variable over 2000 characters long still caused no error or problems. This is important because phpDocumentor 2.0 will be using a database to

Re: [PHP] limits on variable/classname length

2003-10-25 Thread Evan Nemerson
Hmmm I _think_ it depends on size_t, which (IIRC) is typically typdef'd as an unsigned long int. I say that because there are macros (like ZEND_SET_SYMBOL) that do strlen(name) all over the place. Here's an except from limits.h: /* Maximum value an `unsigned long int' can hold. (Minimum is 0.)

[PHP] PHP Notice: Undefined variable

2003-10-04 Thread nabil
I got PHP Notice: Undefined variable Should I define always any var ?? when do I have do define a var?? example if I want to write ?php if ($_POST['msg'] =='hi') { do something ... } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP Notice: Undefined variable

2003-10-04 Thread Comex
[EMAIL PROTECTED] Nabil: I got PHP Notice: Undefined variable Should I define always any var ?? when do I have do define a var?? example if I want to write ?php if ($_POST['msg'] =='hi') { do something ... } ?php if (!isset($_POST['msg'])) die(No message!); if ($_POST['msg'] == 'hi

Re: [PHP] PHP Notice: Undefined variable

2003-10-04 Thread Andrew Chernyack
Message - From: nabil [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, October 04, 2003 3:45 PM Subject: [PHP] PHP Notice: Undefined variable I got PHP Notice: Undefined variable Should I define always any var ?? when do I have do define a var?? example if I want to write ?php

[PHP] Re: PHP Notice: Undefined variable

2003-10-04 Thread Jon Kriek
Simply lower your error reporting level. If you do not have access to your php.ini (not everyone does), then can you can amend this directive in either .htaccess or even on a per script basis by using the error_reporting() function like so. error_reporting(2039); (Equivalent to E_ALL ~E_NOTICE)

Re: [PHP] PHP Notice: Undefined variable

2003-10-04 Thread Marek Kilimajer
Andrew Chernyack wrote: I recommend the next variant if ($_POST[msg] ==hi) Why? I've created an html file with form's action parameter as info.php that contains phpinfo(). The result was PHP_SELF /~adolf/info.php _POST[a] dv fdsvz _SERVER[CONTENT_LENGTH] 10 You see, _POST[a]

[PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Kirk Babb
I'm new at OO and still a newbie at PHP despite hacking away at it for a while (admittedly off and on). I'm creating a signup form for alumni of our department, and I'm trying to verify that they have not signed up previously before allowing their data to be inserted. Trouble has ensued! :) In

RE: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Javier Muniz
= select id, fname from contact_info where email = '$email'; Hope that helps! -Original Message- From: Kirk Babb [mailto:[EMAIL PROTECTED] Sent: Saturday, October 04, 2003 5:28 PM To: [EMAIL PROTECTED] Subject: [PHP] returning a variable from a class function? plus other probs I'm new

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Dan Anderson
A couple of things... $conxn = mysql_connect('localhost','root','redtail.7') or fail(Could not connect: .mysql_error()); Create a script inc.mysqlconnect.php that connects and selects and require_once() it on all of your files that need to connect to the database. This will save

Re: [PHP] returning a variable from a class function? plus otherprobs

2003-10-04 Thread Kirk Babb
Dan, Thanks so much for the help - I learned a lot from your reply. I'll chew on this a while and go from there. BTW- yes, that really was my user and pwd up until now! Dumb now I realize, thanks for pointing that out. I've created a new root pwd, and created a user with access only to the

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Curt Zirzow
* Thus wrote Dan Anderson ([EMAIL PROTECTED]): $chk = Select id, fname from contact_info where email = . $email; You need to quote the email. So perhaps the following would be more appropriate: $chk = SELECT id, fname FROM contact_info WHERE email = \{$email}\;

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Dan Anderson
Using ' is prefered IIRC, and also escaping all the data before sending it to the database: Hmmm. Perhaps Emacs isn't converting from Unicode to ASCII properly? ::shrugs:: I just know sometimes my queries don't work if I use ' . -Dan -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] returning a variable from a class function? plus otherprobs

2003-10-04 Thread Dan Anderson
up until now! Dumb now I realize, thanks for pointing that out. I've created a new root pwd, and created a user with access only to the alumni If you want to be super secure you should create several users. Once for SELECTing, one for INSERTing, etc. Juggling resource handles gets tricky

Re: [PHP] returning a variable from a class function? plusotherprobs

2003-10-04 Thread Kirk Babb
The user I created can only INSERT, SELECT, DELETE, UPDATE using the GRANT option from the mysql cmd line. I'll have to start checking my data per yours and Curt's responses. Sounds like I should remove the DELETE option from that user and create a second user with DELETE permission. -Kirk

Re: [PHP] returning a variable from a class function? plus other probs

2003-10-04 Thread Curt Zirzow
* Thus wrote Dan Anderson ([EMAIL PROTECTED]): Using ' is prefered IIRC, and also escaping all the data before sending it to the database: Hmmm. Perhaps Emacs isn't converting from Unicode to ASCII properly? ::shrugs:: I just know sometimes my queries don't work if I use ' . I just

[PHP] problem passing variable between forms.

2003-09-23 Thread Angelo Zanetti
:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 4:00 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] problem passing variable between forms. - Original Message - From: Angelo Zanetti [EMAIL PROTECTED] I have a form in which I have a table with dynamic checkboxes

Re: [PHP] problem passing variable between forms.

2003-09-23 Thread CPT John W. Holmes
From: Angelo Zanetti [EMAIL PROTECTED] therefore I can register this variable on the same page as the checkboxes? So therefore is it posssible for php to determine which checkboxes have been selected (or are the ones that are selected added to the array)? The ones that are selected are added

Re: [PHP] Re: forcing variable expansion

2003-09-22 Thread Eugene Lee
On Sun, Sep 21, 2003 at 03:01:41PM -0400, Rich Fox wrote: : Eugene Lee [EMAIL PROTECTED] wrote: : : If I have a block of text saved in an external text file, e.g.: : : All {$badstuff} and no {$goodstuff} makes {$name} a dull {$type}. : : after reading the text into a string, is there a way

Re: [PHP] Re: forcing variable expansion

2003-09-22 Thread Rich Fox
Sorry, we have a Eugene Lee at my aikido school and it's such an unusual name I thought you might be him. Eugene Lee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sun, Sep 21, 2003 at 03:01:41PM -0400, Rich Fox wrote: : Eugene Lee [EMAIL PROTECTED] wrote: : : If I have a

[PHP] Re: forcing variable expansion

2003-09-21 Thread Rich Fox
That's not Eugene from the dojo is it? Rich Eugene Lee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I have a block of text saved in an external text file, e.g.: All {$badstuff} and no {$goodstuff} makes {$name} a dull {$type}. after reading the text into a string, is there

[PHP] evaluating dynamic variable

2003-09-02 Thread Steve Goodman
Hi, I'm having trouble evaluating a dynamic variable. I want to check if the variable $_POST[resolutions$i] is an empty string, as you'll see from the code. However, every way I've tried to check the variable so far (including empty() and eval()) always returns a null value, even when the variable

RE: [PHP] evaluating dynamic variable

2003-09-02 Thread Jay Blanchard
[snip] I'm having trouble evaluating a dynamic variable. I want to check if the variable $_POST[resolutions$i] is an empty string, as you'll see from the code. However, every way I've tried to check the variable so far (including empty() and eval()) always returns a null value, even when the

Re: [PHP] evaluating dynamic variable

2003-09-02 Thread Matt Matijevich
this worked for me. ? $entries = 20; for ($i=1; $i=$entries; $i++) { if(isset($_POST[resolutions$i]) $_POST[resolutions$i] !== ''){ echo Hello $ibr /; } } ? html body form method=POST input type=hidden name=resolutions1 value=etefgtE / input type=hidden name=resolutions3

RE: [PHP] evaluating dynamic variable

2003-09-02 Thread Chris W. Parker
Steve Goodman mailto:[EMAIL PROTECTED] on Tuesday, September 02, 2003 12:54 PM said: Can someone recommend a way to reliably evaluate this variable? 1. (not positive on this point so correct me if I'm wrong) you shouldn't compare with !==. Instead us !=. 2. What does the following do?

RE: [PHP] evaluating dynamic variable

2003-09-02 Thread Chris W. Parker
Chris W. Parker on Tuesday, September 02, 2003 1:29 PM said: 1. (not positive on this point so correct me if I'm wrong) you shouldn't compare with !==. Instead us !=. Ok, turns out I'm wrong on that. I guess I should go look it up!! -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] evaluating dynamic variable

2003-09-02 Thread Stephen Goodman
singular, not plural. Thanks for the help everyone . -Original Message- From: Chris W. Parker [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 3:29 PM To: Stephen Goodman; [EMAIL PROTECTED] Subject: RE: [PHP] evaluating dynamic variable Steve Goodman mailto:[EMAIL PROTECTED

Re: [PHP] evaluating dynamic variable

2003-09-02 Thread CPT John W. Holmes
From: Stephen Goodman [EMAIL PROTECTED] When I run the code you've attached, with $i iterating up to 3, I get three 'empty!', even if $resolution1 should be 'not empty!'. It seems like the $i in $_POST[resolutions.$i] is not getting parsed into a value, and php is looking for a key

[PHP] problem passing variable between forms.

2003-08-26 Thread Angelo Zanetti
HI all I have a form in which I have a table with dynamic checkboxes, they are in a checkbox array ( name = chk[]...), I pass this variable to the next page using POST I receive the variable and use it, no problem, but then when I try to pass it to the next form in the URL (using an A HREF: a

Re: [PHP] problem passing variable between forms.

2003-08-26 Thread CPT John W. Holmes
- Original Message - From: Angelo Zanetti [EMAIL PROTECTED] I have a form in which I have a table with dynamic checkboxes, they are in a checkbox array ( name = chk[]...), I pass this variable to the next page using POST I receive the variable and use it, no problem, but then when I

Re: [PHP] problem passing variable between forms.

2003-08-26 Thread Lowell Allen
I have a form in which I have a table with dynamic checkboxes, they are in a checkbox array ( name = chk[]...), I pass this variable to the next page using POST I receive the variable and use it, no problem, but then when I try to pass it to the next form in the URL (using an A HREF: a

Re: [PHP] problem passing variable between forms.

2003-08-26 Thread Chris Shiflett
--- Angelo Zanetti [EMAIL PROTECTED] wrote: I pass this variable to the next page using POST I receive the variable and use it, no problem, but then when I try to pass it to the next form in the URL (using an A HREF: a href='confirmrequest.php?requested= . $chk . ' ) ... My

[PHP] Content of Variable ist html code

2003-08-24 Thread Matthias Wulkow
Hi php-general, I'm thinking of how I could store the content of a String-variable a) in a Variable to be passed to other functions b) in a Database (MySQL) too . The content is html-code (with tags and style code (css)). The point is that I'm making myself a kind of CMS, and I want to edit a

Re: [PHP] Content of Variable ist html code

2003-08-24 Thread Dan Anderson
I'm not sure what you're asking but... Using htmlentities() and undohtmlentities() (look up the real functions) to data going into and out of your database will allow you to store it without getting lots of errors... mySQL storage (even TEXT and BLOB types) can't be larger then so many bytes

[PHP] Re: Global variable question question

2003-07-23 Thread Kevin Stone
Jason Giangrande [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] When registered globals is set to off this does not effect the $PHP_SELF variable right? In other words I should be able to call $PHP_SELF with out having to do this $_SERVER['PHP_SELF'], right? Thanks, Jason

[PHP] [SESSION] Session variable deleted prior to command?

2003-07-16 Thread Ivo Fokkema
is then displayed, below which the previous login time should be printed, after which the variable is deleted. Yet, PHP seems to delete the variable prior to printing it on the screen, resulting in the absence of the previous login time, although the command to delete it from the array is issued AFTER

[PHP] Regex and variable usage

2003-07-16 Thread Gerard Samuel
Has anyone had any success with using variables in a regex shown below?? $foo = 3; $bar = 4; preg_match('/^[a-z0-9\-_\.]+\.[a-z0-9]{$foo, $bar}$/', $some_string) or even preg_match('/^[a-z0-9\-_\.]+\.[a-z0-9]{' . $foo . ', ' . $bar . '}$/', $some_string) but this would work

Re: [PHP] Regex and variable usage

2003-07-16 Thread Curt Zirzow
Gerard Samuel [EMAIL PROTECTED] wrote: Has anyone had any success with using variables in a regex shown below?? $foo = 3; $bar = 4; preg_match('/^[a-z0-9\-_\.]+\.[a-z0-9]{$foo, $bar}$/', $some_string) You have single quotes, so php wont expand the variables inside. or even

Re: [PHP] Regex and variable usage

2003-07-16 Thread Gerard Samuel
Curt Zirzow wrote: Gerard Samuel [EMAIL PROTECTED] wrote: or even preg_match('/^[a-z0-9\-_\.]+\.[a-z0-9]{' . $foo . ', ' . $bar . '}$/', $some_string) that should work. Unfortunately it doesn't for some reason. Don't know why. but you could do this: $pattern =

Re: [PHP] Regex and variable usage

2003-07-16 Thread Nomadeous
Gerard Samuel a écrit: Curt Zirzow wrote: Gerard Samuel [EMAIL PROTECTED] wrote: or even preg_match('/^[a-z0-9\-_\.]+\.[a-z0-9]{' . $foo . ', ' . $bar . '}$/', $some_string) I think, you Forgot, a \ before the $ at the end of the expression... that should work. Unfortunately it doesn't

[PHP] Carrying a variable

2003-07-15 Thread Ron Allen
.any clues as to why I can't carry the variable? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Carrying a variable

2003-07-15 Thread Ford, Mike [LSS]
-Original Message- From: Ron Allen [mailto:[EMAIL PROTECTED] Sent: 15 July 2003 10:55 I am using PHP 4.3.0 The way that I usually carry variables from one page to another is $Unit = ($_GET['Unit']); This is the page that is referencing it! ?PHP echo brbr; $DBName = SIGO;

[PHP] How to get executed php result in variable

2003-07-14 Thread Tariq Murtaza
Dear All, I need to get results like this. ? $result = get_executed_php_file_contents.php ? Looking for some solutions TM

Re: [PHP] How to get executed php result in variable

2003-07-14 Thread Chris Hayes
At 11:31 14-7-03, you wrote: Dear All, I need to get results like this. ? $result = get_executed_php_file_contents.php ? I use: ob_start(); include('modules/file.php'); $result=ob_get_contents(); ob_end_clean(); -- PHP General

Re: [PHP] How to get executed php result in variable

2003-07-14 Thread Ryan Gibson
Hi, Put a return statement at the end of file 'get_executed_php_file_contents.php' that returns the value you need, then use: ? $result = include(get_executed_php_file_contents.php); ? On 14/7/03 10:31 am, Tariq Murtaza [EMAIL PROTECTED] wrote: Dear All, I need to get results like

Re: [PHP] How to get executed php result in variable

2003-07-14 Thread Haseeb
ways fordoing this. HTH Haseeb ---Original Message--- From: Ryan Gibson Date: Monday, July 14, 2003 02:46:01 PM To: Tariq Murtaza; [EMAIL PROTECTED] Subject: Re: [PHP] How to get "executed php result" in variable Hi, Put a return statement at the e

[PHP] Stumper: Get Variable Name

2003-07-08 Thread Michael Smith
Alright, I've got an error reporting class with a report() method. I want to be able to e-mail myself the name of the variable that bombed out and the line that it was on (as well as the filename) if possible. Don't really know where to start... looks like this: function report ($error_var) {

Re: [PHP] Stumper: Get Variable Name

2003-07-08 Thread Mike Migurski
I want to be able to e-mail myself the name of the variable that bombed out and the line that it was on (as well as the filename) if possible. Don't really know where to start... looks like this: You can use PHP's predefined constants in an assertion, and debug_backtrace().

[PHP] ARGHHH!!! POST variable problem

2003-06-29 Thread Sparky Kopetzky
I can click links and they work but when I enter data in a form and try to send it to the next php script to process the data, nothing happens. Is there a simple way I can see what is returning from the browser to see if what I expect is actually getting there?? I think $_SERVER['QUERY_STRING']

Re: [PHP] ARGHHH!!! POST variable problem

2003-06-29 Thread Jason Wong
On Monday 30 June 2003 04:38, Sparky Kopetzky wrote: I can click links and they work but when I enter data in a form and try to send it to the next php script to process the data, nothing happens. Is there a simple way I can see what is returning from the browser to see if what I expect is

Re: [PHP] ARGHHH!!! POST variable problem

2003-06-29 Thread Sparky Kopetzky
OK, I see that I have to use $_POST['user_name'] or can I just use the variable passed back $user_name which would be a heck of a lot simpler?? Sparky - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 29, 2003 14:56 Subject: Re: [PHP] ARGHHH

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