Jump to content

noidtluom

Members
  • Posts

    51
  • Joined

  • Last visited

    Never

Everything posted by noidtluom

  1. Remove the single quotes around the variables.
  2. I don't like PHP Ticks. Not many people use them IMHO. What you might need is a frame which keeps on refreshing every so many seconds in order to increment a value in your MySQL database. Of course, before it increments it, it needs to check how long it has been since it last got incremented, so people can't just force refresh to increment manually,
  3. What you have described there and what you wanted to make originally both follow the same principles in terms of programming. The functions are all the same. I suggest you just learn PHP and MySQL. However, unless you've had any other programming experience in other languages, it might take some time until you can start learning OO for PHP. Wes1890 explained that if you want a pet made with flash, eg: can be animated and real-time interactive, then you should learn flash, and javascript/ajax. (You'll probably learn javascript anyway whilst programming HTML - they seem to come hand in hand when developing apps for me...if your aim is to have some cool client-side stuff)
  4. Make sure on your first page, the one with all the input fields, has this form value: <form method="post"> Pretty self explanatory why you need it there
  5. This is to .flv right? Well, I would setup a cron job. Probably not the best answer, but it might be something you'd be looking into.
  6. Uh. My approach would be to put the information (eg: names such as 1, 2, 3 etc) in an array then use shuffle(). Then use a foreach to check each new array key/value and reset the names.
  7. Register globals is basically getting something from the URL and then using it in a script. It's a pretty simple problem. EG: if I visit mypage.php?variable=foo Then I do: echo $variable; It will say "foo". So what I think you are talking about is this section for example: //This checks to see if there is a page number. If not, it will set it to page 1 if (!(isset($pagenum))) { $pagenum = 1; } So, (I might be wrong I've never used a server with globals turned off) I think that with your global settings turned off, just saying $pagenum won't help. You'll have to use $_GET. (Same for $tag) Summary: just use $_GET.
  8. Just as a final note: you can't name variables with anything other than numbers, letters and underscores. So $my$v$a$r would not work. Also: don't use $$variables unless you can't avoid it. Not only is it inefficient (makes loads of variables with no categorization at all - that's why they invented arrays ) but it also makes coding harder to understand. Use the 'topic solved' button - it's there for a reason!
  9. Edit: http://uploader.polorix.net//files/224/POSE2/newlite2.png (Or should I remove the glow altogether?) As another note: the place that currently says "The Showcase" will not stay there. It is simply a placeholder for an image which will change every month.
  10. Just an image for now, I haven't sliced it yet. http://uploader.polorix.net//files/224/POSE2/newlite.png
  11. But I'm not going to pay... Oh well, can a moderator come and put this in the right place?
  12. Firstly, I would like to apologize if this is in the wrong forum section. I'm not too sure where it should go. Basically, I'm in the process of making a PHP Framework, and I think the "version 1" is ready for release. Don't worry, it's a very simple framework. This is my first time making a framework, so I'm looking for: 1) Somebody familiar with MVC design to comment/improve my framework design. 2) Somebody willing to download and test it out on their server. 3) Somebody who hopefully uses GTalk or MSN Messenger whom I can discuss with. I think a one-to-one discussion would be much better than a "click here to download", and then viewing comments. It'll be easier to understand. If anybody is interesting, send me an email : dionmoult[at]gmail(dot)com or a private message, or just reply with your contact info.
  13. Well, first off, look at the code below. It's very easy to understand: <?php class bar { public function anothertest($foo, $bar, $baz) { echo $this->asdf; $num = func_num_args(); echo $num; } } $self = array('a', 'b', 'c', 'd'); print_r($self); $bar = new bar(); $bar->anothertest(); ?> Now, I want to find out how many arguments "anothertest" has before calling it. So if it has three arguments, I will do $bar->anothertest($self['0'], $self['1'], $self['2']); func_num_args can only be called inside the function, so I don't think that will work. How can it be done?
  14. Ah yes! Thank you! I'm understanding it a lot better now
  15. Ok. Thanks. Glad I sorted out those principles. Alright, so how would I get this to work? <?php class foo { protected $asdf; public function test($var) { $this->asdf = $var; } } class bar extends foo { public function anothertest() { echo $this->asdf; } } $foo = new foo(); $foo->test('lol'); $bar = new bar(); $bar->anothertest(); ?> (It's a simplified version of the code I'm working on)
  16. So you mean that whatever variables you set in class foo can only be called in the extended class bar if you do parent::whateverFunctionYouSetTheVariableIn() ?
  17. I'm trying to do this: <?php class foo { protected $asdf; public function __construct() { $this->asdf = 'lol'; } } class bar extends foo { public function __construct() { echo $this->asdf; } } ?> How can it be done?
  18. Hello all, I'm terrible at javascript, and I've hardly ever used it before. I'm trying to make a popup appear at the center of the page, and this is what I have so far: That's the code for the javascript function, can you see if you can find anything wrong with it? (Note: the code to call the function seems to be fine)
  19. Thanks guys. I'm using PHP 4 so I had to edit it a little. Here's my working test for those who are interested (others who see this topic): class Foo { function test() { echo 'Hello world!'; } } class Bar { var $x = 1; var $y; function Bar() { $this->y = new Foo; } } $foobar = new Bar; echo $foobar->x; echo $foobar->y->test(); Thanks! Topic Solved!
  20. I am sorry. I don't really understand your post. However, my efforts based on your brief have progressed as follows: <?php class Foo { function foobar() { echo 'foobarbom.'; } } $fooInstance = new Foo; $fooInstance->foobar(); echo '<br />'; class Bar { function test() { echo $this->fooInstance->foobar(); } } $barInstance = new Bar; $barInstance->test(); ?> The error it is giving me is "Fatal error: Call to a member function on a non-object in..." I am sorry I don't know what is a member function. Googling it did not find much. Do you mind giving me a brief example? Thanks in advance.
  21. I've been using classes recently and I've learnt about $this->variable, and $this->function(). However, whilst learning MVC, I've seen some examples of $this->foo->function(); - Can anybody tell me what this is? I am assuming it is a type of "sub-function", but I'm not sure how to use it. Any help appreciated. Thanks in advance.
  22. Well, I'm not at all interested in getting books really...I prefer to learn everything free and online That link is awesome! It answers my question perfectly! Thanks!
  23. Hi, (again) As part of my ambitious project which ultimate aim is not to produce amazing output (well, eventually), but to improve myself, I need to learn MVC. In a nutshell, I will be making a simple PHP framework so that people can easily make their own websites with personal pages. I will then plan on making modules that people can easily add on. This has brought me to the subject of MVC. I personally cannot find much online that I can understand easily, so is there anybody here that can help? For example by giving me a very easy-to-learn tutorial link, or what would be really good is somebody here who has experience with MVC who can help me via Email or MSN Messenger/Google Talk. Note: This is not a request for somebody to code stuff for me, just a request of help to see if anybody can help me learn MVC, eg: answer questions occasionally. Thanks in advance.
  24. Well, I agree that PHP is pretty easy to start off with learning, but that is no reason to call it amateur. I, myself have just noticed a pretty big jump between the beginning of learning PHP, where you basically dump code wherever you want, and then now I'm moving towards O.O.P and MVC, and even I don't know about REGEX and PATTERN (whoah, more for me to learn!)
  25. Wow, nobody here rooting for FileZilla? From my personal opinion, because in my country and internet's speed is pretty disappointing, browser-based CPanels (especially the ftp://site.com for Internet Explorer) are 99% hindrance 1% useful. Note: I have not used GoDaddy's CPanel so I cannot say whether it is an exception. I've tried CuteFTP and SmartFTP before but for me, they're all pretty much the same, and since I started off with FileZilla I'm quite comfortable where I am.
×
×
  • 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.