On 19-11-2012 10:49, Alessandro Pellizzari wrote:
Il Sun, 18 Nov 2012 01:09:11 -0500, Ron Piggott ha scritto:
echo "\r\n";
It could be wrote:
You MUST disable register_globals in your php.ini
Once you have done that (and even before that...) you find your variable
in $_POST['distributor-
Il Sun, 18 Nov 2012 01:09:11 -0500, Ron Piggott ha scritto:
> echo " $row['promo_code_suffix'] . "\" style=\"text-align: center;\">\r\n";
> It could be wrote:
>
> echo $distributor-42-2;
You MUST disable register_globals in your php.ini
Once you have done that (and even before that...) you f
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 fo
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"" 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
On Sat, 2012-05-12 at 09:21 -0400, Jim Giner wrote:
> ""Ashley M. Kirchner"" 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//sc
""Ashley M. Kirchner"" 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 /variab
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 $va
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) {
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"
echo "$two_vars
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 probably
you can reference the vars as well, but i would guess with some logic
changes you could avoid the problem your having?
Referencing ..
$blah = '';
function add(&$blah, $something, $somethingElse) {
$something ++;
$somethingElse ++;
$blah = $something + $somethingElse
}
John Kaspar <[E
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. funct
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 (http://www.php
> [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: htt
[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
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:
http://www.php.net/manual/en/language.variables.predef
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 si
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):
$TestVar = (!empty($_GET['TestVar'])) ? true : false;
?>
Greg Watson wrote:
Hi Guys,
I've Googled and RTFM'd, but I can't seem to fig
> "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 passe
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???.. Ju
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 Pa
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
> -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
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 php
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
a) $mail->Body = " 20pt;\">Heading";
b) $mail->Body = 'Heading';
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 a quick question. How do I include double quotes
> in a variable? I
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 o
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]
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:[
"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 ?
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
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
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.
>
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 thos
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, visit
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 ->
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 PROTECTE
> Won't that treat all radio buttons on the page as one group, instead of
> being separate groups for each form?
No - the 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 (http://w
"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 tags is actually submitted, then put a hidden
field
> in the form that uniquely identifies the data being s
You could give the button the same name in each form - only the fields in
between the 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]> wrote i
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 en
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
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,
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 w
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.
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 s
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
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 f
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
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:
>
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 = "Ent
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:
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
lous [mailto:[EMAIL PROTECTED]]
> Verzonden: dinsdag 11 september 2001 12:23
> Aan: [EMAIL PROTECTED]
> Onderwerp: [PHP] Re: variables
>
>
> Sure you can!
>
> consider this simple example:
>
>
> click here to go to
> next page
>
>
> <!--
> fun
den: dinsdag 11 september 2001 12:23
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Re: variables
Sure you can!
consider this simple example:
click here to go to
next page
<!--
function setvars(var1, var2)
{
df = document.dataform;
df.var1.value = var1;
df.var2.value = v
Sure you can!
consider this simple example:
click here to go to
next page
it's using hidden forms...
you can also use sessions...
<[EMAIL
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
try this little form example out:
--example.php--
t1
t2
-/example.php--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To cont
> -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
I have this now:
I also tried method="get" -- i can see the variables
in the url too. I have double checked spelling etc.
This line prints nothing - not even a space I think:
printf ("These values were inserted into the database
- %s %s", $firstname, $surname);
--- Joe Stump <[EMAIL PROTECTED
60 matches
Mail list logo