Jump to content

priti

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by priti

  1. - 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.
  2. 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.
  3. Thanks for /D .Can you please also help me understanding the regular expression preg_match('/^(?:[a-z0-9_-]|\.(?!\.))+$/iD
  4. 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
  5. 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.
  6. Can you please let us know what is the expected output
  7. You have to do this in javascript. JQuery is another good option to think off.
  8. Yes you can use hidden form field. setting session variable example 'current_form' can also be useful.
  9. Exactly what you want ?. Put logic inside the for loop for having three columns.
  10. 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
  11. 1. Debug whether your query generate some output or not 2. print_r($row1) . what is the output for $row1?.
  12. From V001 you want '1' you can use following function substr('V001',-1)
  13. 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.
  14. Try $list.$server['o']['id'];
  15. 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.,
  16. I agree with gristoi... please share the error message....or code ONLY then people would be helpful to you.
  17. 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 .
  18. Or you can use in_array() function which will return true/false. if(in_array('blue',array)) { echo 'hi'; }
  19. 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.
  20. 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')
  21. I think you have to define the number to alpha and alpha to number array and perform the comparison.
  22. 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.
  23. 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'
×
×
  • 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.