
priti
Members-
Posts
461 -
Joined
-
Last visited
Everything posted by priti
-
- Change your database and other credentials first and do not share with anyone. Please note you may need to change in on website configuration as well. - In case, you are have API, use API credentials Also, I think you can ask iphone app support and enquire about the owner of the app as everyone has to register on site before making it availabel on app store.
-
There are some error I noticed $total = Donation::totalDonated; $count = Donation::numberOfDonors; Must be $total = Donation::$totalDonated; //static variables $count = Donation::$numberOfDonors; //static variables Second In Destructor Donation::$totalDonated = Donation::$totalDonated - $donation; //$donation is not a class property ! Donation::$numberOfDonars--; //variable name is wrong it must be "numberOfDonors" NOT numberOfDonars...check for "a" You fix these thing I think your code will work for sure.
-
Thanks for /D .Can you please also help me understanding the regular expression preg_match('/^(?:[a-z0-9_-]|\.(?!\.))+$/iD
-
Please share your code, before posting logincheck.php is known to you not us !. As pe my knowledge, Error is quite self-explanatory... The function expect you to provide resource not some true or false .Check the parameter you are passign to this funtion. Please read this
-
Hi All, I have a piece of code from php.net if (!ctype_alnum($username) || !preg_match('/^(?:[a-z0-9_-]|\.(?!\.))+$/iD', $userfile)) { die("Bad username/filename"); } I do not understand "/D" ! I know of /g, /i OR /m for multi line.. can someone please help me understanding this expression.
-
Can you please let us know what is the expected output
-
Display number of html elements on demand
priti replied to houssam_ballout's topic in PHP Coding Help
You have to do this in javascript. JQuery is another good option to think off. -
Yes you can use hidden form field. setting session variable example 'current_form' can also be useful.
-
Exactly what you want ?. Put logic inside the for loop for having three columns.
-
You have ONLY one row in your response Hence iterate only once. modify foreach($row1 as $k=>$v) { echo '<tr>'; if(isset($k)) echo '<td>'.$v.'</td>'; echo '</tr>'; } Hope it helps
-
1. Debug whether your query generate some output or not 2. print_r($row1) . what is the output for $row1?.
-
From V001 you want '1' you can use following function substr('V001',-1)
-
Considering, you have your result set in $results. echo '<table>'; foreach($results as $k=>$v) { echo '<tr>'; foreach($v as $field) { if(trim($field['colname']) != '') echo '<td>'.$field['colname'].'</td>'; } echo '</tr>'; } echo '</table>'; Hope it helps.
-
Try $list.$server['o']['id'];
-
The quick view list two problems 1.$tester = $value / 25; to $tester = $value / 26; This will resolve your problem after value 40 secondly, you are calling recursively function letters() and in your function letters() there is not exit condition hence when the value reaches to 52.... it recursively call letter() function and results in different character string. You need to control the execution of letter() function on some condition. Thanks.,
-
I agree with gristoi... please share the error message....or code ONLY then people would be helpful to you.
-
well I have seen system implementing the same concept in PHP by writing the generalized class . If it is ONLY for one directory then you can think of making the folder password protected by using Apache .The suggested solution is little graceful in comparison [As per my thoughts]. Or else let wait for some other people to jump with more thoughts .
-
Or you can use in_array() function which will return true/false. if(in_array('blue',array)) { echo 'hi'; }
-
You can define ACL mechanism where in you specify which url are private. Private pages do not need to be viewed by site users hence when ever site user come across such page you can always re-direct to index page or some error page.
-
What the error you are facing?
-
Reading contents of a PHP array into well presented HTML output
priti replied to Beedy555's topic in PHP Coding Help
echo '<pre>'; print_r( $resp ); Hope this help -
1. You want all un-read mails? select * from mail where status=1 2. unread email of some user select m.* From mail m,message ms where ms.mail_id=m.id and ms.user=userid and m.status=1 [user id is in which table.... I don't find it in message ?] 3. today's unread email select * from mails where status=1 and time_update=DATE_FORMAT(now(), '%Y-%m-%d %T')
-
convert letter to number to another letter.
priti replied to HDFilmMaker2112's topic in PHP Coding Help
I think you have to define the number to alpha and alpha to number array and perform the comparison. -
function print_arr($common1) { $callback = function($value,$key) { echo $value.'<br/>'; }; array_walk_recursive($common1,$callback); } $d=print_arr($data); echo $d; Hope you find it useful.
-
Also for the previous problem $common1=array_combine($sports,$location); function print_arr($common1) { $final_str=''; $callback =function($value,$key) use (&$final_str) { $final_str .= $key.' in '.$value.','; }; array_walk($common1,$callback); return $final_str; } $final_output=print_arr($common1); echo $final_output; you may need to tweak a little to append 'and'