www.php.net/variables.scope
You need global $a; as the first line in your function.
386-DX wrote:
Hello. Let's say I have something like this:
function aa($test) {
$a = 8;
echo $test;
}
$a = 2;
aa(a is . ($a5?greater:equal to or less). than 5.);
I want this to output a is greater than
* Thus wrote 386-DX ([EMAIL PROTECTED]):
Hello. Let's say I have something like this:
function aa($test) {
$a = 8;
echo $test;
}
$a = 2;
aa(a is . ($a5?greater:equal to or less). than 5.);
http://php.net/eval
Curt
--
I used to think I was indecisive, but now I'm not so
* Thus wrote 386-DX ([EMAIL PROTECTED]):
Hello. Let's say I have something like this:
function aa($test) {
$a = 8;
echo $test;
}
$a = 2;
aa(a is . ($a5?greater:equal to or less). than 5.);
http://php.net/eval
No... you need to make $a global within the function for
* Thus wrote CPT John W. Holmes ([EMAIL PROTECTED]):
* Thus wrote 386-DX ([EMAIL PROTECTED]):
Hello. Let's say I have something like this:
function aa($test) {
$a = 8;
echo $test;
}
$a = 2;
aa(a is . ($a5?greater:equal to or less). than 5.);
Greetings learned PHP(eople),
Scenario : User fills in text box, pushes Submit and textbox data gets
passed to MySQL database..
=
The code from the HTML page :
form action=savemail.php method=GET target=main
input type=text class=mailinput
echo $HTTP_GET_VARS['mailaddress'] ;
Un saludo, Danny
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks to all who contributed, I managed to get it to work using just
$mailaddress.
Much appreciated.
--
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
One learns to itch where one can scratch.
-- Ernest Bramah
--
PHP General Mailing List
Hi all, yet again im struggling with php syntax after to many years with c.
If anyone can help or point me to some good doc's i'd would really appreciate it! My
two questions are:
Can i declare an array that doesnt have a fixed size? Basically i want to assign the
results of a query to the
Every array does not have a fixed size:
while($temp=mssql_fetch_array($tmresult)){
$array[] = $temp[fieldname]; // ads an element at the end
// or
$array[$temp[id]]= $temp[fieldname]; // the table id is the key
}
You can access global variables in functions or class methods by:
1. declaring
Am Dienstag, 15. Juli 2003 14:39 schrieb bob pilly:
Can i declare an array that doesnt have a fixed size? Basically i want to
assign the results of a query to the array but obviously the query results
can change. Something along the lines of:
$myarray= array();
Thanks for the reply!
I must admit i and confused by the answer to the global variables question.
Can i ask another question? What if i want to increment a global counter from within a
function. at the moment i am trying to declare the variable normally:
$counter=0;
then within the function:
Hello,
This is a reply to an e-mail that you wrote on Tue, 15 Jul 2003 at 15:19,
lines prefixed by '' were originally written by you.
Can i ask another question? What if i want to increment a global
counter from within a function. at the moment i am trying to declare
the variable normally:
On Friday, July 11, 2003, 3:11:51 AM, Michael wrote:
MS Smarty has a class method where it calls:
$this-$some_var(somevalue);
Are you sure about that syntax? I'm not too familiar with Smarty, only
used it once, but I think its $this-some_var(value);
MS and this throws errors on Windows
Smarty has a class method where it calls:
$this-$some_var(somevalue);
and this throws errors on Windows versions of php that i've tried. why
is that?
-Michael
--
Pratt Museum IT Intern
All programmers are playwrights and all computers are lousy actors.
--
PHP General Mailing List
Hi!
I'm getting result from the form. Are there any differences between
using these 2 forms:
$_POST['my_variable']
or just
$my_variable
Is it more safety to use the first one?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I'm getting result from the form. Are there any differences between
using these 2 forms:
$_POST['my_variable']
or just
$my_variable
Is it more safety to use the first one?
You have to use the first one if you have register_globals set to off. If
you have it on, you can
Hello friends.
I am passing a variable of two word like communications software from one
form to the other. The variable passes as communications%20software . This
is okay for some purpose, but not for the hidden text field that I want. The
hidden text field gets the value communications only
At 15:23 22-6-2003, you wrote:
Hello friends.
I am passing a variable of two word like communications software from one
form to the other. The variable passes as communications%20software . This
is okay for some purpose, but not for the hidden text field that I want. The
hidden text field gets
I have a form called feedback which has a hidden field as follows :
?php
Printinput type=\text\ name=\SubCategoryName\
value=\$SubCategoryName\;
?
I send this hidden field as a variable in form2 which sends an email with
the following code :
?php
// Build up email header fields
$mailFrom
For example:
$a = 'a b c';
print $a;// a b c
print urlencode($a); // a+b+c
So, you want to urlencode your url (the query string).
Regards,
Philip
On Sun, 22 Jun 2003, Denis L. Menezes wrote:
I have a form called feedback which has a hidden field as follows :
?php
Printinput
-Original Message-
From: Douglas Douglas [mailto:[EMAIL PROTECTED]
Sent: 14 June 2003 00:57
Thanks for the explanation, but I think this is a
different case, isn't? I'm not trying to do this
${$_POST}, I'm trying to make this string $_POST.
Then why not just make it:
$var =
Hello everybody.
I have the following class method:
function HTTPValidator($method)
{
$this-data = ${'_'.$method};
$this-rules= array();
$this-required = array();
}
data, rules and required are arrays. The parameter
$method can have the values: GET or POST. I'm trying
to store
-Original Message-
From: Douglas Douglas
To: [EMAIL PROTECTED]
To get the superglobal array ($_GET or $_POST), I try
to build these strings '_'.$method. I'm sure this part
works, PHP builds the string _GET or _POST according
to the $method parameter.
I use ${'_'.$method} to get the
Thanks for the answer Mike.
Thanks for the explanation, but I think this is a
different case, isn't? I'm not trying to do this
${$_POST}, I'm trying to make this string $_POST.
And I have another question. Why does this code work?
?php
echo 'pre';
print_r($_POST);
echo '/prebrbr';
$method =
Hi,
I used a script to generate some result from a
database, which i want to display in flash.
In Flash, i created the Dynamic Text and declared
newsbits as Vars, and set it to Multiline.
I also loaded the PHP variables with the following
command in the ActionScript of the Frame :
John's solution is the better one. But if you really wish to stick to
your own, try and use eval() to complile $where$i.
Edwin
John W. Holmes wrote:
I have:
if ($where1 != '')
{
$whereArray = array_push($whereArray, $where1);
}
and I want to repeat for $where1 up to $where8
but
I'm getting a Variable Undefined error, even tho phpinfo() shows me that
globals are set to ON. I've done massive searches on the web to find a
solution, but I'm totally missing it. Help? (I've bolded where the
Variable Undefined is occuring --- where $whatglass =
$lkColor[$i]-glass; is
At 01:28 09.03.2003, Ron Biggs said:
[snip]
function ColorCollection($lkID){
$whatX = $lkID + 1; // Adding 1 turns makes the index correspond to the
template number.
// $aColLen = count($lkColor); //.length
$aColLen = test; //sizeof($lkColor); //.length
You are a god among men, Ernest. THANK YOU!
-ron
Ernest E Vogelsinger [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
At 01:28 09.03.2003, Ron Biggs said:
[snip]
function ColorCollection($lkID){
$whatX = $lkID + 1; // Adding 1 turns makes
At 01:53 09.03.2003, Ron Biggs said:
[snip]
You are a god among men, Ernest. THANK YOU!
[snip]
Bless you :)
Nope. You're welcome,
--
O Ernest E. Vogelsinger
(\)ICQ #13394035
^
Hi all,
I have something thats been driving me mad for days
I have:
if ($where1 != '')
{
$whereArray = array_push($whereArray, $where1);
}
and I want to repeat for $where1 up to $where8
but rather than write it out 8 times, I'd rather use a loop
for ($i=1; $i=8 i++)
{
if
for ($i=1; $i=8 i++)
{
if (${'where'.$i} != '')
{
$whereArray = array_push($whereArray, ${'where'.$i});
}
}
julian haffegee wrote:
Hi all,
I have something thats been driving me mad for days
I have:
if ($where1 != '')
{
$whereArray = array_push($whereArray, $where1);
You could probably do this. Set up a $$where variable, which would contain
where . $i, $i being the iterator of your loop.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have:
if ($where1 != '')
{
$whereArray = array_push($whereArray, $where1);
}
and I want to repeat for $where1 up to $where8
but rather than write it out 8 times, I'd rather use a loop
for ($i=1; $i=8 i++)
{
if ($where1 != '')
{
$whereArray =
I'm trying to piece apart someone's code to see exactly what it is they're
trying to do - This code was written for PHP 3.x, so it's not quite as
nice as 4 (with $_POST, $_GET, $_SESSION, etc). There's this one part in
particular that I have no idea what's trying to be done:
if (isset ($cookie))
Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 06, 2003 12:25 AM
Subject: Re: Re: RE: [PHP] Variable Problem
On Thursday 06 February 2003 07:48, Sunfire wrote:
on any server i ever dealt with if i put:
input type=sent value=?php\$sent\?
in the edit box for the value
On Thursday 06 February 2003 22:50, Sunfire wrote:
no that doesnt work either what you get when you do that one in the edit
box is:
using:
input type=text name=sent value=?php echo \$sent\;?
or any different with echo in the value field gives me in the box:
?php \\;?}
...rest of the script
I have a variable that get's chopped off at the %20 character.
In the form page I have:
bFrom: ?= $name;?
brE-mail address: ?= $email;?br
?= $sent;?/b/font/td
$sent and $name shows up fine, but immedieately I added (for testing)
input type=text name=sent value=?= $sent;?
input
On Thursday 06 February 2003 04:41, Sierra Times.com wrote:
I have a variable that get's chopped off at the %20 character.
In the form page I have:
bFrom: ?= $name;?
brE-mail address: ?= $email;?br
?= $sent;?/b/font/td
$sent and $name shows up fine, but immedieately I added
: Wednesday, February 05, 2003 3:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Variable Problem
I have a variable that get's chopped off at the %20 character.
In the form page I have:
bFrom: ?= $name;?
brE-mail address: ?= $email;?br
?= $sent;?/b/font/td
$sent and $name shows up fine
PM
Subject: Spam: Re: [PHP] Variable Problem
On Thursday 06 February 2003 04:41, Sierra Times.com wrote:
I have a variable that get's chopped off at the %20 character.
In the form page I have:
bFrom: ?= $name;?
brE-mail address: ?= $email;?br
?= $sent;?/b/font/td
$sent
need to echo...specially if there are 300 lines of code a block...
- Original Message -
From: Leonard Burton [EMAIL PROTECTED]
To: Sierra Times.com [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 4:16 PM
Subject: Spam: RE: [PHP] Variable Problem
You need to put
--- Sunfire [EMAIL PROTECTED] wrote:
you can do:
echo BLOCK
//any valid html code here
input type=sent value=\sent\
BLOCK;
No, he needed to output $sent, which is dynamic.
Also, it is a lot cleaner (and likely faster) just to use
? (or ?php) and ? to switch in/out of PHP as needed. If
Shiflett [EMAIL PROTECTED]
To: Sunfire [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, February 05, 2003 5:44 PM
Subject: Spam: Re: RE: [PHP] Variable Problem
--- Sunfire [EMAIL PROTECTED] wrote:
you can do:
echo BLOCK
//any valid html code here
input type=sent value=\sent\
BLOCK
--- Sunfire [EMAIL PROTECTED] wrote:
on any server i ever dealt with if i put:
input type=sent value=?php\$sent\?
in the edit box for the value i always always end up
with ?php instead of what $sent stands for..the only
way i found it to work is with echo but maybe im
missing something
You
On Thursday 06 February 2003 07:48, Sunfire wrote:
on any server i ever dealt with if i put:
input type=sent value=?php\$sent\?
in the edit box for the value i always always end up with ?php instead of
what $sent stands for..the only way i found it to work is with echo but
maybe im missing
I'm planning to use variable objects in a new project I'm working on.
The problem is, I can't find one page of documentation on them, so I
can't be sure if I'm going to be using an accidential feature that will
disappear. As an example of them working, the following outputs In
a_class.:
?php
This code:
?
$var1 = 02061030012452;
$var2 = 02061030012451;
$test1 = (string) $var1
$test2 = (string) $var2;
echo gettype($test2).---.gettype($test1).BRBR;
echo $test2.---.$test1.BRBR;
if ( $test2 != $test1){
echo (The variables are not equal.);
}
?
Produces the following output
On Friday 31 January 2003 05:55, James E Hicks III wrote:
This code:
?
$var1 = 02061030012452;
$var2 = 02061030012451;
$test1 = (string) $var1
$test2 = (string) $var2;
echo gettype($test2).---.gettype($test1).BRBR;
echo $test2.---.$test1.BRBR;
if ( $test2 != $test1){
echo
Hey guys,
Thanks in advance for your help.
I'm working on emailing the contents of a form using php. It worked fine,
until I turned global_variables off in an attempt to secure the form (I
still have yet to write the data validation part).
Anyway, I have an IF statement that fires depending on
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
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
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
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'].
Is there a way to access a variable defined in a function from a nested
function, without putting the variable in the global scope?
Perhaps some code will make my question clearer:
function enclosing() {
$variable1;
function enclosed() {
can I access $variable1
hi all,
is it possible to somehow have a function which takes a variable number
of arguments (with some kind of key association) which can then be
converted to variables?
i am sick of continually having to go back and add empty parameters to
functions in use.
an example would be..
function
-Original Message-
From: christian haines [mailto:[EMAIL PROTECTED]]
Sent: 03 December 2002 13:32
hi all,
is it possible to somehow have a function which takes a
variable number
of arguments
Yes -- look at the manual pages for func_num_args
Hi,
I currently have a page divided into three areas, two of which are iframes.
The user selects a component out of part 1, which decides what is shown
in part 2. When something is clicked in part 2 the information updates
in the second iframe, or part 3. This is all working fine through
I'm trying to create what I believe should be a simple script to help
with logging users into my site. My problem is that at the top of my
script I set a variable with it's value and then at later script I
cannot appear to access it.
Extract of my code is as follows and fails:
$IDField =
Ops, of course.
Sascha
Am Donnerstag, 31. Oktober 2002 04:07 schrieb Chris Shiflett:
I think you mean turn on register_globals. :-)
Sascha Cunz wrote:
try
?php
echo $_GET['tmp'];
?
or turn off register_globals in your php.ini file.
Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel
Hi,
I've just installed php 4.2.3 and wonder why I can't submit an variable
over url.
Example:
My Script:
Test.php
?
echo $tmp;
?
My URL:
www.some.domain/test.php?tmp=5
My result:
NOTHING !!!
Where is the error?
P.S. phpmyadmin run ok.
Thanx
Manuel
Hi,
try
?php
echo $_GET['tmp'];
?
or turn off register_globals in your php.ini file.
- Sascha
Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel Jenne:
Hi,
I've just installed php 4.2.3 and wonder why I can't submit an variable
over url.
Example:
My Script:
Test.php
?
echo $tmp;
Read this:
Variables from outside PHP:
http://www.php.net/manual/en/language.variables.external.php
Some notes:
a) Know your register_globals directive.
b) register_globals defaults to off as of PHP 4.2.0.
c) It's preferred not to rely on register_globals being on.
d) Autoglobals,
I think you mean turn on register_globals. :-)
Sascha Cunz wrote:
try
?php
echo $_GET['tmp'];
?
or turn off register_globals in your php.ini file.
Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel Jenne:
My Script:
Test.php
?
echo $tmp;
?
My URL:
www.some.domain/test.php?tmp=5
My
X.x No. It's turned off for a reason: security.
Chris Shiflett wrote:
I think you mean turn on register_globals. :-)
Sascha Cunz wrote:
try
?php
echo $_GET['tmp'];
?
or turn off register_globals in your php.ini file.
Am Mittwoch, 30. Oktober 2002 20:49 schrieb Manuel Jenne:
My Script:
Hi,
Mike Smith wrote:
I am stumped on a project for a receiving system. I'm not sure how to handle
receiving more than one line item. I can UPDATE ... WHERE id=$detid when I
have 1 item, but how would I get the SQL to fire X times depending on the
number of line items I have AND UPDATE the
I am stumped on a project for a receiving system. I'm not sure how to handle
receiving more than one line item. I can UPDATE ... WHERE id=$detid when I
have 1 item, but how would I get the SQL to fire X times depending on the
number of line items I have AND UPDATE the appropriate record.
Hi,
I apologize for asking this question as it must have been asked many times
before but I can't find it in any of the archives..
What I would like to do is setup forms in javascript and then on a submit to
assign these variables to PHP variables. I know how to assign PHP to
javascript with
Hi,
Tuesday, September 10, 2002, 7:08:27 AM, you wrote:
KF Hi,
KF I apologize for asking this question as it must have been asked many times
KF before but I can't find it in any of the archives..
KF What I would like to do is setup forms in javascript and then on a submit to
KF assign these
I've created (with help from some code from the site) a function to make
strings or arrays mysql safe. It works just fine, assuming you pass your
variables by reference ( sqlSafe($var) ), but I get this error every time
it is used:
[error] PHP Warning: Call-time pass-by-reference has been
Timo,
If you use func_num_args() to ascertain the number of arguments passed to
the function and func_get_arg() to retrieve each argument in turn (from a
list of unstated length), will that do the trick?
Regards,
=dn
I've created (with help from some code from the site) a function to make
Good luck,
Kevin
- Original Message -
From: Timo Ewalds [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 27, 2002 11:21 PM
Subject: [PHP] variable reference parameters
I've created (with help from some code from the site) a function to make
strings or arrays
Solved it -- I *can* do what I wanted without variable variables... it was
human error.
Justin French
on 22/08/02 4:09 PM, Justin French ([EMAIL PROTECTED]) wrote:
Hi all,
Having trouble with the logic behind this.
I have a dynamic SKU, and a dynamic size_range array.
Examples:
Hi all,
Having trouble with the logic behind this.
I have a dynamic SKU, and a dynamic size_range array.
Examples:
$sku = '44044';
$size_range = array('S', 'M', 'L');
Which I use to build a pull down select box:
SELECT name=myselect
?
foreach($sizes as $k = $v)
{
echo OPTION
Hello everyone,
This may seem a newbie question...
I have a PHP variable containing the text of the alert I want to display
($text) and I want to have it displayed in a javascript alert box
(something like alert($text) ).
I couldn't find out how to sort this out...
Regards,
Michael
alert(?echo $text?)
- Original Message -
From: Michael [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 19, 2002 1:54 PM
Subject: [PHP] Passing a PHP variable to javascript
Hello everyone,
This may seem a newbie question...
I have a PHP variable containing the text
- Original Message -
From: Michael [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 19, 2002 2:54 PM
Subject: [PHP] Passing a PHP variable to javascript
Hello everyone,
This may seem a newbie question...
I have a PHP variable containing the text of the alert I want to display
($text
a PHP variable containing the text of the alert I want to display
($text) and I want to have it displayed in a javascript alert box
(something like alert($text) ).
I couldn't find out how to sort this out...
Regards,
Michael
everyone,
This may seem a newbie question...
I have a PHP variable containing the text of the alert I want to display
($text) and I want to have it displayed in a javascript alert box
(something like alert($text) ).
I couldn't find out how to sort this out...
Regards,
Michael
Nice,
Thank you
-Message d'origine-
De: Chris Schoeman [EMAIL PROTECTED]
A: [EMAIL PROTECTED]
Date: 19/08/02
Objet: [PHP] Re: Passing a PHP variable to javascript
This is one way to do it
?php
echo SCRIPT LANGUAGE=\JavaScript\\n;
echo !--\n;
echo alert(\$text\)\n;
echo //--\n
Hi, i am coding a news manager backend for a client and i ran into a
little problem.
I have two tables, one with the news and one with the comments on each news.
How can i count how many comments there are for each news entry? Simply
put, is there some sort of Mysql
Look up on www.mysql.com documentation, you can do a count within a select
statement
SELECT whatever COUNT(whatever) AS COUNT FROM table GROUP BY 'something'
HAVING something = 'something'
--
| whatever | count |
--
| stuff selected |50
On Wed, Aug 14, 2002 at 08:23:18AM +, Remon Redika wrote:
input type=text name=namasa size=40
input type=text name=namadu size=40
input type=text name=namati size=40
$Namak = $namasa;
$Namak = $Namak.$namadu;
$Namak = $Namak.$namati;
Is that REALLY what you want
this is the form
-- insert.php
tr
td width=105Nama Satu/td
td width=289
input type=text name=namasa size=40
/td
/tr
td width=105Nama Dua/td
td width=289
input type=text name=namadu size=40
/td
/tr
td
A philosophical question
Are there any standards to naming variables??
I was told that one should include a letter or combination of letters to
describe a variable
i.e.
$sfoo = 'string'; // string
$bfoo = true; // bool
$nfoo = 10; // interger
etc
Thanks
--
Gerard Samuel
[snip]
A philosophical question
Are there any standards to naming variables??
I was told that one should include a letter or combination of letters to
describe a variable
i.e.
$sfoo = 'string'; // string
$bfoo = true; // bool
$nfoo = 10; // interger
[/snip]
My two cents,
I think if you are working on a personal product you use what works for
you. If working in a group find out or decide as a group what standards to
use. The hungarian standards are well designed, but I've seen others that
work as well.
When posting data from a from to another
Samuel this is what you can use as a standard (at least for yourself):
http://www.cs.msstate.edu/~cs1314/global/guide
It describes how to name variables, functions, scripts etc. In short the
variable names must tell the programmer what it is being used for,
e.g. $countHits = 0; // initialize
Hi,
does anyone know of an elegant way to get the Url of the current frame
in a php variable.
Thanks for any suggestions.
Patrick
PS I know that PHP_SELF will provide the url of the main frame
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
of an elegant way to get the Url of the current frame
in a php variable.
Thanks for any suggestions.
Patrick
PS I know that PHP_SELF will provide the url of the main frame
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of the current frame
in a php variable.
Thanks for any suggestions.
Patrick
PS I know that PHP_SELF will provide the url of the main frame
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a question about the following
$LoadResult = mysql_query(SELECT * from Items where username='test' and
password='test');
$num_results =mysql_num_rows($LoadResult);
for ($i=0; $i $num_results;$i++) {
$myrow = mysql_fetch_array($LoadResult, MYSQL_ASSOC);
$ProductName =
I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old
php script files. They can display successfully, but whei I submit the
data, they cannot pass to the second page even they can be shown in the URL
with get method. here is one of my script
jobapp.php
HTML
!--
Please don't repeat your questions, see the
other post for details. In short, it has to
do with register_globals directive in php.ini
Regards,
Philip Olson
On Tue, 9 Jul 2002, Terry Cheung wrote:
I 've just setup the Apache 1.3.26 with PHP 4.2.1. When I use back the old
php script files.
Hi Terry:
See the answer to the other thread you already started on this subject.
In short, use the superglobal's to access the input:
$_POST['variablename']
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
Question: Variable variables and variable functions work great, but how can
you execute arbitrary code statements using php code stored inside
variables?
// Example
function stuff() {
echo 'pStuff/p';
} // end stuff()
$function = 'stuff';
$function(); // works
/*
Given the above, I
On Thursday 27 June 2002 01:34, Henning Sittler wrote:
Question: Variable variables and variable functions work great, but how can
you execute arbitrary code statements using php code stored inside
variables?
eval()
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source
Perfect. Thank you Jason.
Henning Sittler
www.inscriber.com
-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 1:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] variable statements
On Thursday 27 June 2002 01:34, Henning Sittler wrote
Can anyone explain me why the following code causes
the parse error ... unexpected * ... ?
class test
{
var $a = 2*10;
}
Of course I know why there's a parse error, but I don't
know the reason why PHP doesn't allow this multiplication,
although it allows a statement like e.g. var $a = 20.
On Tue, Jun 18, 2002 at 07:21:51PM +0200, Jens Lehmann wrote:
class test
{
var $a = 2*10;
}
Of course I know why there's a parse error, but I don't
know the reason why PHP doesn't allow this multiplication,
Because, that's why. :)
--Dan
--
PHP classes that make
401 - 500 of 817 matches
Mail list logo