试试把<form action="deal.php"> 
改为<form action="deal.php" method="post"> 

解决方案 »

  1.   

    在我的机子上,楼主的程序是可以执行的.我觉得关键就在于楼主的PHP.ini没设置好.;;;;;;;;;;;;;;;;;
    ; Data Handling ;
    ;;;;;;;;;;;;;;;;;
    ;
    ; Note - track_vars is ALWAYS enabled as of PHP 4.0.3; The separator used in PHP generated URLs to separate arguments.
    ; Default is "&". 
    ;arg_separator.output = "&amp;"; List of separator(s) used by PHP to parse input URLs into variables.
    ; Default is "&". 
    ; NOTE: Every character in this directive is considered as separator!
    ;arg_separator.input = ";&"; This directive describes the order in which PHP registers GET, POST, Cookie,
    ; Environment and Built-in variables (G, P, C, E & S respectively, often
    ; referred to as EGPCS or GPC).  Registration is done from left to right, newer
    ; values override older values.
    variables_order = "EGPCS"; Whether or not to register the EGPCS variables as global variables.  You may
    ; want to turn this off if you don't want to clutter your scripts' global scope
    ; with user data.  This makes most sense when coupled with track_vars - in which
    ; case you can access all of the GPC variables through the $HTTP_*_VARS[],
    ; variables.
    ;
    ; You should do your best to write your scripts so that they do not require
    ; register_globals to be on;  Using form variables as globals can easily lead
    ; to possible security problems, if the code is not very well thought of.
    register_globals = On; This directive tells PHP whether to declare the argv&argc variables (that
    ; would contain the GET information).  If you don't use these variables, you
    ; should turn it off for increased performance.
    register_argc_argv = On; Maximum size of POST data that PHP will accept.
    post_max_size = 8M; This directive is deprecated.  Use variables_order instead.
    gpc_order = "GPC"; Magic quotes
    ;; Magic quotes for incoming GET/POST/Cookie data.
    magic_quotes_gpc = On; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
    magic_quotes_runtime = Off    ; Use Sybase-style magic quotes (escape ' with '' instead of \').
    magic_quotes_sybase = Off; Automatically add files before or after any PHP document.
    auto_prepend_file =
    auto_append_file =; As of 4.0b4, PHP always outputs a character encoding by default in
    ; the Content-type: header.  To disable sending of the charset, simply
    ; set it to be empty.
    ;
    ; PHP's built-in default is text/html
    default_mimetype = "text/html"
    ;default_charset = "iso-8859-1"; Always populate the $HTTP_RAW_POST_DATA variable.
    ;always_populate_raw_post_data = On------------
    以上是我的PHP.ini中与此问题相关的设置.
      

  2.   

    我觉得,以下一句话有问题
    echo "你喜欢$start,对吗?<br>"; 
    应该改为
    echo "你喜欢".$start.",对吗?<br>";
    试试看,,,,
      

  3.   

    首先,修改 php.ini 使php 不顯示 notice .error_reporting = E_ALL & ~E_NOTICE 
    其次,如果仍然有以下提示 ;
    'Notice: Undefined variable: start,对吗? in c:\apache\htdocs\deal.php on line 10 '改為 
    echo "你喜欢".$start.",对吗?<br>";