Re: [PHP] alter switch variable inside case?

2002-08-31 Thread Joe Janitor
Regardless of how many break statements you take away (even if only 1), case statements appear to be ignored after the first match is made. I need a way to make the switch statement continue evaluating case-matches, even after the first case match is made. Further, it should allow one case

Re: [PHP] alter switch variable inside case?

2002-08-31 Thread @ Edwin
It seems like you can do something like this: switch ($foo) { case 'a': if (do_a()) echo "a was done"; else print_menu(); // changes here break; case 'b': if (do_b()) echo "b was done"; else print_menu(); // changes here break; case 'menu': print_menu();

[PHP] Re: using variable ..help

2002-08-28 Thread Remon Redika
construct will return either 0 or 1 for even and odd rows, so the proper color will be selected. HTH, Stas - Original Message - From: Remon Redika [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 28, 2002 2:46 PM Subject: [PHP] using variable ..help I wanna do

[PHP] Object member variable names

2002-08-26 Thread Karl Moritz Hermann
Hi, I've got a little problem with variable naming of object members. Here is my situation: I've got a website form, whoms contents will be saved in a MySQL table with two fields: name and value. The name could be anything like bla-test, array[3]-test[4]-name... Now I have a php script reading

[PHP] Re: Posting variable without form

2002-08-26 Thread Richard Lynch
I tried it but it is not successful. I think it is because I tried to post to a https(SSL link). You are correct. If you want to use SSL, you're better off using cURL. The above code would be about 100 X as large if it was trying to do all the encryption and SSL interchanges to get an SSL

[PHP] Destroy session variable when IE close

2002-08-14 Thread Christian Ista
Hello, Is it possible to set to null (or destroy) the session variables when I close IE ? Bye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Destroy session variable when IE close

2002-08-14 Thread Christian Ista
Hello, Is it possible to set to null (or destroy) the session variables when I close IE ? Bye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Include php code as variable

2002-08-03 Thread Alawi
How can I Include my php code code as variable and excute it ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Include php code as variable

2002-08-03 Thread Danny Shepherd
http://www.php.net/eval - Original Message - From: Alawi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 03, 2002 11:41 AM Subject: [PHP] Include php code as variable How can I Include my php code code as variable and excute it ? -- PHP General Mailing List

[PHP] Re: Include php code as variable

2002-08-03 Thread CC Zona
In article 00d501c23ada$87050590$3404a8c0@alawi, [EMAIL PROTECTED] (Alawi) wrote: How can I Include my php code code as variable and excute it ? include() can return a value, assignable to a variable. Some other ways to get the content of a file (I assume that's why you're saying include

[PHP] Re: passing variable via url ( newbye question)

2002-08-01 Thread Lord Loh.
; === Tested it! It worked! G stands for GET You can use P or C for POST or COOKIE The order of gpc is important the later overwites the former...see docs(XCVIII. Variable Functions) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Re: passing variable via url ( newbye question)

2002-07-31 Thread Saci
The obvius and easy think is alwaiss the hard to find My problem vas the of the BR tag, that I forgot, dummy issue but I made The right adn working one now are http://myadress/php/mypage.php?modo=123color=redsize=3 and to get echo $_GET['modo'].BR; echo $_GET['color'].BR; echo

[PHP] Re: passing variable via url ( newbye question)

2002-07-31 Thread Saci
Besides my newbye status, I guess you are not update. the $_GET is a must have when you use set globals to off, ( this is default after 4.2.1), and must be maintained for security reasons. Since I'm newbye I play with new and fresh version, and I can get details that older phpers does not take

[PHP] Re: passing variable via url ( newbye question)

2002-07-31 Thread Martin Clifford
Because you HAVE to use it if you have register_globals OFF. Only when register_globals is ON can you do what you thought is more efficient, but isn't. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Lord Loh. [EMAIL

[PHP] Re: passing variable via url ( newbye question)

2002-07-30 Thread Lord Loh.
http://myadress/php/mypage.php?modo=123color=redsize=3 is fine! you can now use these variables like $modo $color and $size; Why bother with $_GET['modo']; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: passing variable via url ( newbye question)

2002-07-30 Thread Leif K-Brooks
PLEASE don't tell the newbies to mess up their code! That is not compatible with all versions of php! DO NOT USE THOSE!!! STICK TO YOUR CURRENT GOOD CODE! Bother with them for security and compatibly. Lord Loh. wrote: http://myadress/php/mypage.php?modo=123color=redsize=3 is fine! you

[PHP] comparing a variable to value in DB

2002-07-29 Thread Tyler Durdin
I have a column in my DB named username and i am trying to compare a session ID called $username to the field in my DB called username. The way i had done it before was SELECT * from tablename WHERE Tablename.username == $username, but this does not seem to be working is there a better way to

Re: [PHP] comparing a variable to value in DB

2002-07-29 Thread Kevin Stone
not exist.; exit; } To check for blank fields simply ask ... WHERE username = ''. -Kevin - Original Message - From: Tyler Durdin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 12:46 PM Subject: [PHP] comparing a variable to value in DB I have a column in my DB

[PHP] problems with variable variables...

2002-07-12 Thread Dave at Sinewaves.net
I'm having a huge problem with getting variable variables to work. Here's what the code looks like... // This is set from a previous array... / $the_variablename[0] = processors; // Now I include a file called

[PHP] NEVERMIND! [PHP] problems with variable variables...

2002-07-12 Thread Dave at Sinewaves.net
Nevermind! I figured out the curly bracket syntax... Doh! It was buried in the manual the whole time! Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] hiding submitted variable values in location bar of browser !

2002-07-10 Thread Axel Tietje
Hi everyone, Is there any way to hide my form submitted variables (like passwords etc) in the location bar http://somedomain.org/checkpassword.php? password=mypassword or atleast show in an encypted form n the location bar. form method=POST HTH, Axel Tietje -- FLYnet FLYer

RE: [PHP] hiding submitted variable values in location bar of browser !

2002-07-10 Thread Sachin Keshavan
To: [EMAIL PROTECTED] Subject: Re: [PHP] hiding submitted variable values in location bar of browser ! Hi everyone, Is there any way to hide my form submitted variables (like passwords etc) in the location bar http://somedomain.org/checkpassword.php? password=mypassword or atleast show

[PHP] Hiding submitted variable values in location bar of browser !

2002-07-10 Thread Lord Loh.
Use the POST Method Use MD5 encryption for additional security === MD5.js= /* * Convert a 32-bit number to a hex string with ls-byte first */ var hex_chr = 0123456789abcdef; function rhex(num) { var str = ; for(var j = 0; j = 3; j++) str += hex_chr.charAt((num (j *

[PHP] Hiding submitted variable-Solution

2002-07-10 Thread Lord Loh.
Use the POST Method Use MD5 encryption for additional security === MD5.js= /* * Convert a 32-bit number to a hex string with ls-byte first */ var hex_chr = 0123456789abcdef; function rhex(num) { var str = ; for(var j = 0; j = 3; j++) str += hex_chr.charAt((num (j *

[PHP] Re: transporting variable via post to another site

2002-07-09 Thread Richard Lynch
I do have a multisite form. There are several fields on page 1 and several on page 2. Everything works fine exept of error handling. Which means if a user wants to go back from step 2 to one and has already filled in some data in site 2 he will loose this data for sure. It is not possible to

[PHP] hiding submitted variable values in location bar of browser !

2002-07-09 Thread chand
Hi everyone, Is there any way to hide my form submitted variables (like passwords etc) in the location bar http://somedomain.org/checkpassword.php? password=mypassword or atleast show in an encypted form n the location bar. /Chandu

Re: [PHP] hiding submitted variable values in location bar of browser !

2002-07-09 Thread Peter J. Schoenster
On 9 Jul 2002 at 22:09, [EMAIL PROTECTED] wrote: Is there any way to hide my form submitted variables (like passwords etc) in the location bar http://somedomain.org/checkpassword.php? password=mypassword or atleast show in an encypted form n the location bar. But why bother? Certainly you

Re: [PHP] hiding submitted variable values in location bar of browser !

2002-07-09 Thread David Otton
On Tue, 9 Jul 2002 22:09:58 -0400 (EDT), you wrote: Is there any way to hide my form submitted variables (like passwords etc) in the location bar http://somedomain.org/checkpassword.php? password=mypassword or atleast show in an encypted form n the location bar. You could use POST rather than

RE: [PHP] adding a variable to a variable name

2002-07-04 Thread Ford, Mike [LSS]
-Original Message- From: Tom Beidler [mailto:[EMAIL PROTECTED]] Sent: 03 July 2002 21:41 For the current issue I'm trying to unset some variables with common names and I would like to step through them with a loop. Here's where I'm at to give you an idea but the code doesn't

[PHP] adding a variable to a variable name

2002-07-03 Thread Tom Beidler
I'm wondering if this can be done, and if so, what's the proper way to do it. For the current issue I'm trying to unset some variables with common names and I would like to step through them with a loop. Here's where I'm at to give you an idea but the code doesn't work. for ($i = 2; $i = 4;

Re: [PHP] adding a variable to a variable name

2002-07-03 Thread Bogdan Stancescu
You are on the right track with the reasoning: $unsetA = level . $i . Name; unset($$unsetA); HTH Bogdan Tom Beidler wrote: I'm wondering if this can be done, and if so, what's the proper way to do it. For the current issue I'm trying to unset some variables with common names and I would

[PHP] dynamically creating variable names

2002-06-26 Thread Lee P Reilly
Hi, Can someone tell me if it's possible to create variable names from varaible names? I could work around this problem using some if/else statements, but I'm interested to see if there's another solution. I have 20 associative arrays all named compA, compB, compF, etc. The user supplies a

RE: [PHP] dynamically creating variable names

2002-06-26 Thread Lazor, Ed
I think so. Try using double dollar signs. $name = food; $$name = pizza; print $food; -Original Message- Can someone tell me if it's possible to create variable names from varaible names? This message is

Re: [PHP] dynamically creating variable names

2002-06-26 Thread Erik Price
On Wednesday, June 26, 2002, at 01:04 PM, Lee P Reilly wrote: Can someone tell me if it's possible to create variable names from varaible names? I could work around this problem using some if/else statements, but I'm interested to see if there's another solution. Just try it. for ($i = 0;

Re: [PHP] dynamically creating variable names

2002-06-26 Thread Lee P Reilly
Thanks for the replies. I'm still having a litte trouble though... Say I have an array called $compX, and given the letter 'X'... how can I access the variable $compX using these methods? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamically creating variable names

2002-06-26 Thread Rasmus Lerdorf
http://www.php.net/manual/en/language.variables.variable.php On Wed, 26 Jun 2002, Lee P Reilly wrote: Thanks for the replies. I'm still having a litte trouble though... Say I have an array called $compX, and given the letter 'X'... how can I access the variable $compX using these methods?

[PHP] using a variable stored in a variable.

2002-06-18 Thread Renaldo De Silva
how can i use a variable stored in a vaiable in a if statement? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] using a variable stored in a variable.

2002-06-18 Thread Lowell Allen
From: Renaldo De Silva [EMAIL PROTECTED] how can i use a variable stored in a vaiable in a if statement? Check the manual info on variable variables: http://www.php.net/manual/en/language.variables.variable.php -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] using a variable stored in a variable.

2002-06-18 Thread Pradeep Dsouza
$var1 = Names; $var2 = $var1; Pradeep Dsouza Naharonline.com - Original Message - From: Renaldo De Silva [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 19, 2002 4:14 AM Subject: [PHP] using a variable stored in a variable. how can i use a variable stored

[PHP] Value of variable with name stored in another variable

2002-06-13 Thread Daniele Baroncelli
How can I access the value of a variable whose name is stored in another variable? Example: $field=artist; How can I access the value of $artist ? Thanks Daniele -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Value of variable with name stored in another variable

2002-06-13 Thread Ford, Mike [LSS]
-Original Message- From: Daniele Baroncelli [mailto:[EMAIL PROTECTED]] Sent: 13 June 2002 17:27 How can I access the value of a variable whose name is stored in another variable? Example: $field=artist; How can I access the value of $artist ? $$field Cheers! Mike

RE: [PHP] Value of variable with name stored in another variable

2002-06-13 Thread John Holmes
Echo $$field; --John Holmes... -Original Message- From: Daniele Baroncelli [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 12:27 PM To: [EMAIL PROTECTED] Subject: [PHP] Value of variable with name stored in another variable How can I access the value of a variable whose

[PHP] Determine if variable is set

2002-06-11 Thread J. Anderson Scarbrough
This is probably an easy answer, but I cannot seem to find it. Is it possible to determine whether a variable is set with either $_POST or $GET without having to do: if(isset($_POST['foo']) || isset($_GET['foo'])) //do something

Re: [PHP] Determine if variable is set

2002-06-11 Thread Analysis Solutions
On Tue, Jun 11, 2002 at 09:06:34AM -0400, J. Anderson Scarbrough wrote: possible to determine whether a variable is set with either $_POST or $GET without having to do: if(isset($_POST['foo']) || isset($_GET['foo'])) if ( isset($_REQUEST['foo']) ) { --Dan -- PHP classes

[PHP] Passing a Variable to PHP Via the URL

2002-06-11 Thread jsegovia
My understanding is that when passing a querystring to PHP via the URL with the GET method, PHP will automatically create a variable with the name and value from the querystring. I'm trying to do this and it's not working. Here's my code from an online tutorial (angle braces replaced with

Re: [PHP] Passing a Variable to PHP Via the URL

2002-06-11 Thread Philip Olson
My understanding is that when passing a querystring to PHP via the URL with the GET method, PHP will automatically create a variable with the name and value from the querystring. I'm trying to do this and it's not working. Yes, if you have: example.com/foo.php?id=33 In the old days,

Re: [PHP] Determine if variable is set

2002-06-11 Thread 1LT John W. Holmes
: [PHP] Determine if variable is set On Tue, Jun 11, 2002 at 09:06:34AM -0400, J. Anderson Scarbrough wrote: possible to determine whether a variable is set with either $_POST or $GET without having to do: if(isset($_POST['foo']) || isset($_GET['foo'])) if ( isset($_REQUEST['foo

[PHP] Re: Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread Michael Davey
By reading the manual section relevant to your specific database... Igor Portnoy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I am passing a variable to the new page, when user clicks on the link. Something like that: a href=showimage.php?ID=38img

RE: [PHP] Re: Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread Michael Davey
at http://www.phpbuilder.com/columns/ if you need more help... Mikey BTW - reply to the list -Original Message- From: Igor Portnoy [mailto:[EMAIL PROTECTED]] Sent: 05 June 2002 19:59 To: Michael Davey Subject: RE: [PHP] Re: Passing variable to new page and pulling the rest of info

[PHP] Re: Passing variable to new page and pulling the rest of info from database

2002-06-05 Thread John Taylor-Johnston
Should find enough code for displaying graphics (and sending by smtp) in this code. You'll find some session stuff too. HTH J http://www.collegeSherbrooke.qc.ca/languesmodernes/postcard/index.html.phps http://www.collegeSherbrooke.qc.ca/languesmodernes/postcard/display_image.phps

[PHP] RE: notice:undefined variable

2002-06-04 Thread Michael Davey
OK - couple of things first: a) The PHP mailing list is for programmers of PHP looking for help making their own scripts - not for people who want support for implementing someone else's script. There is a link on the site where I found a copy of your script offering support, this is where you

[PHP] Re: notice:undefined variable

2002-06-04 Thread Michael Davey
Ooops, now I feel silly - sent this to the wrong list! Hangs head in shame! :-) Michael Davey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... OK - couple of things first: a) The PHP mailing list is for programmers of PHP looking for help making their own

[PHP] document root variable or function

2002-05-17 Thread webmaster
Is there a variable in PHP which will show the directory of the document root? I have done a few searches and before I go looking harder I thought I'd ask. My problem is that I am using both windows, IIS and linux, Apache. I tried a few things like $document_root which didn't seem to work

Re: [PHP] document root variable or function

2002-05-17 Thread Jason Wong
On Friday 17 May 2002 20:56, [EMAIL PROTECTED] wrote: Is there a variable in PHP which will show the directory of the document root? I have done a few searches and before I go looking harder I thought I'd ask. My problem is that I am using both windows, IIS and linux, Apache. I tried a few

Re: [PHP] document root variable or function

2002-05-17 Thread Michael Virnstein
$_SERVER[DOCUMENT_ROOT] Jason Wong [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 17 May 2002 20:56, [EMAIL PROTECTED] wrote: Is there a variable in PHP which will show the directory of the document root? I have done a few searches an

[PHP] Stronge Session Variable Problem with PopUP windows

2002-05-12 Thread Dennis Moore
I am running mod PHP 4.0.6 with Apache 1.3x. I am using session variables to pass various access information. Everything works like a charm until I popup a new window using Javascript. The session variable is set but to the wrong value. Has anyone else run into this issue or have any

[PHP] New Session Variable unset doesn't work

2002-05-03 Thread Sascha Ragtschaa
Hi, I somehow cannot unset Session variables. If I set for example $_SESSION[error]=formcheck (the new style) and I want to unset it at the end of the page (unset($_SESSION[error])), it's there again on the next page. Is there a special way to unset the new Session variables? I am using

Re: [PHP] New Session Variable unset doesn't work

2002-05-03 Thread Dan Hardiker
I somehow cannot unset Session variables. If I set for example $_SESSION[error]=formcheck (the new style) and I want to unset it at the end of the page (unset($_SESSION[error])), it's there again on the next page. Is there a special way to unset the new Session variables? Seen as you used

Re: [PHP] New Session Variable unset doesn't work

2002-05-03 Thread Pedro Pontes
Yes, always remember that unset() deletes the REFERENCE to the variable, not the variable itself, so in the next page, when you session_start() again, the reference is recreated to the still existing value. So, session_unregister is fundamental to unregister the reference from the session. To

[PHP] Variables within variable names

2002-05-02 Thread Jackson Miller
I want to do something along the lines of: $type = basic; $$type_user = jaxn; echo $basic_user; and have the output be jaxn. I have tried everything I can think of, and I have looked in all my books. I know how to: $type = basic; $$type = jaxn; echo $basic; but this won't do what I need. I

Re: [PHP] Variables within variable names

2002-05-02 Thread Jason Wong
On Friday 03 May 2002 02:43, Jackson Miller wrote: I want to do something along the lines of: $type = basic; $$type_user = jaxn; echo $basic_user; and have the output be jaxn. I have tried everything I can think of, and I have looked in all my books. I know how to: $type = basic;

RE: [PHP] Variable Inside Variable

2002-04-20 Thread Jeff Oien
On Fri, 19 Apr 2002, Jeff Oien wrote: Far better would be to put a placeholder in $body like and then just do $body = ereg_replace('', $url, $body); That's giving me a blank also. The form for changing the email is in a password protected area where only two people are allowed. But

Re: [PHP] Variable Inside Variable

2002-04-19 Thread Jason Wong
On Friday 19 April 2002 09:31, Jeff Oien wrote: I have a script which retrieves the body of an email message from a MySQL database to be sent to someone who applies using a form. The script contains this: $url = a href=\http://$HTTP_HOST$SCRIPT_NAME\;http://$HTTP_HOST$SCRIPT_NAME/a; $url =

RE: [PHP] Variable Inside Variable

2002-04-19 Thread Jeff Oien
On Friday 19 April 2002 09:31, Jeff Oien wrote: I have a script which retrieves the body of an email message from a MySQL database to be sent to someone who applies using a form. The script contains this: $url = a href=\http://$HTTP_HOST$SCRIPT_NAME\;http://$HTTP_HOST$SCRIPT_NAME/a;

RE: [PHP] Variable Inside Variable

2002-04-19 Thread Miguel Cruz
On Fri, 19 Apr 2002, Jeff Oien wrote: Use eval(). I have $url (literally) embedded in some text in the database that is to be sent as an email message. I'm using this and $url disappears with a blank spot in the text: eval(\$body = \$body\;); I've tried variations and can't get it to

RE: [PHP] Variable Inside Variable

2002-04-19 Thread Jeff Oien
On Fri, 19 Apr 2002, Jeff Oien wrote: Use eval(). I have $url (literally) embedded in some text in the database that is to be sent as an email message. I'm using this and $url disappears with a blank spot in the text: eval(\$body = \$body\;); I've tried variations and can't get

RE: [PHP] Variable Inside Variable

2002-04-19 Thread Miguel Cruz
On Fri, 19 Apr 2002, Jeff Oien wrote: Far better would be to put a placeholder in $body like and then just do $body = ereg_replace('', $url, $body); That's giving me a blank also. The form for changing the email is in a password protected area where only two people are allowed. But I'll

[PHP] Re: Global variable

2002-04-18 Thread Michael Andersson
Maybe you could use sessions like: session_start(); session_register('verified'); $verified=0 Erich Kolb [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have developed a simple login script. Right now it will check a submitted username and password and

[PHP] Variable Inside Variable

2002-04-18 Thread Jeff Oien
I have a script which retrieves the body of an email message from a MySQL database to be sent to someone who applies using a form. The script contains this: $url = a href=\http://$HTTP_HOST$SCRIPT_NAME\;http://$HTTP_HOST$SCRIPT_NAME/a; $url = addslashes($url); $msg1 .= $body; //to be sent via

Re: [PHP] Sending a variable without it being seen

2002-04-17 Thread Miguel Cruz
You can pass it using POST rather than GET-style arguments, but that will require structuring your pages so that people use buttons to get from one to the next, and it will only keep really dumb people from seeing the variables. Other than that, look at the manual's section on Sessions.

Re: [PHP] Warning: Undefined variable

2002-04-04 Thread Erik Price
Good to hear from you again David, On Wednesday, April 3, 2002, at 06:28 AM, DL Neil wrote: If they are one and the same machine/server, then use 'debug' code to reset options at the beginning of dev code (and remove it when the routine is 'promoted' to prod). Excellent idea. E_ALL for

Re: [PHP] Warning: Undefined variable

2002-04-03 Thread DL Neil
Erik, My two cents' (with allowance for inflation...) If you're distributing code in cyberspace it's a good idea to make it error free too, E_NOTICE or otherwise. To get the maximum help when coding, and to ensure the minimum of confusion for your users, I recommend: 1 set the dev server's

Re: [PHP] Warning: Undefined variable

2002-04-03 Thread Rasmus Lerdorf
I got back quite a few responses on this list on the subject of having variables that are not defined before they are used. That's interesting -- it's nice to know that I can take shortcuts and conjure them up on the fly, but I didn't realize that it was good practice to declare the

Re: [PHP] Warning: Undefined variable

2002-04-02 Thread Erik Price
On Monday, April 1, 2002, at 11:15 PM, Philip Olson wrote: Good little programmers define variables before using them, or at least before evaluating them. Really? I'm not arguing with you, I'm curious: I thought that it was a valued feature of newer scripting languages that they do not

RE: [PHP] Warning: Undefined variable

2002-04-02 Thread Rick Emery
++. That said, I love the power that PHP provides as far as functionality is concerned. just my 2 pfennigs... -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 8:26 AM To: Philip Olson Cc: kip; [EMAIL PROTECTED] Subject: Re: [PHP] Warning: Undefined

[PHP] Passing a variable invisibly via a href?

2002-04-02 Thread Daniel Alsén
Hi, i need to pass a variable by letting the user click on a link. Right now i do it like: page.php?variable=value However, i don´t want the variable, and it´s value to appear in the adress bar of the browser. And i don´t want people to be able to pass the same variable by reloading the

Re: Re: [PHP] Warning: Undefined variable

2002-04-02 Thread Adam Voigt
, April 02, 2002 8:26 AM To: Philip Olson Cc: kip; [EMAIL PROTECTED] Subject: Re: [PHP] Warning: Undefined variable On Monday, April 1, 2002, at 11:15 PM, Philip Olson wrote: Good little programmers define variables before using them, or at least before evaluating them. Really? I'm

Re: [PHP] Passing a variable invisibly via a href?

2002-04-02 Thread Tyler Longren
PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 9:02 AM Subject: [PHP] Passing a variable invisibly via a href? Hi, i need to pass a variable by letting the user click on a link. Right now i do it like: page.php?variable=value However, i don´t want the variable

Re: Re: [PHP] Passing a variable invisibly via a href?

2002-04-02 Thread Adam Voigt
[EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 9:02 AM Subject: [PHP] Passing a variable invisibly via a href? Hi, i need to pass a variable by letting the user click on a link. Right now i do it like: page.php?variable=value However, i don´t want the variable, and it´s value

SV: [PHP] Passing a variable invisibly via a href?

2002-04-02 Thread Daniel Alsén
You could use a form and have a hidden vield that contains a value. The user would have to click the submit button for the variable/value to carry over though. I thought about that. But i have two possible values (via two links) that could be passed and i can´t really get it together. Two

Re: [PHP] Passing a variable invisibly via a href?

2002-04-02 Thread Tyler Longren
That might not be such a good idea then. Tyler - Original Message - From: Daniel Alsén [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 9:11 AM Subject: SV: [PHP] Passing a variable invisibly via a href? You could use a form and have a hidden vield

Re: [PHP] Passing a variable invisibly via a href?

2002-04-02 Thread Adrian Murphy
PROTECTED] Sent: Tuesday, April 02, 2002 4:02 PM Subject: [PHP] Passing a variable invisibly via a href? Hi, i need to pass a variable by letting the user click on a link. Right now i do it like: page.php?variable=value However, i don´t want the variable, and it´s value to appear in the adress

SV: SV: [PHP] Passing a variable invisibly via a href?

2002-04-02 Thread Daniel Alsén
Yes, there is a way to do it without using any forms. I may be able to help you better if you could show me the relevant code -- I'm not sure if what I have in mind is really applicable to what you want to do. It´s not really advanced: session_start(); session_register('text_size'); if

Re: SV: SV: [PHP] Passing a variable invisibly via a href?

2002-04-02 Thread Erik Price
On Tuesday, April 2, 2002, at 10:28 AM, Daniel Alsén wrote: I use the variable $change to set the text size in my stylesheet: if (isset($text_size)) {echo $text_size;} else {echo 10; $text_size = 10;} And i set the variable via a link: a href=? echo $PHP_SELF; ??change=inc (or

Re: [PHP] Warning: Undefined variable

2002-04-02 Thread Philip Olson
Good little programmers define variables before using them, or at least before evaluating them. Really? I'm not arguing with you, I'm curious: I thought that it was a valued feature of newer scripting languages that they do not require declaration of variables. At least that's what

Re: [PHP] Warning: Undefined variable

2002-04-02 Thread Erik Price
On Tuesday, April 2, 2002, at 03:27 PM, Philip Olson wrote: If you're distributing code in cyberspace it's a good idea to make it error free too, E_NOTICE or otherwise. I got back quite a few responses on this list on the subject of having variables that are not defined before they are

Re: [PHP] Warning: Undefined variable

2002-04-02 Thread Philip Olson
We are confusing one another :) I'm not talking about declaring variables per se, but rather making sure the variable exists before evaluating it. So: $var = 'foobar'; if ($var == 'foobar') That's fine, no need to do declare $var before this in PHP. My words here simply mean to make sure

[PHP] Warning: Undefined variable

2002-04-01 Thread kip
Hi, As i know we don't need to define a variable before in PHP. But i have a very strange case. In my server, i hosted a PHP website. When i update the server from PHP3 to PHP4, problems came out. Most of the php pages didn't work and display many warnings like that : Warning: Undefined variable

RE: [PHP] Warning: Undefined variable

2002-04-01 Thread Martin Towell
maybe the reporting of warning is turn off for the php3 installation, but turned on for the php4 installation. -Original Message- From: kip [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 12:21 PM To: [EMAIL PROTECTED] Subject: [PHP] Warning: Undefined variable Hi, As i know

Re: [PHP] Warning: Undefined variable

2002-04-01 Thread Philip Olson
E_NOTICE all over the place, it's not a good idea. More and more people are learning to not do that. On Tue, 2 Apr 2002, kip wrote: Hi, As i know we don't need to define a variable before in PHP. But i have a very strange case. In my server, i hosted a PHP website. When i update the server

[PHP] Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE ?)

2002-03-15 Thread Charlie Killian
I have error's enabled in php.ini. I keep getting Undefined variable when I run a script that contains IF or ELSE IF's. Is this normal because the variable hasn't been set at the beginning of the script ? Yes. If the variable hasn't been defined previously you'll get a warning: if ( $dd 2)

Re: [PHP] Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE?)

2002-03-15 Thread mnc
On Fri, 15 Mar 2002, Daniel Negron/KBE wrote: Thank You Charlie. I also found out that I needed to put an symbol infrom of the string. This stopped it from throwing me an error. If($submit) blah blah blah Better yet, use: if (isset($submit)) blah blah blah That explicitly checks to

RE: [PHP] Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE ?)

2002-03-15 Thread Dave
PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 3:46 PM To: Daniel Negron/KBE Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Undefined Variable in IF...ELSE IF ...ELSE IF (NEWBIE ?) On Fri, 15 Mar 2002, Daniel Negron/KBE wrote: Thank You Charlie. I also found out that I needed

Re: [PHP] using a variable to a function call

2002-03-08 Thread Matt Williams
On Thursday 07 March 2002 19:21, Lars Torben Wilson wrote: // The direct way: $foo-{$test . '_foo'}(); Thanks Lars This was what I was looking for, just couldn't remember the syntax -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Finding variable names in strings, and replacing with values?

2002-03-08 Thread Jan Grafström
Hi Nick! http://www.php.net/manual/en/function.str-replace.php Regards, Jan Nick Richardson [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Been working on this one for quite awhile, and it's probably a fairly easy solution, but i can't find it... so thought

RE: [PHP] Calling a Variable in a weird Way

2002-03-07 Thread Ford, Mike [LSS]
-Original Message- From: Phillip S. Baker [mailto:[EMAIL PROTECTED]] Sent: 07 March 2002 05:52 for ($i=1; $i 12; $i++) { echo state_$i; // This would print out either Yes No or Maybe. } Close -- it's actually: echo ${state_$i}; (For the record, these are

[PHP] using a variable to a function call

2002-03-07 Thread Matt Williams
Hi all I get a variable that is set be a select box on a page. I want to use this variable to call a function within a class that is based on it's name. so if $var = me I want to call $class-me_function(); or if $var = you call $class-you_function(); How can I use the variable as part

Re: [PHP] using a variable to a function call

2002-03-07 Thread Edward van Bilderbeek - Bean IT
me_function() { ... } } $class = new test(); $class-do($var); Greets, Edward - Original Message - From: Matt Williams [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 3:25 PM Subject: [PHP] using a variable to a function call Hi all I

Re: [PHP] using a variable to a function call

2002-03-07 Thread Lars Torben Wilson
On Thu, 2002-03-07 at 06:25, Matt Williams wrote: Hi all I get a variable that is set be a select box on a page. I want to use this variable to call a function within a class that is based on it's name. so if $var = me I want to call $class-me_function(); or if $var = you

[PHP] Calling a Variable in a weird Way

2002-03-06 Thread Phillip S. Baker
I am not sure I can articulate this well. But I will try. I want to combine either two variables or a variable and string to bring up the name of a previous variable name to display the data from the first. So in the first part I will have a listing that will look like type=radio name=state_1

<    3   4   5   6   7   8   9   10   >