Form and user data advice needed!!! |
[eluser]ede196620[/eluser]
Hello everyone I know this is long but pleas read everything i wanted to explain everything clearly. I Am still new to codeigniter and the wonderful world of coding ![]() Also in the administrator dashboard i have a page where all these results are displayed that the user inputs with its credentials. I have everything echo out on the web page the data itself is displayed but not as it suppose to, the credentials data is not displaying with the correct user suggestions data. Is this because of something i am missing in my code or is ti something i have to do with the database ? I do have the foreign key set on the two tables linked by id. I am still new and dount know what is the next step to take to correct this. If u have any advice plz post it it will be greatly appreciated tnx in advance.
[eluser]ede196620[/eluser]
sorry it took so long to replay but here it is Code: function __construct()
[eluser]TheFuzzy0ne[/eluser]
Sorry, I think we'll need the view as well. I'm not entirely sure what the problem is from your explanation, so I'm hoping that seeing the view might make it clearer. Also, in your controller, you are loading info_model twice. Once in the constructor, and once in the getall() method.
[eluser]ede196620[/eluser]
i know after posting i fixed the problem but tnx for noticing ![]() Code: <html>
[eluser]TheFuzzy0ne[/eluser]
I'm sorry, I'm having difficulty understanding what you mean. Can you give me an example of the data you'd expect to see on the page and the order you'd like it to be in?
[eluser]ede196620[/eluser]
basically all i want is to organize my user data that when the admin looks at the results of suggestions all the suggestions will be with an appropriate user displayed on the page and the user can have multiple suggestions.
[eluser]TheFuzzy0ne[/eluser]
You could use GROUP_CONCAT() to concatenate the comments, so you only get one row per user, and each row will contain all of the users comments. You may find this useful: http://www.w3resource.com/mysql/aggregat...concat.php
[eluser]ede196620[/eluser]
tnx for the help but i solved my problem using session i still have one question about the session class how do u select session id ?
[eluser]TheFuzzy0ne[/eluser]
I think you can get the session ID with $this->session->userdata('session_id'). I'm not sure why you'd need it though. CodeIgniter generates a new one periodically, and using the session methods such as set_userdata, userdata(), set_flashdata and flash_data() you can set/get any information within the current session. The session ID should not be required by your app, unless you're extending the session library. |
Welcome Guest, Not a member yet? Register Sign In |