Welcome Guest, Not a member yet? Register   Sign In
Problems passing data in registration form
#3

[eluser]Stromgren[/eluser]
[quote author="Oscar Dias" date="1342557335"]I think when you do the foreach inside the model the $interest variable is the ID. So in your model it would be like:
Code:
...
$user_id = mysql_insert_id();
  
foreach($interests as $interest)
{
$query = "INSERT INTO users_interests (user_id, int_id) VALUES (?, ?)";
$this->db->query($query, array($user_id, $interest));
}

This should do the trick ;-)[/quote]

Yeeeaah !!! You're like a genius Big Grin Thank you very much.. I even understood why Wink


Messages In This Thread
Problems passing data in registration form - by El Forum - 07-17-2012, 12:16 PM
Problems passing data in registration form - by El Forum - 07-17-2012, 01:35 PM
Problems passing data in registration form - by El Forum - 07-17-2012, 03:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB