[PHP] Re: Variables with - in their name

2012-11-19 Thread Alessandro Pellizzari
Il Sun, 18 Nov 2012 01:09:11 -0500, Ron Piggott ha scritto: echo select name=\distributor- . $row['promo_code_prefix'] . - . $row['promo_code_suffix'] . \ style=\text-align: center;\\r\n; It could be wrote: ?php echo $distributor-42-2; You MUST disable register_globals in your php.ini

[PHP] Re: Variables with - in their name

2012-11-19 Thread Maciek Sokolewicz
On 19-11-2012 10:49, Alessandro Pellizzari wrote: Il Sun, 18 Nov 2012 01:09:11 -0500, Ron Piggott ha scritto: echo select name=\distributor- . $row['promo_code_prefix'] . - . $row['promo_code_suffix'] . \ style=\text-align: center;\\r\n; It could be wrote: ?php echo $distributor-42-2;

[PHP] Re: Variables via url

2012-05-12 Thread Jim Giner
Ashley M. Kirchner ash...@pcraft.com wrote in message news:4fad9d8b.4020...@pcraft.com... Can someone point me at examples or directions on how I can pass a variable via a URL in the following way: http://server.domain.com//script///variable/ I will only be passing one single

Re: [PHP] Re: Variables via url

2012-05-12 Thread Ashley Sheridan
On Sat, 2012-05-12 at 09:21 -0400, Jim Giner wrote: Ashley M. Kirchner ash...@pcraft.com wrote in message news:4fad9d8b.4020...@pcraft.com... Can someone point me at examples or directions on how I can pass a variable via a URL in the following way:

Re: [PHP] Re: Variables via url

2012-05-12 Thread TR Shaw
On May 12, 2012, at 9:47 AM, Ashley Sheridan wrote: On Sat, 2012-05-12 at 09:21 -0400, Jim Giner wrote: Ashley M. Kirchner ash...@pcraft.com wrote in message news:4fad9d8b.4020...@pcraft.com... Can someone point me at examples or directions on how I can pass a variable via a URL in

Re: [PHP] Re: Variables via url

2012-05-12 Thread Ashley M. Kirchner
On 5/12/2012 7:21 AM, Jim Giner wrote: Of course, someone here with much more knowledge than I could very soon make me look stupid :) Meh, I don't call that looking stupid. I call it a different way of skinning the cat. :) We're all here to learn from one another, right? Thanks

[PHP] Re: Variables in Variables?

2005-11-18 Thread Ben
Marquez Design said the following on 11/18/2005 04:54 PM: Greetings. Does anyone know how to do this? I have, $var $var2 In a field called two_vars in a MySQL db. I am calling the variables inside PHP document. In that document I am saying: $var = time $var2 = clock !-- I do the query

Re: [PHP] Re: Variables in Variables?

2005-11-18 Thread Jasper Bryant-Greene
Ben wrote: If I understand your question properly I'd explode $two_vars with whatever seperator you have between them and then you'll need to use eval to get your results. Maybe something like... $dbVars=explode(',',$two_vars); // Assuming comma seperator foreach($dbVars AS $key = $value) {

Re: [PHP] Re: Variables in Variables?

2005-11-18 Thread Jasper Bryant-Greene
Jasper Bryant-Greene wrote: Ben wrote: $dbVars=explode(',',$two_vars); // Assuming comma seperator foreach($dbVars AS $key = $value) { $eval=\$temp=.$value.;; eval($eval); echo $temp; } WTF do you need eval() for?! $dbVars = explode( ',', $two_vars ); foreach( $dbVars as $value

[PHP] Re: Variables from database

2004-12-05 Thread Dusty Bin
Stuart Felenstein wrote: I haven't try this yet but wondering if it's possible. Can I do something like this: select fieldone from table ; $myvar = $fieldone ? And more so could I do it with a where clause ? i.e. select fieldone from table where fieldone = 3 $myvar = $fieldone ? This is

[PHP] Re: Variables inside a function

2004-03-08 Thread John Kaspar
use the global keyword... http://www.php.net/manual/en/language.variables.scope.php On 3/7/2004 6:17 PM, Nathan Croker wrote: I am relatively new to PHP. But something I can't seem to make work is when I call one of the functions I have made and a variable is set inside that function eg.

[PHP] Re: Variables are working!

2004-01-21 Thread Kaushan
Thanks for helping me... Now its working perfectly. Problem was with globals as you all pointed-out. PHP Manual pages at http://www.php.net/manual/en/language.variables.predefined.php was very helpful overcome this problem (thanks alot Ben...). Kaushan -- PHP General Mailing List

[PHP] Re: Variables not working!

2004-01-19 Thread Ben Ramsey
Try using $_POST['fname'] instead of $fname. This just means that register_globals is probably set to off in php.ini, which is the recommended setting. Take a look at the section on predefined variables in the PHP manual for more on this:

RE: [PHP] Re: Variables not working!

2004-01-19 Thread Jay Blanchard
[snip] Try using $_POST['fname'] instead of $fname. [/snip] Or $_GET['fname'] depending on your form method -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Variables not working!

2004-01-19 Thread Chris Boget
[snip] Try using $_POST['fname'] instead of $fname. [/snip] Or $_GET['fname'] depending on your form method Or even $_REQUEST['fname'], which doesn't care about which method is specified in the form. :p Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Variables scope question

2003-12-04 Thread Steve Fulleylove
Mike, It depends what you mean by local scope. If you declare the variable as global, it should be available to the code inside include1.txt and index.php. It will not be available to other pages however (i.e. it is not session global). To create a truly global (available to all pages in the

[PHP] Re: Variables not passed on localhost setup

2003-10-01 Thread Gal
The problem is that your php.ini has register_globals = Off change it to On. You can also do the following at the top of your script - (this is the correct way): ?php $TestVar = (!empty($_GET['TestVar'])) ? true : false; ? Greg Watson wrote: Hi Guys, I've Googled and RTFM'd, but I can't seem to

[PHP] Re: Variables not being past

2003-05-31 Thread John Zimmerman
The Doctor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Questions, I have a cusotmer using a basic username and password verifier on a php Web Page. This was working and suddenly with I redefined the php environment, the php variables are not getting passed on. why?

[PHP] Re: Variables don't pass... *sniff*

2003-05-30 Thread George Whiffen
Daniel, Switch register_globals back on, and everything works as it always did. So do it! All this fuss about register_globals being insecure is a complete load of rubbish. This issue really bores me, but it seems programmers are wasting a lot of time on it, so I guess I'd better run through

[PHP] Re: Variables not being past

2003-05-30 Thread Catalin Trifu
Hi, Check the php.ini for register_globals By default, from PHP 4.2.0 register_globals is OFF Cheers, Catalin The Doctor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Questions, I have a cusotmer using a basic username and password verifier on a php Web Page.

[PHP] Re: Variables not being past

2003-05-30 Thread The.Wiz
Could be because there is a solar eclipse somewhere If your going to ask a question, at least give details that matter. Asking a question like: Why isn't the sun shining?? Leaves endless possibilities as to why you can't see the sun. Is there a blanket over your head? Is it night time???..

[PHP] Re: variables with

2003-03-17 Thread Arnold Schommer
a) $mail-Body = h1 style=\color: prple; font-size: 20pt;\Heading/h1; b) $mail-Body = 'h1 style=color: prple; font-size: 20pt;Heading/h1'; The second method is better reabadle but also disable variable substitution and most escape sequences (\n and the like). hth Ian a. gray wrote: Hi, just

[PHP] re: variables with

2003-03-17 Thread Ian A. Gray
Using the \ or using single quotes instead of double is great. However I am now finding a problem if someone inputs either single or double quotes on a form which uses php. The user inputs for example: I\ve performed many roles including Figaro, Dandini and 'Wotan' becomes: I\'ve performed

Re: [PHP] re: variables with

2003-03-17 Thread Charles Kline
php has a function stripslashes() you could try using. - charles On Monday, March 17, 2003, at 10:11 AM, Ian A. Gray wrote: Using the \ or using single quotes instead of double is great. However I am now finding a problem if someone inputs either single or double quotes on a form which uses

RE: [PHP] re: variables with

2003-03-17 Thread Ford, Mike [LSS]
-Original Message- From: Ian A. Gray [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 15:11 Using the \ or using single quotes instead of double is great. However I am now finding a problem if someone inputs either single or double quotes on a form which uses php. The user

[PHP] Re: Variables not being received from form

2003-02-23 Thread pei_world
cann't see any thing without your form! I think it is misstyping error, check your form variables name, specially upper case or lower case! but try $rank = $HTTP_POST_VARS[rank]; $title_new = $HTTP_POST_VARS[titles]; -- Sincerely your; pei_world ( .::IT::. ) Peter Gumbrell [EMAIL PROTECTED]

Re: [PHP] Re: Variables not being received from form

2003-02-23 Thread Leif K-Brooks
Please, please, PLEASE don't correct code that isn't wrong with code that is! Read http://www.php.net/manual/en/language.types.array.php. To answer the original question, the $HTTP_POST_VARS variable is out of scope in your function. Either use $_POST superglobal array if you're using 4.1.0

[PHP] Re: Variables and http

2002-12-05 Thread Mattia
Hacook [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I have a page (to create a database) with X text fields called chpX (chp0, chp1, chp2..Etc) that posts these variables to a php file. I would like to know how can i get these values ? (I

[PHP] Re: Variables and http

2002-12-05 Thread Tristan Carron
thanks, works perfectly - Original Message - From: Mattia [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Thursday, December 05, 2002 12:41 PM Subject: Re: Variables and http Hacook [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL

Re: [PHP] Re: Variables

2002-11-05 Thread Martín Marqués
On Dom 03 Nov 2002 06:40, David Jackson wrote: Bryan McLemore wrote: What is a variables value before said value has been assigned a value? Thanks Bryan Wouldn't it be null or empty ? NULL -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL?

[PHP] Re: Variables

2002-11-03 Thread David Jackson
Bryan McLemore wrote: What is a variables value before said value has been assigned a value? Thanks Bryan Wouldn't it be null or empty ? Just a guess, David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Variables aren't being passed to php page

2002-07-15 Thread Tim Luoma
Jason Wong wrote: On Monday 15 July 2002 03:55, Tim Luoma wrote: Jason Wong wrote: This list gets at least one question a day on this subject ... And there will be a lot more as people scan the web for example scripts and find ones that assume 'register_globals' is set to on. Questions

[PHP] Re: Variables aren't being passed to php page

2002-07-14 Thread Micha
This is no problem. Since PHP 4.2 register_globals is disabled by default (in prior versions it was enabled). Either you can use the $_POST, $_GET etc. arrays or simply set register_globals in the php.ini to On ! -micha Mike Heffner wrote: Hi, I've recently upgraded from PHP 4.0.4p11 - PHP

[PHP] Re: Variables aren't being passed to php page

2002-07-14 Thread Tim Luoma
Jason Wong wrote: This list gets at least one question a day on this subject ... And there will be a lot more as people scan the web for example scripts and find ones that assume 'register_globals' is set to on. TjL -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Re: Variables aren't being passed to php page

2002-07-14 Thread Jason Wong
On Monday 15 July 2002 03:55, Tim Luoma wrote: Jason Wong wrote: This list gets at least one question a day on this subject ... And there will be a lot more as people scan the web for example scripts and find ones that assume 'register_globals' is set to on. Questions coming from those

[PHP] Re: variables not being passed from form ??

2002-06-18 Thread Anthony 'Crash' Ciarochi
Got it! 'file_uploads' was Off in /etc/php.ini. That was stopping all form variables from being passed from the file upload form Thanks all! AFC Anthony 'Crash' Ciarochi [EMAIL PROTECTED] wrote in message 024e01c21711$111d2200$[EMAIL PROTECTED]">news:024e01c21711$111d2200$[EMAIL

[PHP] Re: Variables - Using The Contents Of A Varibale Name Built Dynamically

2002-06-02 Thread Jason Teagle
Michael Davey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You could give the button the same name in each form - only the fields in between the form/form tags is actually submitted, then put a hidden field in the form that uniquely identifies the data

[PHP] Re: Variables - Using The Contents Of A Varibale Name Built Dynamically

2002-06-02 Thread Michael Davey
Won't that treat all radio buttons on the page as one group, instead of being separate groups for each form? No - the form/form tags enclose the data that is being submitted - nothing outside of the tags will reach the script that handles the request. Mikey -- PHP General Mailing List

[PHP] Re: Variables - Using The Contents Of A Varibale Name Built Dynamically

2002-06-01 Thread Michael Davey
You could give the button the same name in each form - only the fields in between the form/form tags is actually submitted, then put a hidden field in the form that uniquely identifies the data being submitted. Just a thought... it is what I usually do... Mikey Jason Teagle [EMAIL PROTECTED]

[PHP] Re: variables

2002-05-22 Thread Michael Virnstein
you can use $_POST['name1'] if you're using post vars $_GET['name1'] if you're using get vars Regards Michael Roman Duriancik [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... When are set in php.ini (php version 4.2.1 on linux) register_globals = Off how

Re: [PHP] Re: variables

2002-05-22 Thread Eugene Lee
Also, it's good to read the press releases: http://www.php.net/release_4_2_1.php External variables We would also like to attend you on a big change in PHP 4.2.0 concerning variable handling. External variables (from the

[PHP] Re: Variables within variable names

2002-05-03 Thread Fearless Froggie
Once I had a bit of experience with variable variables, I found them very useful. But I did discover that you can't embed variable variables (or values from arrays) in the SQL statements I was sending to MySQL. I had to create a temporary variable for use in my SQL statements. I'm not sure why,

[PHP] Re: Variables within variable names

2002-05-02 Thread HeyJim
I agree with Jason and Miguel, but if you really want to do this, you could try: $type = basic; $user = $type._user; $$user = jaxn; echo $basic_user; I can see where something like this *could* be useful, but I'd still use the arrays. Jim. At 12:43 PM 5/2/02, Jackson Miller wrote: I want to

Re: [PHP] Re: Variables within a string

2002-03-14 Thread Jason Wong
On Thursday 14 March 2002 14:14, Analysis Solutions wrote: [snip] The examples on that page are lame. For example: if($HTTP_COOKIE_VARS['username']){ // can only come from a cookie, forged or otherwise $good_login = 1; fpassthru (/highly/sensitive/data/index.html);

Re: [PHP] Re: Variables within a string

2002-03-13 Thread Analysis Solutions
On Tue, Mar 12, 2002 at 05:42:12PM +0800, Jason Wong wrote: On Tuesday 12 March 2002 12:27, Analysis Solutions wrote: The source of the data *does* matter. That is why the latest releases of PHP ( 4.0.6) recommends having register_globals OFF by default. ... snip snip snip ... To see why

Re: [PHP] Re: Variables within a string

2002-03-12 Thread Jason Wong
On Tuesday 12 March 2002 12:27, Analysis Solutions wrote: For security reasons. To make sure the variable did come from POSTing a form and not from the URL. Neither is more or less secure. The source of the data doesn't matter. The source of the data *does* matter. That is why the

Re: [PHP] Re: Variables within a string

2002-03-12 Thread Faisal Abdullah
I love your example.. But if you don't know where the data came from then it's not secure. Consider a real-life example. Robin Hood steals the Sheriff's ATM card, and the Sheriff stupidly enough has written the PIN onto the back of the card. Now Robin can go and withdraw all the money from

Re: [PHP] Re: Variables within a string

2002-03-12 Thread Erik Price
On Monday, March 11, 2002, at 10:34 PM, Jason Wong wrote: On Monday 11 March 2002 11:10, Chris Cocuzzo wrote: $foo = Entry for . $HTTP_POST_VARS[name]; $foo = Entry for for $HTTP_POST_VARS[name]; But that's not good programming. Associative arrays should have the key quoted in order

[PHP] Re: Variables within a string

2002-03-11 Thread webapprentice
Oh, so that's how you deal with indexed variables inside of double quotes... I can't believe that has eluded me for so long... --- From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Mon, 11 Mar 2002 12:09:15

Re: [PHP] Re: Variables within a string

2002-03-11 Thread Jason Wong
On Tuesday 12 March 2002 11:11, Analysis Solutions wrote: On Mon, Mar 11, 2002 at 08:39:16PM -0500, webapprentice wrote: From: Jason Wong [EMAIL PROTECTED] On Monday 11 March 2002 11:10, Chris Cocuzzo wrote: $foo = Entry for . $HTTP_POST_VARS[name]; $foo = Entry for for

Re: [PHP] Re: Variables within a string

2002-03-11 Thread Analysis Solutions
On Tue, Mar 12, 2002 at 11:34:14AM +0800, Jason Wong wrote: On Tuesday 12 March 2002 11:11, Analysis Solutions wrote: On Mon, Mar 11, 2002 at 08:39:16PM -0500, webapprentice wrote: From: Jason Wong [EMAIL PROTECTED] On Monday 11 March 2002 11:10, Chris Cocuzzo wrote: $foo = Entry

[PHP] Re: variables

2001-09-11 Thread _lallous
Sure you can! consider this simple example: html body a href=javascript:setvars('var1value', 'var2value')click here to go to next page/a script language=JavaScript !-- function setvars(var1, var2) { df = document.dataform; df.var1.value = var1; df.var2.value = var2;

RE: [PHP] Re: variables

2001-09-11 Thread webgenie
september 2001 12:23 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Re: variables Sure you can! consider this simple example: html body a href=javascript:setvars('var1value', 'var2value')click here to go to next page/a script language=JavaScript !-- function setvars(var1, var2) { df

Re: [PHP] Re: variables

2001-09-11 Thread _lallous
ROTECTED] Onderwerp: [PHP] Re: variables Sure you can! consider this simple example: html body a href=javascript:setvars('var1value', 'var2value')click here to go to next page/a script language=JavaScript !-- function setvars(var1, var2) { df = document.dataform; df.va

RE: [PHP] Re: variables

2001-09-11 Thread webgenie
Thanks, I'll implement sessions... :) regards Bart -Oorspronkelijk bericht- Van: _lallous [mailto:[EMAIL PROTECTED]] Verzonden: dinsdag 11 september 2001 13:30 Aan: [EMAIL PROTECTED] Onderwerp: Re: [PHP] Re: variables In that case you'll have to use session_variables or cookies

[PHP] Re: variables.

2001-07-17 Thread elias
Hmm... It seems that you're variables are beeing reposted upon each page reload. yes, some code might help. Johan Vikerskog [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED].. . ok, i still am a newbie to this and therefor ill ask this silly question. I have made a

[PHP] Re: Variables

2001-07-10 Thread Adam
try this little form example out: --example.php-- ?php if ( (isset($t1))(isset($t2)) ) { if ($t1==$t2) { echo they are equal; } else { echo they are not equal; } } ? html body br br form name=form1 method=post action=?=$PHP_SELF? input type=text name=t1 t1br

[PHP] RE: Variables within functions, out?

2001-02-05 Thread Tim Ward
-Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: 01 February 2001 22:22 To: [EMAIL PROTECTED] Subject: Variables within functions, out? Hey guys. Can I firstly say, thanks to all of you who helped me out with my last question about importing MS Access