Jump to content

[SOLVED] update problems


spiderman07

Recommended Posts

OK. I have a form. I pass the variable like following:

 

<input type="hidden" name="txtUserID" value=<?php echo $Details['emp_id'] ?>>

 

the value return only some part of the string. Let say i want to update "nam" to "nam king", the update could not be performed. I used the TRIM function to strip the white space, but it doesn't work. What kind of functions i should use?

 

If "nam king" is enter in the field, it will only return "nam" which is the original data from DB, meaning, it never updated.

 


<?php

$queryUpdate = "UPDATE employee SET emp_First_name='$txtUserFirst', emp_Last_name='$txtUserLast', emp_password='$txtPassword', emp_phone='$txtUserPhone', emp_email='$txtEmail', emp_address='$txtUserAddr', Level='$rbtnLevel' WHERE emp_id='$txtUserID'";
        
	    $resultUpdate = mysql_query($queryUpdate);

?>

Link to comment
https://forums.phpfreaks.com/topic/49780-solved-update-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.