Results 1 to 2 of 2

Thread: Php problem

  1. #1
    Join Date
    Aug 2004

    Unanswered: Php problem

    I think I have problem about setting.
    When I run code I got message like this.
    "Notice: Undefined variable: id in C:\Interpub\wwwroot\ASP\PHP_WORK\employee\edit.php online 1

    Warning: Cannot modify header information-headers already sent by (output stated at C:\Interpub\wwwroot\ASP\PHP_WORK\employee\edit.php :1) in C:\Interpub\wwwroot\ASP\PHP_WORK\employee\edit.php on line 1

    Notice: Undefined variable: id in C:\Inetpub\wwwroot\ASP\PHP_WORK\employee\edit.php on line 5
    select * from employee where id=

    Warning mysql_fetch_arrat(): supplied argument is not a valid MySql result resource in C;|Inetpub\wwwroot\ASP\PHP_WORK\employee\edit.php on line 8"

    I didn't have an idea why I got the message like this because I clicked link Edit from index.php. I think the problem is setting (Php, mysql , phpmyadmin) because when I run this code in my old computer it work.

  2. #2
    Join Date
    Jan 2004
    I think first you have to make this in your php.ini file
    error_reporting= E_ALL & ~E_NOTICE
    This will avoid the notice that are not relevent.
    The second warning in due to the first notice.
    For the 3rd look your select stament. What is the variable you are passing there? The values in empty or use `` whe you specify id.. menas when you us the filed name id use like this `id`. Id is a keyword so normally gives error id not used properly. This error is from mysql.
    the last error is due to the 3rd error once you solve the 3rd error the 4th one will automatically disappear.
    If still you have any problem get back to us.

    Freelance and Technology Consultant
    Dreams are for ever

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts