Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. that's a retorical question on this forum, you know that? why do you think he posted?
  2. select distinct points from teams where points between $teampoints - 1 and $teampoints + 1
  3. we are very happy that you are letting us know that you have achieved such great things..
  4. have a look at design patterns and at Access Control Lists (ACL), advanced authentication with protection against session hijacking etc.. use a Database Abstraction Layer (DBAL) so your system will run under multiple relational databases i really recommend using the ACL and the advanced authentication one of my favorites is the implementation of the abstract factory pattern with the possibility in shifting between authentication methods
  5. wouldn't it not just be simpler to create a function that writes out a <img /> element and validates that the image exists?
  6. haha funny i guess this is because the basic behavior in converting from float to integer is the removal of decimals (i.e. floor()) ceil() probably check if the variable contains decimals and converts to integer and adds 1
  7. separate your business logic (fetching data, processing..) from your presentation logic (html, css, ..) it is good practice and will avoid problems like you are currently experiencing or simple solution use thead, tbody, tfoot <table> <tbody> <tr> <td>blabla</td> </tr> </tbody> <thead> <tr> <td>on top</td> </tr> </thead> </table> however i highly discourage such usage, separating logic is considered a much better practice
  8. you don't need mod_rewrite for this $parts = explode($_SERVER['HTTP_HOST']); $domain = array_pop($parts); switch ($domain) { case 'com': .. break; case 'uk': .. break; default: .. default behavior break; }
  9. nope just open if it doesn't exist it will be created use the method addFile() to add your files and their path relativly from the base path
  10. post your code and we may be able to assist you further
  11. double posting is not allowed you know, bumping however isn't i think may be another forum http://www.phpfreaks.com/forums/index.php/topic,211757.new.html#new
  12. did you search this forum for an answer, because we get these kinda errors alot around here
  13. the query is wrong you should be using a self join to retrieve child rows
  14. terrific job on googling! http://www.google.be/search?q=php+godaddy&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a first result
  15. well i would suggest using the $id of the user and do something like $min = $id - 5; $max = $id + 5; select * from users where id between $min and $max however this would suggest you aren't able to delete rows from the users table, i was also thinking about a mysql function range() but i'm looking into that right now i'm going through the reference manual right now: http://dev.mysql.com/doc/refman/5.0/en/func-op-summary-ref.html
  16. use a function that creates your table and returns it, store this in a variable so you get some more flexibility (like being possible to use the $int variable) if you wan't it on a specific place i suggest using a placeholder using str_replace() you can then replace the placeholder with the value of your $int variable
  17. you need a mail server so they can mail to user@your-doman.com, so when the user logs in you check for the mails for the user, you need a mail server, because you need to be able to create a unlimited amount of e-mail accounts
  18. this is a bad question, we don't write scripts for others nor do we share therefor i shall give you the first pieces and you shall have to figure out how it will work further on $xml = xml_parser_create(); $dir = "path/fo/xml/directory"; $dh = opendir($dir); if ($dh) { while ($file = readdir($dh)) { if ($file != "." && $file != "..") { $path = $dir . DIRECTORY_SEPARATOR . $file; $data = file_get_contents($path); if (0 !== xml_parse($xml, $data)) { // i gave you the first pieces, the rest of the puzzle shall you have to figure out by yourself } } } }
  19. if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'GET') { // HTTP POST }
  20. please post the full code as the sample doesn't contain what we need to assist you
  21. shouldn't you first check if post data has been submitted before just rolling it out <?php require "config.php"; if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'GET') { foreach($_POST['result'] as $n=>$result){ $xReturnValue = $_POST['xReturnValue'][$n]; $yReturnValue = $_POST['yReturnValue'][$n]; //do what you want with the data $q = mysql_query("update object set xpos='$xReturnValue', ypos='$yReturnValue' where object_name = '$result'"); } } ?> also try to debug using: print_r($_POST);
  22. javascript definitly! You type something into a text field, and when you click a tab, the form is submitted, on which some server side script reacts and changes the i-frame content use ajax to make it smoother
  23. well "O\\\'Brien" is safer, cause there will always be a slash to prohibit for example sql injection. It probably has its use, it is however to me unknown
  24. if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'GET') { print_r($_POST); }
×
×
  • 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.