From:             [EMAIL PROTECTED]
Operating system: Windows XP Home Ed
PHP version:      4.2.3
PHP Bug Type:     Performance problem
Bug description:  Problems with variables

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 bug report at http://bugs.php.net/?id=21192&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21192&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21192&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21192&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21192&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21192&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21192&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21192&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21192&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21192&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21192&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21192&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21192&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21192&r=isapi

Reply via email to