0

stuck here in pset7 c$50 finance portfolio.php every thing good but the associative array is empty although i think i did all is well in phpmyadmin here is my code
http://pastebin.com/UNTMEwue

and this is screanhoot of phpmyadmin phpmyadmin user

portfoli table

2 Answers 2

2

You can confirm if array is in fact being populated in $rows with this line:

print_r($rows);

4
  • i tryed print_r($rows); but it get to me array() mean it's empty what should i do Commented Apr 7, 2016 at 7:38
  • Your code in the excerpt above appears correct. Are you sure there are entries for the specific id you're querying? Try buying some stocks with that id and see if it populates.
    – ronga
    Commented Apr 8, 2016 at 7:53
  • Thanks I delete the table and create a new one and the problem solved cause I used in the query ID instead of user_ID with $_SESSION (ID) Commented Apr 8, 2016 at 9:51
  • 1
    I guessed as much. If this answered your question, please click to close this thread.
    – ronga
    Commented Apr 11, 2016 at 7:46
0

I'm sorry this was from a long time and this day i was reviewing my account and then see that and i didn't known what is the meaning of closing the question but Now

the answer was :)

Thanks I delete the table and create a new one and the problem solved cause I used in the query ID instead of user_ID with $_SESSION (ID)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .