ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
that's a retorical question on this forum, you know that? why do you think he posted?
-
select distinct points from teams where points between $teampoints - 1 and $teampoints + 1
-
we are very happy that you are letting us know that you have achieved such great things..
-
New to OOP - MySQL/Users ran into a wall any advice?
ignace replied to mrhobbz's topic in PHP Coding Help
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 -
wouldn't it not just be simpler to create a function that writes out a <img /> element and validates that the image exists?
-
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
-
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
-
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; }
-
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
-
post your code and we may be able to assist you further
-
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
-
did you search this forum for an answer, because we get these kinda errors alot around here
-
the query is wrong you should be using a self join to retrieve child rows
-
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
-
Selecting an area of data before/after a match from a Database
ignace replied to Mutley's topic in PHP Coding Help
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 -
php is not supported on your server
-
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
-
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
-
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 } } } }
-
if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'GET') { // HTTP POST }
-
please post the full code as the sample doesn't contain what we need to assist you
-
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);
-
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
-
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
-
Form not getting set with PHP all fields return empty
ignace replied to progwihz@yahoo.com's topic in PHP Coding Help
if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'GET') { print_r($_POST); }