
Felex
Members-
Posts
25 -
Joined
-
Last visited
Never
Everything posted by Felex
-
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
-
thanks for reply
-
$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);
-
How to have a php code check to see if html value has been modifed?
Felex replied to ghurty's topic in PHP Coding Help
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; -
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...
-
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....
-
URGENT! Random no of lines from a text File... :-(
Felex replied to natasha_thomas's topic in PHP Coding Help
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; } -
Unexpected $_SESSION behavior - index as variable on glocal scope???
Felex replied to andrew2704's topic in PHP Coding Help
if you use register_globals On, this is like it is used to be -
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.
-
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
-
does $errstr gives the same information ?
-
use == not = = parameter, od assignment even if it is in if statement
-
hmm try reordering ? <?php include("head.php"); ?> <?php echo"<img src='head.php' />"; ?> <?php include("body.php"); ?> <?php echo"<img src='body.php' />"; ?>
-
changing upload_max_filesize for an individual script
Felex replied to pernest's topic in PHP Coding Help
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 -
This isnt new fields in the database any suggestions
Felex replied to JamesThePanda's topic in PHP Coding Help
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. -
change <FORM ACTION="register.php"> to <FORM ACTION="register.php" method="get">
-
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.
-
set your form method to get
-
TOTAL PHP NEWBIE - Parse error: syntax error, unexpected T_STRING
Felex replied to ebryant77's topic in PHP Coding Help
your welcome mate, i am glad to help you -
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));
-
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
-
i saw the usage error for variables $row[1]['id'] strip ['number'] from variable name. change them like $row[1], $row[2],...
-
TOTAL PHP NEWBIE - Parse error: syntax error, unexpected T_STRING
Felex replied to ebryant77's topic in PHP Coding Help
dont forget ; at the end of the line