From:             caspersvn at yahoo dot com
Operating system: windows 2000 pro
PHP version:      5.0.0
PHP Bug Type:     Unknown/Other Function
Bug description:  Error declare variable

Description:
------------
when i run this page i receive an error

Notice: Undefined variable: fname in E:\GPO\Webphp\guestbook\guestbook.php
on line 52

and i can receive the value of variable if i submit from page 'A' to page
'B' (page B can not receive the value of variable what sent from page A)

please show me the way to solve it.

Thanks

Reproduce code:
---------------
<?
  if ($fname=="toan")
{
  echo ("right");
}
  else {
?>
  <form method=post>
      Name: <input type="text" name="fname"> <input type="submit"
name="submit" value="Enter Information">
  </form>
<? } ?>



-- 
Edit bug report at http://bugs.php.net/?id=29670&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29670&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29670&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29670&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29670&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29670&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29670&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29670&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29670&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29670&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29670&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29670&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29670&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29670&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29670&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29670&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29670&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29670&r=float

Reply via email to