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

2003-06-29 Thread Reuben D. Budiardja
, no. Default is register_globals= Off for PHP = 4.2.0 http://us2.php.net/register_globals RDB Sparky - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 29, 2003 14:56 Subject: Re: [PHP] ARGHHH!!! POST variable problem On Monday 30

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

2003-06-29 Thread Chris Hayes
At 22:38 29-6-2003, you 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 actually getting there?? I

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

2003-06-29 Thread Sparky Kopetzky
[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 29, 2003 14:56 Subject: Re: [PHP] ARGHHH!!! POST variable problem 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

[PHP] Naming a variable with a variable

2003-06-17 Thread Antti
Ho can I create (name) a variable with other variables value? If $foo = bar; then the variable I want to create is $bar. How do I do this? -antti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Naming a variable with a variable

2003-06-17 Thread Dan Joseph
Hi, Ho can I create (name) a variable with other variables value? If $foo = bar; then the variable I want to create is $bar. $$foo = blah; that will set $bar equal to blah. -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Naming a variable with a variable

2003-06-17 Thread Mika Tuupola
On Tue, 17 Jun 2003, Antti wrote: Ho can I create (name) a variable with other variables value? If $foo = bar; then the variable I want to create is $bar. How do I do this? ?php $foo = 'bar'; $$foo = 'barvalue'; print $bar; ? This prints barvalue. -- Mika Tuupola

Re: [PHP] Naming a variable with a variable

2003-06-17 Thread Mike Migurski
Ho can I create (name) a variable with other variables value? If $foo = bar; then the variable I want to create is $bar. How do I do this? $$foo see: http://www.php.net/manual/en/language.variables.variable.php - michal

Re: [PHP] Naming a variable with a variable

2003-06-17 Thread R'twick Niceorgaw
$$foo or ${$foo} somethinbg like that ? http://us2.php.net/manual/en/language.variables.variable.php R'twick - Original Message - From: Antti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 2:19 PM Subject: [PHP] Naming a variable with a variable Ho can I create

RE: [PHP] make a variable not exist?

2003-06-13 Thread Ford, Mike [LSS]
-Original Message- From: Amanda McComb [mailto:[EMAIL PROTECTED] Sent: 12 June 2003 22:21 Is there a way to make a variable not exist? There are several places where I test (!$variable), and I want to be able to change the variable to pass that test, even though it exists, under

[PHP] make a variable not exist?

2003-06-12 Thread Amanda McComb
Is there a way to make a variable not exist? There are several places where I test (!$variable), and I want to be able to change the variable to pass that test, even though it exists, under certain circumstances. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] make a variable not exist?

2003-06-12 Thread Alex Earl
Is there a way to make a variable not exist? There are several places where I test (!$variable), and I want to be able to change the variable to pass that test, even though it exists, under certain circumstances. Thanks. You can unset the variable www.php.net/unset but also I would

Re: [PHP] make a variable not exist?

2003-06-12 Thread Leif K-Brooks
And won't generate a notice. Alex Earl wrote: You can unset the variable www.php.net/unset but also I would recommend using if(!isset($variable)) instead of just if(!$variable) its a little more clear as to what you are really trying to see I think. Alex -- The above message is encrypted

[PHP] Notice: Undefined variable: PHP_SELF

2003-05-29 Thread Dandie
Hi, I am having problem with a PHP page on our web site. I've installed the latest version of PHP on a Windows 2000 server. The error we're getting is: Notice: Undefined variable: PHP_SELF Where do I start to fix this problem? Thanks -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Notice: Undefined variable: PHP_SELF

2003-05-29 Thread John W. Holmes
I am having problem with a PHP page on our web site. I've installed the latest version of PHP on a Windows 2000 server. The error we're getting is: Notice: Undefined variable: PHP_SELF Where do I start to fix this problem? Read the release notes. Register_globals is OFF. Use

RE: [PHP] Returning a variable from a function problem

2003-04-02 Thread Ford, Mike [LSS]
-Original Message- From: ODCS [mailto:[EMAIL PROTECTED] Sent: 02 April 2003 08:10 I have a form where the user inputs information - the code below is the error checking for one of the fields. The first IF statement just checks that the filed is not empty and works fine. Then

[PHP] Returning a variable from a function problem

2003-04-01 Thread ODCS
I have a form where the user inputs information - the code below is the error checking for one of the fields. The first IF statement just checks that the filed is not empty and works fine. Then I check a function I made to see if the user is already in a mysql database and the function returns

[PHP] Separators in variable values causing MySQL commands to fail

2003-03-22 Thread rentAweek Ltd
In my PHP script I have coded e.g.: $sql = INSERT INTO `$owners` ( `FirstName`, `LastName`) VALUES ( '$firstname' , '$lastname' ); $result = mysql_query($sql); So along comes e.g. John O'Groats and nothing gets inserted into the database. OK, I can bypass my oversight by stripping out

Re: [PHP] Separators in variable values causing MySQL commands to fail

2003-03-22 Thread Jim Lucas
you must remove the backticks. Jim - Original Message - From: rentAweek Ltd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 22, 2003 9:50 AM Subject: [PHP] Separators in variable values causing MySQL commands to fail In my PHP script I have coded e.g.: $sql = INSERT

Re: [PHP] Separators in variable values causing MySQL commands to fail

2003-03-22 Thread David Otton
On Sat, 22 Mar 2003 17:50:30 +, you wrote: OK, I can bypass my oversight by stripping out apostophes from the variable values. There has to be a better way please. http://www.php.net/manual/en/function.mysql-escape-string.php -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Separators in variable values causing MySQL commands to fail

2003-03-22 Thread Jim Lucas
and , you need to escape the values that you are inputing ie. htmlspecialchars() or htmlentities() those values Jim - Original Message - From: rentAweek Ltd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 22, 2003 9:50 AM Subject: [PHP] Separators in variable values

Re: [PHP] Separators in variable values causing MySQL commands to fail

2003-03-22 Thread Larry E. Ullman
OK, I can bypass my oversight by stripping out apostophes from the variable values. There has to be a better way please. Turn on Magic Quotes GPC or use the addslashes() function. Or, if you want to be more precise and MySQL-specific, use the mysql_escape_string() or mysql_real_escape_string()

Fwd: Re: [PHP] Separators in variable values causing MySQL commands to fail

2003-03-22 Thread L0vCh1Y
- rentAweek, rL In my PHP script I have coded e.g.: rL $sql = INSERT INTO `$owners` ( `FirstName`, `LastName`) VALUES ( rL '$firstname' , '$lastname' ); rL $result = mysql_query($sql); rL So along comes e.g. John O'Groats and nothing gets inserted into the rL database. rL OK, I can bypass

[PHP] Re: Passing variable from webpage to php (newbie?)

2003-03-19 Thread Bobby Patel
You have register_globals set to off (read up on register globals in php.net). your code should read $HTTP_POST_VARS['action'] or $_POST['action'] (depending on PHP version) INSTEAD of just $action. so to test an if:: if ($HTTP_POST_VARS['action']==1) { /* Code for if action is equal to 1 */ }

Re: [PHP] Re: Passing variable from webpage to php (newbie?)

2003-03-19 Thread Adam Voigt
That's actually a GET request, so $_GET['action'], instead of $_POST. On Wed, 2003-03-19 at 11:18, Bobby Patel wrote: You have register_globals set to off (read up on register globals in php.net). your code should read $HTTP_POST_VARS['action'] or $_POST['action'] (depending on

[PHP] Re: SESSION variable and register_globals

2003-02-10 Thread Bastian Vogt
Hi all, 1.If register_globals is on, then doing an unset($_SESSION[blah]), to unset a session variable will not work as the variable will be unset in that particular instance but will be restored in next instance of that session. Hence session_unregister(blah) also must be used to properly

[PHP] Reading Posted variable names

2003-02-05 Thread Mike Morton
I am trying to write a quick form-mail script (like Matt's) and I am stuck on one small part: form: form method=post action=form.php input type=text name='field1'br input type=text name='field2'br input type=text name='field3'br input type=text name='field4'br input type=text name='field5'br

RE: [PHP] Reading Posted variable names

2003-02-05 Thread John W. Holmes
I am trying to write a quick form-mail script (like Matt's) and I am stuck on one small part: form: form method=post action=form.php input type=text name='field1'br input type=text name='field2'br input type=text name='field3'br input type=text name='field4'br input type=text

[PHP] arrays;session variable; empty variable

2003-02-03 Thread André Rosendaal
Hi, I have spend several hours on the following issue, and I can't figure out what I am doing wrong. Consider the next function: function CreateFileForRealPlayer () { global $playlist; $filename = $playlist[0]['url']; header(Content-Type: audio/x-pn-realaudio;); echo ($filename); }

[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] Adding a variable to oracle that contains quotation marks??

2003-01-21 Thread Rea_David
Hi All, I'm trying to add a variable to an oracle database but it fails due to the fact that it contains quotation marks. These have to be present for the end user. My Script is as follows: === if ($conn == true) {

Re: [PHP] Adding a variable to oracle that contains quotation marks??

2003-01-21 Thread Rick Emery
$query = UPDATE ACTIVITY SET COMMENTS = \'$updatecomments\' WHERE ACTIVITY_ID =\'$actcode\'; - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 21, 2003 6:53 AM Subject: [PHP] Adding a variable to oracle that contains quotation marks?? Hi All

Re: [PHP] Adding a variable to oracle that contains quotation marks??

2003-01-21 Thread Henry
Once you use double quota mark the character BackSlash doesn't need anymore that's my experience ^_^ - Original Message - From: Rick Emery [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 21, 2003 8:56 PM Subject: Re: [PHP] Adding a variable to oracle

RE: [PHP] Adding a variable to oracle that contains quotation marks??

2003-01-21 Thread Rea_David
. -Original Message- From: Henry [mailto:[EMAIL PROTECTED]] Sent: 21 January 2003 13:12 To: Rick Emery; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Adding a variable to oracle that contains quotation marks?? Once you use double quota mark the character BackSlash doesn't need anymore

RE: [PHP] Adding a variable to oracle that contains quotation mar ks??

2003-01-21 Thread Ford, Mike [LSS]
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 21 January 2003 15:05 Thanks Rick Henry, but I am still unable to add single quotation marks '. When I added the \' to the variable as given below (thanks again Rick) I get the following error when

Re: [PHP] Error in variable when looping

2003-01-14 Thread menezesd
- Original Message - From: menezesd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 13, 2003 6:21 PM Subject: [PHP] Error in variable when looping Hello friends, I have made the following table of data and a button on every row to view the details. The code is working fine

Re: [PHP] Error in variable when looping

2003-01-14 Thread Tim Ward
Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: menezesd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 14, 2003 12:21 AM Subject: [PHP] Error in variable when looping Hello friends, I have made the following table of data and a button

Re: [PHP] Error in variable when looping

2003-01-14 Thread Denis L. Menezes
Hello Tim. Could you help me a little further and tell me exactly where to put this? Thanks Denis - Original Message - From: Tim Ward [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 14, 2003 5:16 PM Subject: Re: [PHP] Error in variable when looping

Re: [PHP] Error in variable when looping

2003-01-14 Thread Tim Ward
://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Denis L. Menezes [EMAIL PROTECTED] To: Tim Ward [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, January 14, 2003 11:50 AM Subject: Re: [PHP] Error in variable when looping Hello Tim. Could you help me a little

[PHP] Error in variable when looping

2003-01-13 Thread menezesd
Hello friends, I have made the following table of data and a button on every row to view the details. The code is working fine and the table is displayed with the buttons. The problem I have is that the $SelectedItemNumber posted to the next page remains the same number no matter which row

Re: [PHP] Error in variable when looping

2003-01-13 Thread Rick Emery
so where is $rowe set? Show us code that calls this page - Original Message - From: menezesd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 13, 2003 6:21 PM Subject: [PHP] Error in variable when looping Hello friends, I have made the following table of data and a button

[PHP] Re: undefined variable notice - how to furn of

2003-01-10 Thread Philippe Saladin
Everything works fine, just now I'm getting Notice messages for every undefined variable or undefined index in arrays.. So now I have to use issset() everytime to avoid this messages... you would initialize your variables in the beginning of your scripts. With that, you don't need isset(). ..is

[PHP] read javascript variable php?????

2003-01-08 Thread Ysrael Guzmán
example: location.href=$destination; or location.href=?php $destination; ; or echo location.href=', $destino, ';; PLEASE GIVE A IDEA Ysrael Guzmán Meza -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] read javascript variable php?????

2003-01-08 Thread Bill Arbuckle, Jr.
location.href=?= $destination ? should work ... hth ... Bill -Original Message- From: Ysrael Guzmán [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 4:30 PM To: [EMAIL PROTECTED] Subject: [PHP] read javascript variable php? example: location.href=$destination

[PHP] Help: Undefined variable

2002-12-16 Thread New B
Please help! I am a beginner of php, I got an error from my own webpage: Notice: Undefined variable: Array in C:\Inetpub\wwwroot\php\HandleForm.php on line 23 Please enter a valid Web address! Below is my code: ? function WriteToFile ($URL, $Description) { /* Function WriteToFile takes two

RE: [PHP] Help: Undefined variable

2002-12-16 Thread John W. Holmes
- A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: New B [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 9:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Help: Undefined variable Please help! I am a beginner of php

[PHP] Don't get variable to be passed to the page on submit

2002-12-13 Thread Davíð Örn Jóhannsson
I have this code whitch I have been staring at for hours and I just can’t figure out what is going on... it is about as simple as it gets I just need to pass a variable from this page to it self, and that would be tha variable $nafn I have this included code included into another page that is

Re: [PHP] Don't get variable to be passed to the page on submit

2002-12-13 Thread Philip Olson
Read this: http://www.php.net/variables.external Pay special attention to the parts about the PHP directive register_globals. If on, both $_GET['nafn'] and $nafn will exist. If off, $nafn will not exist. As of PHP 4.2.0, the default for this in php.ini went from on to off. This applies

[PHP] Hiding URL Variable

2002-12-08 Thread Stephen
How can you hide URL variables without using the POST method in a form? Thanks, Stephen Craton http://www.melchior.us What is a dreamer that cannot persevere? -- http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Hiding URL Variable

2002-12-08 Thread Tim Ward
store them in a session or cookie Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Stephen [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Sunday, December 08, 2002 8:10 PM Subject: [PHP] Hiding URL Variable How can you hide URL variables

[PHP] Re: Undefined Variable

2002-11-23 Thread Derick Rethans
Adriano Santos wrote: Hi, I'm with problem: Undefined Variable. I'm using : PHP 4.2.3 MySql 3.2.39 Windows 2000 How do I make to soluction my problem ? at the top of your script: error_reporting(E_ALL ~E_NOTICE); or initialize your variables likes: $number = 0; $string = foo; Derick

[PHP] Re: Undefined Variable

2002-11-23 Thread Adriano Santos
s:[EMAIL PROTECTED]... Adriano Santos wrote: Hi, I'm with problem: Undefined Variable. I'm using : PHP 4.2.3 MySql 3.2.39 Windows 2000 How do I make to soluction my problem ? at the top of your script: error_reporting(E_ALL ~E_NOTICE); or initialize your variables likes: $nu

[PHP] Re: Undefined Variable

2002-11-23 Thread Derick Rethans
Adriano Santos wrote: My php.ini: error_reporting = E_ALL ~E_NOTICE I have a form to send of the variables, but my page do not receive values. This my code: ?php $nome = StrToLower($nome); $senha = StrToLower($senha); ? I guess you use PHP 4.2.0+; since this version the register_globals

[PHP] Re: Undefined Variable

2002-11-23 Thread Adriano Santos
Thanks.

[PHP] Add On: Variable passing through a form

2002-11-20 Thread Michael Benbow
Sorry, but I forgot to say the variables froming from part 2 to part 3 can be anything between 1 and 30 or any combination thereof. input type=hidden will be no good here as it is too hard to pre-distringuish which variable names will be transferred Thanks Michael Benbow wrote: Hi, I

RE: [PHP] Why $ on variable names?

2002-11-13 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ... How about: That's the way the language designers did it, and there's LOTS of PRODUCTION code out there that uses it. Because that's the way it is? Well,

Re: [PHP] Why $ on variable names?

2002-11-13 Thread Pedro Garre
*This message was transferred with a trial version of CommuniGate(tm) Pro* Hi, JR said: I guess this could be true. But I don't understand why someone would need an easy way to identify variables? Why not an easy way to identify function names? Or constants? For big projects and/or safety

[PHP] Why $ on variable names?

2002-11-12 Thread brucedickey
I've searched, but haven't found the answer -- from a language design point of view, why are there $ on the front of PHP variable names? Thanks, Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Why $ on variable names?

2002-11-12 Thread Leif K-Brooks
I'm just guessing here. For one thing, to seperate variables from constants. Also, it makes it possible to use variables within quotes. brucedickey wrote: I've searched, but haven't found the answer -- from a language design point of view, why are there $ on the front of PHP variable names

Re: [PHP] Why $ on variable names?

2002-11-12 Thread Chris Wesley
On Tue, 12 Nov 2002, brucedickey wrote: I've searched, but haven't found the answer -- from a language design point of view, why are there $ on the front of PHP variable names? ... so Perl converts know where there variables are ;) ~Chris -- PHP General Mailing List (http

Re: [PHP] Why $ on variable names?

2002-11-12 Thread Jason Wong
On Wednesday 13 November 2002 02:35, Leif K-Brooks wrote: I'm just guessing here. For one thing, to seperate variables from constants. Also, it makes it possible to use variables within quotes. Yup. So you can have: print I'm a $variable; instead of the messy javascript way: alert(I'm

Re: [PHP] Why $ on variable names?

2002-11-12 Thread Rasmus Lerdorf
the answer -- from a language design point of view, why are there $ on the front of PHP variable names? Thanks, Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

RE: [PHP] Why $ on variable names?

2002-11-12 Thread brucedickey
: [PHP] Why $ on variable names? On Wednesday 13 November 2002 02:35, Leif K-Brooks wrote: I'm just guessing here. For one thing, to seperate variables from constants. Also, it makes it possible to use variables within quotes. Yup. So you can have: print I'm a $variable; instead of the messy

RE: [PHP] Why $ on variable names?

2002-11-12 Thread Jonathan Rosenberg \(Tabby's Place\)
In an earlier message, Jason Wong [mailto:php-general;gremlins.com.hk] said ... Yup. So you can have: print I'm a $variable; instead of the messy javascript way: alert(I'm a . $variable); But the language could still support variable evaluation within strings without requiring the

RE: [PHP] Why $ on variable names?

2002-11-12 Thread Marco Tabini
If I can venture a comment, what you think clutters the code others may find a quick and easy way to identify a variable in it. Just a thought. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Come visit

RE: [PHP] Why $ on variable names?

2002-11-12 Thread Jonathan Rosenberg \(Tabby's Place\)
In an earlier message, Marco Tabini [mailto:marcot;inicode.com] saidf ... If I can venture a comment, what you think clutters the code others may find a quick and easy way to identify a variable in it. I guess this could be true. But I don't understand why someone would need an easy way to

RE: [PHP] Why $ on variable names?

2002-11-12 Thread Larry Rosenman
How about: That's the way the language designers did it, and there's LOTS of PRODUCTION code out there that uses it. See also the precedence of PERL. LER --On Tuesday, November 12, 2002 16:40:46 -0500 Jonathan Rosenberg (Tabby's Place) [EMAIL PROTECTED] wrote: In an earlier message,

RE: [PHP] Why $ on variable names?

2002-11-12 Thread Ernest E Vogelsinger
At 22:40 12.11.2002, Jonathan Rosenberg \(Tabby's Place\) said: [snip] I guess this could be true. But I don't understand why someone would need an easy way to identify variables? Why not an easy way to identify function names? Or constants? In any case,

RE: [PHP] Why $ on variable names?

2002-11-12 Thread brucedickey
: [PHP] Why $ on variable names? At 22:40 12.11.2002, Jonathan Rosenberg \(Tabby's Place\) said: [snip] I guess this could be true. But I don't understand why someone would need an easy way to identify variables? Why not an easy way to identify function

RE: [PHP] Why $ on variable names?

2002-11-12 Thread Jonathan Rosenberg \(Tabby's Place\)
In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ... How about: That's the way the language designers did it, and there's LOTS of PRODUCTION code out there that uses it. Because that's the way it is? Well, that's good enough for me. I'll never question anything else again

RE: [PHP] Why $ on variable names?

2002-11-12 Thread Larry Rosenman
--On Tuesday, November 12, 2002 16:53:07 -0500 Jonathan Rosenberg (Tabby's Place) [EMAIL PROTECTED] wrote: In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ... How about: That's the way the language designers did it, and there's LOTS of PRODUCTION code out there that

RE: [PHP] Why $ on variable names?

2002-11-12 Thread Jonathan Rosenberg \(Tabby's Place\)
In an earlier message, Ernest E Vogelsinger [mailto:ernest;vogelsinger.at] said ... Think of how an interpreter works. It parses the sourcecode in realtime, not as a compiler. People must _wait_, every time, until it is finished, not only once like a compiler. Thus designers of interpreted

[PHP] Re: dynamic variable headache

2002-11-08 Thread Bobby Patel
try this: $mmdd = $foo.$bar.$bleh.$doh; /*note double-quotes and the concat operator (the period) */ $$mmdd = a_date_value; To test; echo $mmdd ; echo $$mmdd; /*provided that a_date_value is a string literal*/ Robert McPeak [EMAIL PROTECTED] wrote in message

[PHP] defining a variable

2002-10-27 Thread Gary
Hi All, I am have trouble getting $address to print the URL that is in the db. td class=\dtd\a href=\$address\ target=\_blank\%s/a/td is printing the url with the word address instead of the real address. The code is below. $sql =SELECT * FROM links ORDER BY owner; $sql_result =

Re: [PHP] defining a variable

2002-10-27 Thread Matt
- Original Message - From: Gary [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 27, 2002 2:00 PM Subject: [PHP] defining a variable Hi All, I am have trouble getting $address to print the URL that is in the db. td class=\dtd\a href=\$address\ target=\_blank\%s/a/td

Re: [PHP] defining a variable

2002-10-27 Thread Gary
Matt wrote: - Original Message - From: Gary [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 27, 2002 2:00 PM Subject: [PHP] defining a variable Don't just try to change 'address' to $row['address'] abve, because you haven't fetched the result yet, and it will be blank

RE: [PHP] Re: PHP Session register variable not always restored with contents

2002-10-26 Thread Victor Soroka
On Thu, 24 Oct 2002 21:26:30 +, John W. Holmes wrote: What is supposed to be in the session? Maybe these users are just denying cookies? Maybe... But my php compiled with --use-trans-sid and use this feature. In the session i store account, access timestamp etc... P.S. And 10% of traffic

[PHP] Re: PHP Session register variable not always restored with contents

2002-10-24 Thread Victor Soroka
I have same troubles!!! I use php internet trade traffic system, and 10-20% of visitors lose their sessions data. Cut from logs: Remote address: ## Referer: http://mydomain.com/ URI: /out.php?id=1PHPSESSID=235a91cef853e750a6b67a70375e7d88 User-agent: Mozilla/4.0 (compatible; MSIE 5.5;

RE: [PHP] Re: PHP Session register variable not always restored with contents

2002-10-24 Thread John W. Holmes
What is supposed to be in the session? Maybe these users are just denying cookies? ---John Holmes... -Original Message- From: Victor Soroka [mailto:vs240;yahoo.com] Sent: Thursday, October 24, 2002 10:08 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: PHP Session register variable

Re: [PHP] Inserting a variable into a mysql_query() statement

2002-10-16 Thread Marek Kilimajer
You very likely need to use $_REQUEST[hidden_manuf_id] in your first example, which is almost correct otherwise( for security reasons, also put single quotes around it) Phil Clark wrote: I'm trying to insert the variable $hidden_manuf_id into a mysql_query() statement. If i do this:

Re: [PHP] Inserting a variable into a mysql_query() statement

2002-10-16 Thread Rick Emery
$query = DELETE FROM product WHERE manufacturer=\$hidden_manuf_id\; mysql_query($query,$bb) or die(mysql_error()); or: mysql_query(DELETE FROM product WHERE manufacturer=\$hidden_manuf_id\, $bb); = Phil Clark wrote: I'm trying to insert the variable

[PHP] Re: class variable shared by all objects

2002-10-16 Thread BAROILLER Pierre-Emmanuel
You can use this function : get_object_vars to retreive vars from a class.. Here is the example from phpdoc : ?php class Point2D { var $x, $y; var $name; function Point2D($x, $y) { $this-x = $x; $this-y = $y; } function setName($name) { $this-name =

Re: [PHP] Inserting a variable into a mysql_query() statement

2002-10-15 Thread Jason Wong
On Tuesday 15 October 2002 12:54, Phil Clark wrote: I'm trying to insert the variable $hidden_manuf_id into a mysql_query() statement. If i do this: mysql_query(DELETE FROM product WHERE manufacturer=$hidden_manuf_id,$bb) or die(mysql_error()); That should work iff manufacturer is a

[PHP] Creating a variable out of a IF statement

2002-10-15 Thread Ben C.
What I want to do is have an IF statement which the results would create a variable. The IF statement is: IF ($car == BMW AND $model == 530i) echo (Price is 35,000 dollars); I want the Price is 35,000 dollars to be a variable. Please help with how to do this. Thanks, Ben -- PHP General

RE: [PHP] Creating a variable out of a IF statement

2002-10-15 Thread Ben C.
John, It works...thanks -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 8:34 PM To: 'Ben C.'; [EMAIL PROTECTED] Subject: RE: [PHP] Creating a variable out of a IF statement What I want to do is have an IF statement which the results

[PHP] Passing string variable to HTML TITLE tag fails within Netscape but works well within IE.

2002-10-15 Thread dwalker
Passing string variable to HTML TITLE tag fails within Netscape but workwell within IE.I have a single page consisting of inventory items to be sold. When an itemis selected, it passes the product name to a DETAIL page as part of theTITLE tag for the DETAIL page. My problem is: Netscape

Re: [PHP] Passing string variable to HTML TITLE tag fails withinNetscape but works well within IE.

2002-10-15 Thread Chris Shiflett
You should give more information about your original problem rather than inquire about any workaround. I don't understand how passing string variable to html title tag fails within Netscape but work well within IE. dwalker wrote: Passing string variable to HTML TITLE tag fails within

[PHP] Inserting a variable into a mysql_query() statement

2002-10-14 Thread Phil Clark
I'm trying to insert the variable $hidden_manuf_id into a mysql_query() statement. If i do this: mysql_query(DELETE FROM product WHERE manufacturer=$hidden_manuf_id,$bb) or die(mysql_error()); PHP server doesn't see the variable because it is inside the string quotes. If I do this:

Re: [PHP] Inserting a variable into a mysql_query() statement

2002-10-14 Thread Timothy Hitchens
Single around the variable mysql_query(DELETE FROM product WHERE manufacturer='$hidden_manuf_id',$bb) Timothy Hitchens [EMAIL PROTECTED] Phil Clark wrote: I'm trying to insert the variable $hidden_manuf_id into a mysql_query() statement. If i do this: mysql_query(DELETE FROM

[PHP] Re: Undefined variable

2002-10-09 Thread Muhammad Khairuzzaman
Hi, thanks for the help! I worked, but i dont get it, why use $_POST['name'] or $_GET['name'] when the text from the internet and books I've read says just put a dollar sign before the variable's name. If it wouldn't be a burden can u pls xplain? -- PHP General Mailing List

[PHP] Re: Undefined variable

2002-10-09 Thread Johannes Janson
off by default in your php.ini so you can't use the posted variables (or the ones passed by url) by just putting a $ at the beginning of the variable name. cheers J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Undefined variable

2002-10-09 Thread Steve Yates
Muhammad Khairuzzaman [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I worked, but i dont get it, why use $_POST['name'] or $_GET['name'] when If you set a variable inside your script called $validuser=true, how would you know if that was POSTed to your

[PHP] PHP Session register variable not always restored with contents

2002-09-30 Thread Brad Hanson
I have been trying to save a variable using PHP sessions. What I find is that while most of the time the variable content is restored and available on the subsequent pages, however there are times that the variable seems to be there but the contents are not. If I hit the browser refresh

RE: [PHP] PHP Session register variable not always restored with contents

2002-09-30 Thread John W. Holmes
I have been trying to save a variable using PHP sessions. What I find is that while most of the time the variable content is restored and available on the subsequent pages, however there are times that the variable seems to be there but the contents are not. If I hit the browser refresh

[PHP] alter switch variable inside case?

2002-08-31 Thread Joe Janitor
I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break; case 'a_third_thing': do_something_else(); break; } Can

Re: [PHP] alter switch variable inside case?

2002-08-31 Thread @ Edwin
Actually, you can--just don't "break;". Try it. - E I'd like to be able to modify the switch variable inside a case statement, like this: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; case 'step1': do_step1(); break;

Re: [PHP] alter switch variable inside case?

2002-08-31 Thread Joe Janitor
If you don't break, it continues to execute all the code until the end of the switch, ignoring any subsequent case statements. In my example, eliminating the break after step2 would cause execution of do_step1(), but also do_something_else(), which is not desired. --- @ Edwin [EMAIL PROTECTED]

Re: [PHP] alter switch variable inside case?

2002-08-31 Thread @ Edwin
Well, you don't have to take away all the "break;". :) For example, only here: switch ($foo) { case 'step2': do_step2(); if ($error) $foo='step1'; //repeat step1 break; - E If you don't break, it continues to execute all the code until the end of the switch, ignoring any

<    2   3   4   5   6   7   8   9   10   >