Return users's id from the db |
[eluser]Mowgli[/eluser]
Hello guys, I'm pretty new into php and i just started working with codeigniter. Here's something i can't figure out: Code: $usr = $this->input->post('username'); What am i doing wrong ? Thanks in advance.
[eluser]jmb727[/eluser]
[quote author="Mowgli" date="1306195973"]Hello guys, I'm pretty new into php and i just started working with codeigniter. Here's something i can't figure out: Code: $usr = $this->input->post('username'); What am i doing wrong ? Thanks in advance.[/quote] You're SQL code wasn't executed in a query, you tried to access an array element on a string containing sql code. I highly recommend using Active Record, used in the code below. http://ellislab.com/codeigniter/user-gui...ecord.html Try this. Code: $usr = $this->input->post('username');
[eluser]Mowgli[/eluser]
Thanks a lot, buddy ! It's working now. And thanks for the Active Record tip, really helpful.
[eluser]jmb727[/eluser]
[quote author="Mowgli" date="1306202362"]Thanks a lot, buddy ! It's working now. And thanks for the Active Record tip, really helpful. [/quote] No probs. |
Welcome Guest, Not a member yet? Register Sign In |