ID:               21192
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         Performance problem
 Operating System: Windows XP Home Ed
 PHP Version:      4.2.3
 New Comment:

Dear sirs, 
I have the same problem of Pasquale. I have already changed the
parameter "register_globals on" but my script doesn't recognize the
variables passed from the form with GET method.
PHP v.4.2.3 and APACHE 1.3.27 on Windows XP
Can you help me? Thank you! 
LUCA ALVISI


Previous Comments:
------------------------------------------------------------------------

[2002-12-26 06:57:01] [EMAIL PROTECTED]

In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.

------------------------------------------------------------------------

[2002-12-26 06:54:13] [EMAIL PROTECTED]

Dear Sirs,

I have recently installed PHP v.4.2.3 on a Windows XP Home Edition
system equipped with an Apache HTTP Server v.1.3.24 and MySQL v.4.0.3.

I believe the installation was completed successfully since I have
already managed to create simple databases with PHP and MySQL and
insert, update and delete tables and records.

In spite of this, I have encountered a problem dealing with variable
settings that is literally driving me crazy. I'll try to explain it in
very few words.

If I populate a table using the following code, everything works
perfectly:

//***START OF CODE***
@mysql_connect("localhost", "root", "") or die ("Sorry. Could not
connect to the DB!");
@mysql_select_db("mydb") or die ("Sorry. Coluld not open the DB!");    
      
@mysql_query("insert into mytable (field1,field2) values ('First field
value','Second field value')") or die("Sorry. Could not insert
data!");
//***END OF CODE***

Nevertheless, if I try to specify the field values by means of
variables corresponding to the values of text boxes, the variables are
not recognized by PHP and I get an error message. So the problem is, I
can't import variables from text boxes!

In order to simplify what I mean, the following basic code, saved in a
file called "test.php", originates an error on my system:

//***START OF CODE***
<input type="text" name="mytext" value="Hello world!">

<?php

echo "$mytext";

?>
//***END OF CODE***

When I execute the code above, all I get is the following error
message:

Notice: Undefined variable: mytext in c:\program files\apache
group\apache\htdocs\test.php on line 5

I would very much like to understand the reason why such elementary
lines of code don't work on my system. Please if you have the answer to
my question, help me. If possible, notify me at the following e-mail
address:

[EMAIL PROTECTED]

Thanks in advance for your help.

Yours faithfully,

Pasquale Esposito
Perugia (Italy)

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21192&edit=1

Reply via email to