Jump to content

NoUser2U

Members
  • Content Count

    63
  • Joined

  • Last visited

Everything posted by NoUser2U

  1. Thank you for your reply. I read into this Red5 server, and unfortunately, i didn't find an extensive manual or tutorials. I installed it but have trouble finding a good and extensive tutorial or help file. Besides, the original wiki is somehow down, it seems. I was thinking, can't Apache do the task??
  2. Hi, I'd like to stream from a webcam to a server and store it there. It has to be done over the web, so no additional software will be used to stream the data to the server (i.e.: no VLC or consorts. I can manage to capture webcam with JQuery).The video has to be stored on the server for later replay. It has to be possible to stream to the server from any computer (via the webcam). The problem is, I'm a complete newby in the field of multimedia and I don't know what kind of server i need to look for. I have an apache server installed here, but I think I read apache can't do that job well, sinc
  3. Hi, I use php's header() function for redirection users, using header('Location: some_location');In the php manual, it says: An example of incorrect usage of header() is also given in the same manual:<html><?php/* This will give an error. Note the output* above, which is before the header() call */header('Location: http://www.example.com/');?> BUT, if i paste the exact same code in somefile.php, and then navigate to that file, i do not get an error....Besides, i have used header() in my own site multiple times after outputting content (html elements, text), and yet no error, u
  4. Ooh, i didn't know there won't be interference between different users due to each connection being independant. Thank you for your help Ingolme! I will now fix this using mysql_insert_id().
  5. Thnx for the quick reply. I quickly check the php manual to see if there are any pointers to look out for using that method, and i stumbled across these 2 notes: Note: Because mysql_insert_id() acts on the last performed query, be sure to call mysql_insert_id() immediately after the query that generates the value.Note: The value of the MySQL SQL function LAST_INSERT_ID() always contains the most recently generated AUTO_INCREMENT value, and is not reset between queries.(http://php.net/manua...l-insert-id.php) Let's say i use line1: mysql_query(...);Xline2: $appointmentId = mysql_insert_id();
  6. Hi ingolme,Thank you for the post. I am already familiar with the use of Foreign Keys and referencing. If i use 3 tables, as you mentioned, then wouldn't it be the same as 'store appointment first, then look up the unique id of it; after that, relate the two'?. I mean, i still would need the unique id of the appointment, and because that id is created as soon as the appointment is stored in the DB, then i would still need to look the appointment up in the DB to get it's unique ID (and the problem here is: what criteria do i use? The solution i see here is: since the unique id is created as soo
  7. Hello all, I have a problem which i don't know what the best way to solve is: The situation:A user creates an appointment in an online calendar. While he's filling out the form, he has the option to share this appointment with one or multiple other users (the form is still not submitted).After the form is submitted, the appointment will be stored in the database and the selected users, if any, will be sent an invitation to join the appointment. They are free to accept/deny the invitation. My problem:How do i link the invitations to the appointment, while at the same time the appointment still
  8. Thank you for your post MrFish (nice nickname btw ). I managed to solve my problem, which was actually pretty simple:The Frontcontroller class get's instantiated on the index page, and it calls the Dispatch() method (see Frontcontroller.php and index.php). Now in the Dispatch() method, a class for a controller (requested from the URL) get's instantiated with the line:// Instantiate Controller $this->object = new $this->controller; So in order for me to call a method INSIDE a view (which is pure html), i have to use: $this->object -> methodname(); My problem was that i had forgo
  9. Hi,I have a class that has a method which initiates other classes. (problem explanation is below the next snippets of code)Index.php <?phpsession_start();class FrontController{ // properties /* private $view * the view that'll be inserted/called * * * private $frontc_id * ID for METHOD -> which is the selected date from calendarView.php into dayView.php * */ private $controller; private $view; private $frontc_id; private $object; // methods /*Instantiator * */ public static function instantiator() { $instance = new self(); return $instance; } /*Timezone set
  10. Ooh i see, Thank you for your input, i will adapt to the way of inputting hidden fields!
  11. Thnx for your fast reply Ingolme,I had thought of that and tried it, which worked, but is that the only way possible?How do other sites do it? for example, when you fill in a form and press enter. Then the site redirects you to some page and you see a very long dynamically generated url. It's hard to imagine such a site has a whole load of hidden fields in order to generate the custom url, right?In other words: is there no other 'clean and correct' way to do it?
  12. Dear all,For some time now i'm using the <form> element in this matter:<form method="post" action=?controller=example1&method=example2>I'd like to send data via the 'GET method', but it is essential that the querystring is placed AFTER the action, for example, let's say i have: <form method="get" action="?controller=search&method=getinput"> <input type="text" name="input" /> <input type="text" name="input2"> ... some more inputs etc. etc. ... <input type="submit" value="Submit" /></form> Now what i'd like to have is, after pressing the subm
  13. Thank you so much Deirde! It worked and now i can continue with what i was working on! :)I kind of feel embarrassed since it was actually too easy hehe. Thnx again!
  14. Thank you so much Deirde! It worked and now i can continue with what i was working on! :)I kind of feel embarrassed since it was actually too easy hehe. Thnx again!
  15. Dear all,I have a problem i need to solve which needs to handle functions and missing but specified arguments. Let's say i have a function foo, with argument $bar: <?php function Foo($bar){ echo $bar;}?> When i call this function with an argument inside, for example foo('test'), then output is 'test'....no probs. BUT, I need to be able to call this function without giving argument, for example, calling this function like: <?phpfoo()?> Of course, when called like that, i'll show a custom error page, like one saying 'Argument missing' or so (for example, with die('argument missin
  16. So i continued with the same tutorial, and now i have this block of code: public function dispatchAction($action) { $actionMethod = "do" . ucfirst($action); if (!method_exists($this, $actionMethod)) { exit("Page not found"); } $this->$actionMethod(); } What confuses me is the 3rd line, i.e. ''if (!method_exists($this, $actionMethod)) {". Now i'm familiar with using the $this keyword, as in $this->somevariabel_or_method for example:$this -> foo = 'bar' , where foo is some property of the class.But what's up with a $this keyword withoud the -> that usually follows it ? (like in
  17. Wow i feel so stupid right now hehe... when i just read that last sentence in the quoted text, I suddenly realized the method 'createInstance' in my class indeed creates a new instance of the FrontController class. I admit though that i got the code from some tutorial, and just typed everything over and quickly looked it over to see if i understood it. In general, i did, but obviously there were some details (and might still be) which i have overlooked. Thank you for your reply!BTW, the full code for the FrontController class was:class FrontController { public static function createInstance()
  18. Hi all,Since i'm quite a beginner with OOP, i have this line of code which i don't understand. Let's say you have a class: class FrontController { public static function createInstance() { // some code } public function dispatch() { // some more code }} Elsewhere, this class is instantiated with the following line: FrontController::createInstance()->dispatch(); My question is: How should i understand what this last line of code actually does? I know Classname::methodname() instantiates a class Classname and calls a method Methodname, so is Classname::methodname()->anotherme
  19. Thank you for your reply justsomeguy,Fortunately i managed to fix this problem. What i did was the following:I check the my.ini file again and saw a line called skip-networking. After commenting that line out (putting a # in front of it), everything seems to work normally, i do not get the error message and connection via localhost is made . (When i was using WAMP i never looked at the my.ini (or configuration files) so i don't know whether this line was commented out too when using WAMP, XAMP or something similar. Can somebody please check this out for me? Thnx in advance)I also looked up wha
  20. Thank you for your quick reply justsomeguy.I tried with the localhost part as you suggested, but that still gives the same error. Telnetting port 3306 gave me the following (translated):A connection is trying to establish with 3306...Unable to connect to the host, on port 3306: Failed to connectFor this, i typed 'telnet localhost 3306' in a command prompt, i don't know if this is the correct way to use telnet though, since i don't have any experience with telnetting.
  21. Dear All,I'm having trouble getting MySQL Community server 5.5.11 to work in combination with Apache 2.2.17 and PHP 5.3.6I'm runing Windows 7 Professional (32-bit).PHP and Apache both are working, but when i execute a simple php-script in which i try to connect to the database, like this: <?php $con = mysql_connect("localhost","root","mypassword") or die(mysql_error); ?> Then i get the error:Warning: mysql_connect() [function.mysql-connect]: [2002] Unable to connect because the target computer ac (trying to connect via tcp://localhost:3306) in C:\server\apache\htdocs\t.php on line 3War
  22. Okay, thank you both for your replies! My question is now completely answered.
  23. Ooh i get it, thank you very much.So in theory, the number of rows a table may contain is infinite? For example:CREATE TABLE users (firstname CHAR(5))Since this table has no columns consisting of any numeric datatypes, it may practically contain unlimited rows?
  24. Let's say i have a table:CREATE TABLE users (id INT UNSIGNED AUTO_INCREMENT)Due to the UNSIGNED option of the INT-datatype, the range of INT is 0 - 4294967295 (source: mysql manual).Now what i am confused about is, is that range the total number of rows the users-table can hold, or is '4294967295' the highest value the 'integer' column can hold?For example, will my users-table 'run out of space' when the table contains exactly 4294967295 rows? like so:-----id (this table contains 4294967295 rows)-----0123....4294967295-----Or will it 'run out' when there is a HUGE gap between 0 and 4294967295,
  25. Hi, i just tried the pattern and it's working now!I can also see the difference with the other pattern, that was straight forward that i'll check only the first and last characters.I got a question though about the above pattern: When '^' is inside the brackets ("/[^some characterrange here]/"), what does it actually do? I know for example that if it's in front of the brackets (like so: "/^[characterrange]/"), it'll check whether the first character of the string that's undergoing the inspection by preg_match, matches anything contained inside the brackets. But how is it exactly interprete
×
×
  • Create New...