Hey guys,
I have the joomla reg plugin for my one form working well... now it concatenates the first_name and last_name together for the name filed as it should. However, I have a profile page form that displays the users data and from that form I allow the users to update their info. For some reason my UPDATE is not changing the jos_users table??
see anything I am doing wrong here?
I have the joomla reg plugin for my one form working well... now it concatenates the first_name and last_name together for the name filed as it should. However, I have a profile page form that displays the users data and from that form I allow the users to update their info. For some reason my UPDATE is not changing the jos_users table??
$name = JRequest::getVar('first_name', '', 'post')." ".JRequest::getVar('last_name', '', 'post');
/* now save the name to the jos_users table */
//$db =& JFactory::getDBO();
$q = '
UPDATE `#__users`
SET `name` = "'.$name.'"
WHERE `user_id` = '.$smuser.'';
$db->setQuery($q);
$db->query();
echo print_r($q, true);
see anything I am doing wrong here?
try to make the query like this:
Max
$q = "UPDATE `#__users` SET `name` = '".$name."' WHERE `user_id` = '".$smuser."'";
Max
This topic is locked and no more replies can be posted.