spiderman07 Posted May 3, 2007 Share Posted May 3, 2007 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 More sharing options...
jitesh Posted May 3, 2007 Share Posted May 3, 2007 Give double Quates to all values of feilds. <input type="hidden" name="txtUserID" value="<?php echo $Details['emp_id'] ?>"> Link to comment https://forums.phpfreaks.com/topic/49780-solved-update-problems/#findComment-244186 Share on other sites More sharing options...
spiderman07 Posted May 3, 2007 Author Share Posted May 3, 2007 OK...silly mistake..solved. Link to comment https://forums.phpfreaks.com/topic/49780-solved-update-problems/#findComment-244190 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.