Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. Maybe this isn't the answer your looking for but here goes. What about using two sliders or one slider with two handle bars. You can slide the start and the end time of the video. With that you add a save button which just saves that to the database. I think if you update the database immediately when you slide you'll just strain the database unnecessarily.
  2. have you checked the writing permission of the folder you're trying to upload the file to?
  3. Hi, I've been on this forum for quite a while now and never really bothered messaging in this topic, so I thought to myself why the hell not. So here are my details. I'm Richard and I live in Rotterdam in the Netherlands. At the time of this post I'm 28 years old. A couple of years ago I started with HTML and some ASP classic which I learned at school. ASP classic isn't that popular as it used to be here in the Netherlands it's mostly done in .NET these days. After ASP I started to get more into OOP, PHP and Java and Javascript. Ever since I've been addicted to pretty much everything that evolves programming. When I am not programming, browsing the web or drinking beer with friends I like playing guitar and piano. On my guitar I usually play metal or rock and on my piano I play either classic or movie soundtracks. My fav bands are: Tool, Pantera, a Perfect Circle (yes I know Maynard is better in Tool) and Apocalypica. Catch you all on the forum guys, Richard
  4. It might look more complicated but you are making tasks a lot simpler for future buildings. If you use a better relational database design things as selecting all authors and all poems from authors etc will be a lot easier. Just give it a try. earlier you mentioned you wanted poems in a category if you want then you can use Daniel's query with just one minor change SELECT p.*, u.*, c.* FROM poems p INNER JOIN users u USING (user_id) INNER JOIN categories c USING (category_id) WHERE category_id = ?; You also might want to try and do your queries in mysql query browser or phpmyadmin first to see if the selection is correct. After that it's easier to implement in your php code
  5. I do agree with the fact the using only English is a better practice and looks tidier. Many times I've frowned by looking at some other Dutch programmers code thinking to myself ugh Dutch functions and variables, thats ugly. How ever if someone written a complete application using only a western language(which exclude Arabic, Chinese etc) Sometimes it can be handy to write that in the native language, for example to explain students how something works. I do wish English was the agreed upon language for coding. And there are many reasons more to use English for coding over any other language. It's also true that someone that doesn't know English will not come very far coding in any language. Just when coding at least be consistent and preferably all English. now back to the topic. this is how a better database design would look like. I also think you'd be better of using more tables Poems poem_id (int) user_id (int) foreign key category_id (int) foreign key book_id (int) foreign key poem_name (varchar) poem_text (text) poem_added (date) categories category_id (int) category_name (varchar) authors author_id (int) author_name (varchar) books book_id (int) author_id (int) foreign key book_name (varchar) users user_id (int) user_name (varchar)
  6. I partly agree on that. I also write everything in English but it is a matter of cosistency. If you write one thing in Dutch the other functions tables ect should also be Dutch. It's too confusing using multiple language so stick with one instead. @DEVILofDARKNESS could you show what the tables look like and what datatypes are in there? I think you're using too many queries and you could prob just use one
  7. Ah now I see what the problem is. You're getting the hang of queries. And you're trying to retrieve all the poems inside a category right? The following bit of code needs to be rewritten. $str = "test="; $test = "{$str}" . "{$test}"; $query = sprintf("SELECT PText from gedichten WHERE (category = 'test') AND (URL = '{$test}')", mysql_real_escape_string($_GET['test'])); $result = mysql_query($query); list($PText) = mysql_fetch_row($result); $query = sprintf("SELECT PName from gedichten WHERE (category = 'test') AND (URL = '{$test}')", mysql_real_escape_string($_GET['test'])); $result = mysql_query($query); list($PName) = mysql_fetch_row($result); change it to something like this $query="select * from gedichten where category={$test}"; $result = mysql_query($query); then put something like this inside your html while($row = mysql_fetch_array($result)){ //output html } and what is the URL for? I don't get that part
  8. Ok noticed something you have this in your title tag <title><?php echo $PName ?></title> and you do the query later on the assign a value to $PName thats not how php works. You should give $PName a value before you echo it out I'll give you a little tip that works most of the time. Do your query before your html starts so before your doctype and <html> etc. That way you will have the values before you output it. And I see you tidied up your php syntax. It's getting better since your last poem script. Keep it up and eventually you'll get there
  9. thats correct. But what are the errors? and don't change what dreamwest said. If your id's are only suppose to be integers its more secure that way
  10. It can be quite intimidating at first when you start using an MVC design patern. But once you get used to working with one of the frameworks eventually you'll get it.
  11. The easiest way is probably a template engine like you already mentioned. Then you could also have php output xml and use xslt to style the data. And if you want to really seperate everything all the way go MVC using a framework like ZendFramework,symphony or cakePHP
  12. It could be a javascript link if the href attribute is empty then nothing is shown. However it's unadvisable for normal links. If the browser doesn't support javascript the website is useless.
  13. There is a lot of learning for you I see. All of this is not something you can learn within a day. But I'll give hints to start with. You'll need an understanding of databases. What you can do to learn how to work with a database, is install mysql and the clients mysql administrator and mysql query browser. You can also just use ms acces for starting. Other then that try to look up as many articles about databases as you can. You could just install some opensource CMS(content management system) but if you don't know PHP, SQL, CSS HTML etc modification to that system will be a big pain in the butt. For Designs You will need to know about HTML and CSS. Also some painting program such as photoshop, gimp or corel draw might come in handy. The sum things up you will need to learn about are the following PHP SQL(mysql is most common) HTML CSS and there are other things to learn but this would be a start
  14. yup me. I thought to myself Is this for real whats going on. So pressed escape before the redirect and the checked the html source and found this in phpfreaks html <body> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://xsaimex.net">
  15. Using a global db would be better since you wouldnt have to instantie the db object multiple times. you could do this in your constructor public function __construct(){ global $db; $this->db=$db; }
  16. Look in your User class in the function load you have this $user = mysql_fetch_array($db->getResult()); change $db to $this->db also use __construct() instead of User() it fits tidier into php5 syntax
  17. can you show the class code?
  18. Hmm haven't used flash in a long while. But when I did I used amfphp to make remote calls a lot easier maybe you'd like to look into it. http://www.amfphp.org/
  19. It should work indeed can't find an error. Unless you do something like this to call the function User::getUserData(0); instead of $user=new User(); $user->getUserData(0); what does the code look like to instantiate the user?
  20. what should the output be and in what format? have you looked into fopen?
  21. Hi, Just a couple of questions because your question is way to broad. what did you look for online? what exactly is your job description? are you suppose to design it? develop it? Just do usability engineering? Before you can find the right information you should ask yourself the correct questions.
  22. glad it works enjoy
  23. Try looking up the term "javascript modal" usually the nicer onces are the ones that use a js framework like jQuery, Mootools, Prototype and YUI
  24. try the following <?php //xml file in string change this to your db fetch $xmlString=<<<xml <security> <perm1> <user>1</user> <user>2</user> <user>3</user> </perm1> <perm2> <user>4</user> <user>5</user> </perm2> <perm3> </perm3> </security> xml; //create DOM $dom = new DOMDocument(); $dom->loadXML($xmlString); function user_change_permission($userId,$permLvl){ global $xmlString; global $dom; //first remove the user from the old permission $x = new DomXPath($dom); $userList=$x->query("//security/*/user[text()='{$userId}']"); foreach ($userList as $domElement){ $domNode = $dom->importNode($domElement, true); $parent = $domNode->parentNode; $parent->removeChild($domNode); } //now place it in the new permission $x = new DomXPath($dom); $permissionList=$x->query("//security/perm{$permLvl}"); foreach ($permissionList as $domElement){ $permissionNode = $dom->importNode($domElement, true); foreach ($userList as $domElement){ $domNode = $dom->importNode($domElement, true); $permissionNode->appendChild($domNode); } } } user_change_permission(1,2); $newXML = $dom->saveXML(); echo $newXML;
×
×
  • 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.