Jump to content

muffinsincream

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

muffinsincream's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, getmukesh I see what I must do. I was thinking about a single function before but i really need several, that makes complete sense. So glad someone thought of it.
  2. I know the basic use of functions, but I dont want get_something() to print the whole table. I want mysql data to display in a table, but I want all the table code in the view and all the mysql code in the functions file.
  3. I want to keep my MySQL queries out of my view. In my view I would like to print a list of classes, and in my functions file I want to create the function get_classes. I want to keep all of the view code (html and stuff) in the view, and all the database access code in my functions file.
  4. I am trying to separate my view from my database more, because it is getting far to annoying to edit. I was trying to a make a function that would retrieve data from my MySQL database, so I could then use it in my view. Basically what I want the view to look like is: get_classes($user); echo '<b>' . $class['name'] . '</b><br/>'; How would I code the function that would make that work? Thanks.
  5. when i use that code, nothing happens It will only work if the = is followed by a linebreak character, so it shouldn't do anything if it isn't followed by the linebreak character. Maybe the syntax is bad. Check your error log.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.