Jump to content

Julius

Members
  • Posts

    62
  • Joined

  • Last visited

    Never

Everything posted by Julius

  1. Isn't there any other way to do this? Did codeigniter do this the same way?
  2. I'm pretty new in php oop and mysql. I don't know how to make my function so it could see the difference between select and insert, update, delete queries. <?php class DB { public $results = array ( ); public function query ( $query ) { $qr = mysql_query ( $query ); // now, if this was select query, i want to store results in $this -> results // otherwise do nothing or return true if query succeeded. } } ?>
  3. Hello, I'm trying to make my first database class. I thought I will create a function for select, delete, update and insert, but then I thought, what if I'm going to use join while selecting something? and then I realised, that I need only one function, called query. Now, the issue is that I don't know how to make function know that I'm selecting some data from database, or I'm updating data. If I select data, I want my result variable to be filled with results. I hope you understand my question-problem. I want this to be smart, so if you have any ideas - please share. Thank you
  4. hell yeah. a helper. I'm going to create my first helper. Thanks but the question about model class is still unanswered
  5. just attach it to link. example: <a href="yourfile.php?aff=$aff">MyFile</a> is that what you want?
  6. this is a very good solution, BUT. My file starts like this: <?php Mynewclass extends Controller { function () { code } } ?>, so how should I include that file, or maybe you could give me an alternative solution? OOP is new for me, just started using. And my "framework" is pretty similar to codeigniter
  7. Hello, I'm doing something that looks like framework. It's my first serious "project". And now, I have a few questions: what basic functions are needed in MVC model class? Just tell me some functions, that could use, so I could try to code them. And the next question is... I'm going to create a login system for users. In my website there will be pages, that are visible for all visitors, and only for members. For example main website page should be visible for all visitors, but the page, where member can change his password, should be visible only for member. I know only one way to do this: allways and everywhere check if user is logged in. But isn't there smarter and simpler way? I hope you understood what I need. Sorry for bad english
  8. Hi, I'm trying to write my own php mvc framework, but I don't know where to start. I have been using codeigniter for a while, then i thought i shouldn't use it, because I'm not getting smarter when most of the code is written for me. So, writting my own framework would be a great practice to learn oop, i guess. I need: url routing, the would work like codeigniter's (http://website.com/controller/method/some/other/params) and calling some function for rendering layout files similar to codeigniter's ($this -> load -> view ( 'file.php' ); and not like this: $header = new Template ( 'header.php' ); then some coding with header, and same with content.php and footer.php). Can anyone please help me? Where to start? sorry for bad English
  9. hello, I have tried to build a website on codeigniter, then i thought I shouldn't use a framework because then I would learn php better. And heres a problem: on codeigniter, to load a template file all I had to do was write this line $this -> load -> view ( 'somefile.php' ); now when i can't use this, i googled for some php template classes/engines, and didn't find any like codeigniter had. I want to load the file like $this -> load ( 'file.php' ); or similar, because now I have to write much more lines and it's pretty confusing ( $template = new Template ( 'file.php' ); the operations with it, and if my header/footer is separated from main content it gets pretty messy.). Can anyone help me to write my own template class? Sorry for bad English...
  10. Hi, I'm trying to make my own blog, and first of all I decided to make the design. The problem is, I dont know where to start, because i have never did something like that (I mean design). So, i don't know how to do this: I want make two columns, in one of them(left) I will display articles, on the other(right) I want to make a login box and a box that contains some short messages. How can I do that?
  11. Hey guys, Few years ago, i created my first wap forum, and after that, somehow I just stopped programing. Just got tired of it. Now, i was doing some research on web design, and oop. I have tried codeigniter, and I would use it, but, i got into college after school, and I'm studying programing for computers. So, my final task in this college, will be create a website, so, i wanna start working on it. So, codeigniter will not work, because it's too easy, yes, to start learning oop, it's okay, but really, almost everything you need is in the library folder, and I want more challenges i googled for php mvc tutorials, found few, but there was more code than text that explains it. What do I want from you, you may ask. Well, I want you, to explain me, how to create my own mvc core. Little bit off topic: how the heck does codeigniter rewrite urls without .htaccess? Thanks for any help! Sorry for my bad english
×
×
  • 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.