problem on editing an employee

Discussion in 'PHP' started by lounar, Nov 15, 2007.

  1. #1
    ok guys i am attaching everything has to do with the employee story of my db and site! the problem is tha when i push button edit employee first it dont take the information of the selected one as the php code says and second when i put
    some other info in the boxes of the edit tag it doesnt updated! i have posted and the create file i have done so any ideas are welcome!


    P.S u will notice that somewhere i refer on a file called Viewemployees1.php i havent uploaded cause i have reached the limit!


    FOCUS ON EDITEMPLOYEES


    here is the create table if u wanna test it!


    CREATE TABLE `employees` (
    `empid` int(11) NOT NULL auto_increment,
    `emplastname` char(25) character set utf8 NOT NULL,
    `empfirstname` char(25) character set utf8 NOT NULL,
    `emphiredate` date NOT NULL,
    `empdepid` int(11) default NULL,
    `empsalary` float(6,2) NOT NULL,
    `empphonenumber` text character set latin1 collate latin1_general_ci,
    PRIMARY KEY (`empid`),
    KEY `idepid` (`empdepid`)
    )
     

    Attached Files:

    lounar, Nov 15, 2007 IP
  2. lfhost

    lfhost Peon

    Messages:
    232
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    change

    
    			$request = "UPDATE employees SET 
    
    				employees.emplastname='$emplastname', employees.empfirstname='$empfirstname', employees.empdepid='$empdepid',
    			 employees.empsalary='$empsalary',employees.empphonenumber='$empphonenuber,employees.emphiredate='$emphiredate' 
    			 WHERE employees.empid='$id'";
    
    Code (markup):
    to

    
    			$request = "UPDATE employees SET 
                                                          emplastname='$emplastname',  
                                                          empfirstname='$empfirstname', 
                                                          empdepid='$empdepid',
    	                                         empsalary='$empsalary',
                                                          empphonenumber='$empphonenuber',
                                                          emphiredate='$emphiredate' 
    			 WHERE empid='$id' ";
    
    Code (markup):
     
    lfhost, Nov 15, 2007 IP
  3. msaqibansari

    msaqibansari Peon

    Messages:
    84
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Is problem resolved...?
     
    msaqibansari, Nov 15, 2007 IP
  4. lounar

    lounar Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4

    nothing changed :/
     
    lounar, Nov 16, 2007 IP
  5. lounar

    lounar Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    no one?? cmo plz help me the problem is that on browser when i push edit it opens the edit page and in the url has the id of the person i want to edit but it doesnt appears the already saved data!
     
    lounar, Nov 16, 2007 IP
  6. lounar

    lounar Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6

    plz take a look at my problem i need some help!! i cant see sthing wrong just wondering if u see sthing and also see my last post on this thread about the problem
     
    lounar, Nov 17, 2007 IP