Jump to content

yami007

Members
  • Posts

    219
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Salé, Morocco
  • Age
    25

yami007's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Sorry if this is not the right to place to look for PHP APIs. I want to set up a website allowing users to recharge their sim cards; I looked and didn't find anything good. Can anyone please point me to the right direction? What do I need exactly?
  2. Thanks, alright I solved it! here is my new code: <script> $(document).ready(function() { var country_list; $.ajax({ url: 'layouts/cities-list.php', data: 'debut', dataType: 'json', success: function(json) { $.each(json, function(index, value) { country_list = '<option value="'+index+'"'; if ( index == 144 ) country_list += ' selected="selected"'; country_list += '>'+value+'</option>'; $('#country').append(country_list); }); } }); }); </script>
  3. Yes there is an error, I forgot to do this: .append('<option value="'+ index +'"'); but that doesnt solve it. This is what it ouputs: <option select="" <="" value="1"></option> >Afghanistan <option select="" <="" value="193"></option> >Afrique du Sud <option select="" <="" value="2"></option> >Albanie <option select="" <="" value="3"></option> >Alg?rie <option select="" <="" value="81"></option> >Allemagne So there are still other errors. right?
  4. I'm really not so good with ajax, I just need this IF condition to work. <script> $(document).ready(function() { $.ajax({ url: 'layouts/cities-list.php', data: 'debut', dataType: 'json', success: function(json) { $.each(json, function(index, value) { $('#country').append('<option value="'+ index +); if (index == 144) { $('#country').append(' selected="selected"'); } $('#country').append('>'+ value +'</option>'); }); } }); }); </script> Thanks in advance!
  5. Why didnt you use float:left on the first table?
  6. I got it ! I can now access my server using the external ip address. Thank you!
  7. Thanks for your reply, requinix, I did assign a static ip to my computer.. Please tell me how to let the router forward to my server using the ports ?
  8. few months back when I used a modem to acces internet, I had the access to my local server using the dynamic address assigned to my PC, but when I started using a router, I no longer have access to my local server, i only redirects me to the router's server how can I fix this?
  9. I get it, thank you dont worry about the minutes
  10. You are right I wanted to do something like the latter...but I have minutes too, I want the array to be something like this Array ( [0] => Array ( [hour] => 8 [minute] => 0 ) [1] => Array ( [hour] => 8 [minute] => 45 ) ) anyway to do this ?
  11. I want to store all the hours 0,1,2,3... in my $time array but it returns the last value only and I dont understand why... <?php $time = array(); $hour = 0; for ( $i=0; $i<=7; $i++ ) { $time['hour'] = $hour; $hour++; } ?>
  12. Thanks for your time ! Let's assume a user typed "plan" Regardless of the database's fields, I want to sort them by the word given "plan". if "plan" is the first word of a sentence, it should go first even if another entry start with an a for example: "plan" should go first before "a plan" - plan - planning - a plan - the planning
×
×
  • 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.