Jump to content

Felex

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Everything posted by Felex

  1. Nusphere Phped is the one for me. Actually, i am very surprised that it isnt included in the survey. It is more fast than eclipse and zend studio, serves more customizing options(customizing auto-complete times makes coding really fast), it has real good project management capabilities. http://www.nusphere.com/products/phped.htm
  2. i mean sub-categories in php. php helping completely very active forum thus some interesting topics can be missed out. categorizing shall help to solve this problem.
  3. Felex

    matching

    $UserKey = 23; $MatchedArray = array(); for($i = $UserKey; $i <= 999; $i++) { if((($i - $UserKey) % 10) == 0) // here comes our trick { $MatchedArray[] = $i; } } var_dump($MatchedArray); // or echo implode(',', $MatchedArray);
  4. you can buffer output before display and than check the buffered output if it contains your html tag or not. at begining of your code ob_start(); // your code comes under ob_start(); at the end : $Output = ob_get_flush(); Now you can check whether $Output has <img src="images/top01.jpg" height="162" width="800"> or not with : echo (stristr($Output, '<img src="images/top01.jpg" height="162" width="800">') === false) ? 'Html error' : $Output;
  5. can you explain a bit more ? because, there is no need to exclude symbols from $bet variable. Anyway, this code only works if $bet is a number... it means, symbols must be away from $bet...
  6. i want to add something... after you correct your query you will get other errors cause, you fetch only "name" field at your query but you use more fields like banner, url, email,... at your $row array variable....
  7. firstly you shall not assign the readed line to $line variable, you shall use $line[], so you can have a array variable with incremented number order as keys, and some more addons... function getmyfile() { $file_handle = fopen("/home/powerabc/public_html/demo/demo.txt", "r"); while (!feof($file_handle)) { $userfile = fgets($file_handle); $line[] = explode(".",$userfile); // $line must be array } fclose($file_handle); // no need to be opened that much time echo $line[0]; $rand=rand(1, count($line)); // so you will have a random number between start and end of your array $valu = ''; // actually if you initialize your variables, you get more error free code for ( $countr=0; $countr < $rand; $countr+=1){ $valu = $valu . $line[$countr]; // this makes more sense to me, cause you can get same lines echo $valu; } return $valu; }
  8. if you use register_globals On, this is like it is used to be
  9. are you sure that port is open and host is running ? Your code is so simple and free of errors as i see. there must be something different.
  10. Actually, i just joined this "addiction" As i saw till now, many of topics in helping category are on about basic levels. (I am not trying to hurt somebody) we need some categories over that level to consider Performance and Security related issues.
  11. Actually, i just decided to join a php forum to help people as much as i can. i hope this will be a good experience for me and everyone that i meet in that forum. here seems like very active, i couldnt even catch the active topics hmm, i think some more introduction about myself shall suit with this category I have been coding php for about 8 year and this is my first experience on a foreign language(for me ) forum. hi to all again
  12. does $errstr gives the same information ?
  13. use == not = = parameter, od assignment even if it is in if statement
  14. hmm try reordering ? <?php include("head.php"); ?> <?php echo"<img src='head.php' />"; ?> <?php include("body.php"); ?> <?php echo"<img src='body.php' />"; ?>
  15. you shall use php_value, use php_flag for directives like register_globals which can be set either On or Off. use these commands without = parameter. php_value upload_max_filesize 4M
  16. what is wrong with this code, cause i dont have an opportunity to test it and couldnt see any wrong at your code. you can get some errors for your insert statement, according to user inputs for $url8, $page8. secure them with mysql_real_escape_string() function.
  17. change <FORM ACTION="register.php"> to <FORM ACTION="register.php" method="get">
  18. there is nothing to set $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] variables after login. post the code which is responsible from login process please.
  19. i think there is more efficient method to use but, now i can say : $Difference = date('m/d/Y', mktime(0, 0, 0, m1, d1, y1) - mktime(0, 0, 0, m2, d2, y2));
  20. nop, you need some JS code to add your script. you need only one hidden input and a javascript function which runs when link is clicked with onClick attribute. JS function needs to get the id of link and assign it to hidden input, so on, automatically submit the form
  21. i saw the usage error for variables $row[1]['id'] strip ['number'] from variable name. change them like $row[1], $row[2],...
×
×
  • 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.