If you are using sessions, use it as a session variable.
--- John (News) [EMAIL PROTECTED] wrote:
I need to pass a variable e.g. $var1 from one PHP page to
another. The
only conditions are that the variable cannot be shown in
the source
code on the end users machine nor can it be passed
Is it advisable to use the same names for variables both in a function and in
its activator([?] I'm sorry I don't know the correct word) as follows?
?
function test($var1, $var2) {
...whatever;
return $result;
}
var $var1, $var2;
$result = test($var1, $var2); // this is what I
, the other one is Actual
parameter (/me prays I got that the right way around :))
Andrew
- Original Message -
From: Lennart Johansen [EMAIL PROTECTED]
To: PHP MailingList [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 9:13 AM
Subject: [PHP] variables
Is it advisable to use the same names
Hi..
I'm making changes to an PHP application (Postnuke).
The problem is than I can not see the PHP variables, like
echo host=.$HTTP_HOST;
But just in a specific modulethe question is, is there a PHP
instriction to enable an disable those variables???..
Thanks
Please i want to know how to pass variables (such as $PHP_AUTH_USER and
$PHP_AUTH_PW) from php to Perl script which is in apache cgi-bin
directory.
Thanks in advance for help
--
Moise Bertrand TACHAGO
Computer scientist
Volunteer DBMS Specialist
SDNP Cameroon, 506 Hajal Center Building
Yaounde
Hello,
Is it possible to transfer certain variables to a new scripts, but not doing
this as uri-parameters (../bla.php?var1=varvar2=var#)
I need it for Usernames and passwords and when the pages get cached the
usernames and pwd's can be viewed in the Temp-inetfiles-folder in Windhoze.
Thanks,
Maybe using cookies ???
(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr
- Original Message -
From: [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 11:10 AM
Subject: [PHP] variables
Hello,
Is it possible
On Tue, 11 Sep 2001 11:10:20 +0200, you wrote:
Is it possible to transfer certain variables to a new scripts, but not doing
this as uri-parameters (../bla.php?var1=varvar2=var#)
method=post forms
cookies
I need it for Usernames and passwords and when the pages get cached the
usernames and
I'm using the function below to create a listing of name/value pairs
to use in Flash. The first time it runs it works fine, but then
after the first time, it uses the originally used variables. So if
the URL looks like this:
ok, i still am a newbie to this and therefor ill ask this silly question.
I have made a small test script which checks the inputted name and pass against my
database and if
it was successfull it typed out success! and if it wasnt successfull it types out
wrong password!
My problem is.
Hey,
A simple example with one field:
?
if (isset($submit))
{
// do fields checking here...
if (empty($fname))
{
$errmsg = Name not entered please fill it in!;
}
else
{
// proceed here
}
}
?
html
body
form
? if (isset($errmsg)) { ?
font
That's IMPOSIBLE!
-Original Message-
From: James Bartlett [mailto:[EMAIL PROTECTED]]
Sent: 11 iulie 2001 05:27
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variables
I have tried that also...it still does not want to work...
- Original Message -
From: Dallas K
Hi,
This might sound really simple but plz humour me :)
How can I tell if two text variables are equal to one another?
If I use..
if($text1 = $text2)
{
echo The variables are equal;
}
else
{
echo The variables are not equal;
}
then the code in the else state is always printed even if I know
Try
if($text1 == $text2)
{
echo The variables are equal;
}
else
{
echo The variables are not equal;
}
notice the change in the if()
Tyler
On Wed, 11 Jul 2001 03:12:56 +0100
James Bartlett [EMAIL PROTECTED] wrote:
Hi,
This might sound really simple but plz humour me :)
How can I tell
I have tried that also...it still does not want to work...
- Original Message -
From: Dallas K.
To: James Bartlett ; [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 5:43 AM
Subject: Re: [PHP] Variables
don't use the quotes
if($test1 == $test2)
{echo True
You could always do...
If(!strcmp($text1, $text2))
{
equal;
} else {
not equal;
}
-Original Message-
From: James Bartlett [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 10:21 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variables
No it doesn't seem to like
On 11-Jul-01 James Bartlett wrote:
Hi,
This might sound really simple but plz humour me :)
How can I tell if two text variables are equal to one another?
If I use..
if($text1 = $text2)
{
echo The variables are equal;
}
else
{
echo The variables are not equal;
}
then the
I have a form that requires a user to enter various information (name,
address, phone number, etc...). When they submit this form, the next PHP
page checks to make sure that the required fields were filled in. What I
would like to do is check to see if the required fields are all filled in
and
the way i would do this is to have the form validation on the same page as
the form
and when user input has been validated the require another script (keeps
global variables)
you could try something like this
?php
if($submit){
$error_addr = ;
//form validation
if
i have attached the below script to stop the html being parsed
is there another way around this?
At 11:01 10/07/01 +1000, Nick O'Reilly wrote:
the way i would do this is to have the form validation on the same page as
the form
and when user input has been validated the require another script
another way of doing it would be to ditch using variables
in the actual text string altogether, and just use place
holders use {varname} instead of $varname, and then
you dont need to eval anything... just use a simple
regexp
$fullname = Roy Rogers;
$data = array(
'name'=
Michael Hall pressed the little lettered thingies in this order...
I'm stuck on a piece of code for a shopping cart.
I'm on the final page where the buyer clicks BUY and several things
happen. I want to loop through the table that stores the session info and
extract details such as item,
OK, thanks for that Chris.
I did get it in the end, with something very similar to what you
suggested:
$message = ;
while ( )
{
$var1 = $row[1];
... etc
$item = $var1 $var2 $var3 etc;
$message = $message . $item . \n;
}
Your solution is cleaner so I'll
Hi.
am using SQL Server.
I wrote a php page that displays the NFL game schedule after query the
database.
I want to create link to a game prediction page (written in php) for each
game. There will be two variables that will be passed thru the Href
command.
Would the code look something like
On Fri, 22 Jun 2001 10:15, David Yen wrote:
Hi.
am using SQL Server.
I wrote a php page that displays the NFL game schedule after query the
database.
I want to create link to a game prediction page (written in php) for
each game. There will be two variables that will be passed thru the
Message-
From: David Yen [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 3:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] how to pass PhP variables thru HREF command
Hi.
am using SQL Server.
I wrote a php page that displays the NFL game schedule after query the
database.
I want to create link
Hiho,
Richard Kurth wrote:
Hello Alexander,
This is pretty much what I want to do. I want to have a e-mail script
in my application and have it so the user can customize the e-mail that
is sent out in a configure file. Say he wants to send a recurring bill
to his customers and he wants it
Hello Alexander,
This is pretty much what I want to do. I want to have a e-mail script
in my application and have it so the user can customize the e-mail that
is sent out in a configure file. Say he wants to send a recurring bill
to his customers and he wants it to look a certain way. He would
[2]: [PHP] variables in a e-mail
Hello Alexander,
This is pretty much what I want to do. I want to have a e-mail script
in my application and have it so the user can customize the e-mail that
is sent out in a configure file. Say he wants to send a recurring bill
to his customers and he wants
How can I add a variable to an e-mail on the fly. Say I have a form on
my page that the user fells in with data. but when he fills in the
message things like Hello,$Variable are added before it is sent. Does
this make sence
Best regards,
Richard
mailto:[EMAIL PROTECTED]
Hiho,
Richard Kurth wrote:
How can I add a variable to an e-mail on the fly. Say I have a form on
my page that the user fells in with data. but when he fills in the
message things like Hello,$Variable are added before it is sent. Does
this make sence
Of course it does.
However, variables
Richard Kurth [EMAIL PROTECTED] wrote:
How can I add a variable to an e-mail on the fly. Say I have a form on
my page that the user fells in with data. but when he fills in the
message things like Hello,$Variable are added before it is sent. Does
this make sence
If you're using the mail()
Tarrant Costelloe wrote:
I have a log in script written in PHP4 which accesses a secure server. Once
entered I want the the secure page to hold the users name (from variable) in
the TITLE header Something along the lines of this:
title$name is logged in/title
Obiously I have tried that
I would recommend:
title?php echo htmlspecialchars($name); ? is logged in/title
that way you won't get burned by quotes, etc ...
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 7:59 AM
To: '[EMAIL PROTECTED]'
I want the the secure page to hold the users name
Hello,
I need some help (newbie).
I have some variable names with the form:
$name_1
$name_2
$name_3
$name_4...
I want to access them by doing something like this:
$i=0
$name_$i
This doesn't work, how do I include another variable in the name of a
variable?.
Cheers
John
--
PHP General
Maybe an array would be more appropriate.
e.g.
$name[$i] =
.
.
-Stewart
-Original Message-
From: seriousj [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 12:09
To: [EMAIL PROTECTED]
Subject: [PHP] Variables in variable names
Hello,
I need some help (newbie).
I have some variable
.
Maybe an array would be more appropriate.
e.g.
$name[$i] =
.
.
-Stewart
-Original Message-
From: seriousj [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 12:09
To: [EMAIL PROTECTED]
Subject: [PHP] Variables in variable names
Hello,
I need some help (newbie).
I have some
As an alternative you can use associative arrays
$i = 0;
$i = 1;
$i = 2;
$i = 3;
$name[$i];
-Original Message-
From: seriousj [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 4:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Variables in variable names
Hello,
I need some help
with 3 entries.
-Stewart
-Original Message-
From: seriousj [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 12:20
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Variables in variable names
The info is stored in the variables intitally by information entered by a
user on a webpage, can you have
Thanks, that worked great!
John
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
At 09.05.01 23:08, you wrote:
Hello,
I need some help (newbie).
I have some variable names with the form:
$name_1
$name_2
$name_3
$name_4...
I want to access them by doing something like this:
$i=0
$name_$i
This doesn't work, how do I include another variable in the name of a
variable?.
What
Hi seriousj,
Wednesday, May 09, 2001, 1:19:55 PM, you wrote:
seriousj The info is stored in the variables intitally by information entered by a
seriousj user on a webpage, can you have the browser store the info in an array and
seriousj have it passed by a form post command?
Try
input
or even try
input type=text name=name[]
input type=text name=name[]
This should AFAIK result in an Array, but I'm not sure if
empty fields are put in.
You will get the empty fields except for checkboxes. For checkboxes only the checked
elements come through so you need values that
On Sat, Apr 28, 2001 at 07:12:15PM +0100, Robert Morrissey wrote:
I have a form on one page with a text box called 'emailtext'. This gets
passed to a php script that gets info from a database (such as $name,
$email, etc) and mails selected email addresses; my problem is this:
Say, the form
Hi,
I have a form on one page with a text box called 'emailtext'. This gets
passed to a php script that gets info from a database (such as $name,
$email, etc) and mails selected email addresses; my problem is this:
Say, the form passes $emailtext as Hello $name, how're you?, and this is
passed
Hi all,
I've got this problem with variables. In the code below I've got the
variables: $jaar and $vak, if I echo them they r displayed correctly, but if
the function unlink is called it doesnt seem to know what $jaar and $vak
are. If I do $the_path = "/home/H0RNET/ftp/jaar1/PRO/"; then the
hey,
try this...
$the_path = "/home/H0RNET/ftp/" . $jaar . "/" . $vak . "/";
unlink ($the_path . $d);
""Dennis Haller"" [EMAIL PROTECTED] wrote in message
9bharm$1td$[EMAIL PROTECTED]">news:9bharm$1td$[EMAIL PROTECTED]...
Hi all,
I've got this problem with variables. In the code below
Dennis Haller schrieb:
I've got this problem with variables. In the code below I've got the
variables: $jaar and $vak, if I echo them they r displayed correctly, but if
the function unlink is called it doesnt seem to know what $jaar and $vak
are. If I do $the_path =
Hello,
I made a GD script that made an image with the name of whatever page I was
in in my web site. I would post info to it like this:
http://www.domain.com/jpeg-out.php?title=FrontPage what ever I put for
title it would make the image. After reinstalling php4 on my win2000 box
with apache
Brandon Orther schrieb:
I made a GD script that made an image with the name of whatever page I was
in in my web site. I would post info to it like this:
http://www.domain.com/jpeg-out.php?title=FrontPage what ever I put for
title it would make the image. After reinstalling php4 on my
Hello,
Can anyone help me to achieve this using PHP:
I would like to have a personal photographic portfolio site with thumbnails.
Clicking on the thumbnail would bring up another page which has an enlarged
version of the photo on a standard 'template page'. In other words the
photo src is a
But members.evolt.org does, along with MySQL, Cold Fusion, and a heap of
other goodies.
HTH
Jon
-Original Message-
From: Joe Stump [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 17:03
I'm not sure about Freeserve, but I don't think that Geocities supports PHP
on their webpages (at
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Variables
But members.evolt.org does, along with MySQL, Cold Fusion, and a heap of
other goodies.
HTH
Jon
-Original Message-
From: Joe Stump [mailto:[EMAIL PROTECTED]]
Sent: 06 April 2001 17:03
I'm not sure about Freeserve
Have you looked at php.net/manual/ ? Just read through the variables portion
and it goes over it.
-js
-Original Message-
From: Cheng, Kynan (London) [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 9:54 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Variables
Thanks
I dont know how good of an idea it is to have 180 variable variable names. oi,
headache. but the question you asked was this.
" $q = 'tar1-1' how do I access the variable $tar1-1 "
no problem
echo $$q;
--
Chris Lee
[EMAIL PROTECTED]
""Per Kallin"" [EMAIL PROTECTED] wrote in message
Hi!
I have a quite big form to fill out a calendar. The form has six fields for
every day in a month to make it possible to set up tree apointments (the
target of the meeting and Locataion), this makes a total of about ~180
fields so I created them with a for-loop.
Now I got this 180 fields named
Hey all,
I have a question about using a variable across multiple PHP files.
I want to set a path variable such as: $root_path = /www2/yoursite/docs
and I want this variable to be able to be changed in case the site is moved
to another server that has a different root path.
I was thinking
Jay,
to make variables.inc available from wherever you are, set the value of
include_path in your php.ini or httpd.conf or .htaccess t something like
".:/path/to/where/variables.inc/is:/other/paths"
as an alternative, use the auto_prepend_file directive to include
variables.inc before any
Can someone tell me if this is possible.
I have a PHP variable which i got from a html form using $HTTP_POST_VAR. I
collect a variable called Community. Therefore is it possible to have an sql
statement like this?
//create sql statement
$sql = "select businessname from main where
L PROTECTED]
To: Php Mailing List [EMAIL PROTECTED]
Sent: Monday, February 19, 2001 6:05 PM
Subject: [PHP] php variables in sql statements.
Can someone tell me if this is possible.
I have a PHP variable which i got from a html form using $HTTP_POST_VAR.
I
collect a variable called
PROTECTED]]
Sent: donderdag 8 februari 2001 23:55
To: Steve Haemelinck
Subject:RE: [PHP] [Newbie] PHP Variables
you can, what's the rest of your script look like.
-Original Message-
From: Steve Haemelinck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 3:49 P
ction.ini-set.php
http://www.php.net/manual/en/function.ini-get.php
for more info.
- steve
-Original Message-
From: Brian V Bonini [mailto:[EMAIL PROTECTED]]
Sent: donderdag 8 februari 2001 23:55
To:Steve Haemelinck
Subject: RE: [PHP] [Newbie] PHP Variables
yo
P] [Newbie] PHP Variables
you can, what's the rest of your script look like.
-Original Message-
From: Steve Haemelinck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 3:49 PM
To: PHP Mailing Listl (E-mail)
Subject: [PHP] [Newbie] PHP Variables
I thought yo
Thx, I forgot to set the register_globals to On !!!
-Original Message-
From: Steve Edberg [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 9 februari 2001 20:41
To: Steve Haemelinck
Cc: PHP Mailing Listl (E-mail)
Subject:RE: [PHP] [Newbie] PHP Variables
At 8:06 PM +0100 2
On Friday 09 February 2001 20:39, John Vanderbeck wrote:
Why are you echoing it twice? Also, the first line, shouldn't it be:
?php echo $contents; ?
Looks liek you dropped the semi colon
The semicolon is optional if a closing PHP tag ("?") follows.
--
Christian Reiniger
LGDC Webmaster
I thought you can pass variables in PHP as in CGI.
http://www.xy.com/index.php?contents=HOME
contents should be available as variable, but it does not seem to work. Doe
anyone has an idea why not?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
That should work just fine.
Make sure that HOME doesn't have any spaces and is urlencode()'d
--Joe
On Thu, Feb 08, 2001 at 09:49:18PM +0100, Steve Haemelinck wrote:
I thought you can pass variables in PHP as in CGI.
http://www.xy.com/index.php?contents=HOME
contents should be available
If register_globals is turned off, that will not work. See :
http://www.php.net/manual/en/configuration.php#ini.register-globals
Check phpinfo()
?php
phpinfo()
?
For details on your settings, perhaps it is off. Try :
?php
echo $HTTP_GET_VARS["contents"]
// Index.php file.
// Page header
?
if ($contents == "HOME") {
include("home.inc");
} else {
include("someothercontent.inc");
?
// Page footer
... Difficult to tell what's going wrong with just a url.
James.
I thought you can pass variables in PHP as in CGI.
On Fri, 2 Feb 2001 08:51, James, Yz wrote:
Hey guys. Can I firstly say, thanks to all of you who helped me out with
my last question about importing MS Access databases into MySQL... It
helped tons!
However, I have another question.
Firstly, I've strayed away from writing many of my own
Hi,
Is there a way to pass variables as 'friendly' urls? So instead of
haveing a url like www.blah.co.uk/profile.php?team=tigers i could have
www.blah.co.uk/profile.php/team/tigers which would call profile.php and set
team to tigers.
I've been playing with it but i can't seem to
You need to parse some of the environment variables to get this data,
$pathArray = explode("/",$HTTP_SERVER_VARS[PATH_INFO])
seems to be particularly helpful.
Put a call to phpinfo() into your file and see what's there.
- Tim
Is there a way to pass variables as 'friendly' urls? So instead
On Tue, 16 Jan 2001, William Bailey wrote:
Hi,
Is there a way to pass variables as 'friendly' urls? So instead of
haveing a url like www.blah.co.uk/profile.php?team=tigers i could have
www.blah.co.uk/profile.php/team/tigers which would call profile.php and set
team to tigers.
401 - 473 of 473 matches
Mail list logo