-
Posts
219 -
Joined
-
Last visited
Everything posted by yami007
-
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?
-
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>
-
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?
-
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!
-
Why didnt you use float:left on the first table?
-
Accessing local server using ip address!
yami007 replied to yami007's topic in PHP Installation and Configuration
I got it ! I can now access my server using the external ip address. Thank you! -
Accessing local server using ip address!
yami007 replied to yami007's topic in PHP Installation and Configuration
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 ? -
does it give a blank page ?
-
I get it, thank you dont worry about the minutes
-
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 ?
-
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++; } ?>
-
search, sql order by priority of the searched term ?
yami007 replied to yami007's topic in PHP Coding Help
Thank you kicken, that's what I want -
search, sql order by priority of the searched term ?
yami007 replied to yami007's topic in PHP Coding Help
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 -
i want to sort the available words by the "searched word"...is there any way ? <?php $query = "SELECT * FROM ce_cour_chap WHERE nom LIKE'%$find%' ORDER BY nom"; $result = mysql_query($query); while($search = mysql_fetch_array( $result )) { echo $search['nom']." - ".$search["chid"]."<br/>"; } ?>
-
hey thanks Guys...the error was in <? as Mikosiko said...and the Pikachu2000 mentioned too...for the latter i think i mistook 0 with o...I sort of do that everytime
-
it's as simple as this: <div id="cours"> <div class="title"><h3>Semestre 1</h3></div> <div id="Sem1"> <?php $query = "SELECT * FROM ce_cours ";//ORDER BY nom"; $result = mysql_query($query) or die(mysql_error()); $row = 0; ?> <table border="0" width="95%" height="40%" cellpadding="0" cellspacing="0"> <tr> <? while( $cours = mysql_fetch_array($result) ){ $row++; ?> <td valign="top"> <h4><?php echo $cours['nom']; ?></h4> <?php $query2 = "SELECT * FROM ce_cour_chap WHERE cour_id=".$cours['cid']; $result2 = mysql_query($query2); while( $chapitre = mysql_fetch_array($result2) ){ ?> <a href="<?php echo $chapitre['chid']; ?>"><?php echo $chapitre['nom']; ?></a><br /> <? } ?> </td> <?php if ( $row%2==o ) { echo '</tr><tr>'; } } ?> </tr> </table> </div> </div> I just cant tell what's wrong here !
-
it's in a WHILE while( $data = mysql_fetch_array($result) ) i called it => $data['id']...and it won't work, it just keeps bringing that error. Will this $var = false work ?
-
I just moved my code from Appserv to EasyPHP and it gave me this error, it was working fine on Appserv...what's with easyPHP ??
-
Can you put an if and an else inside of an if?
yami007 replied to richiejones24's topic in PHP Coding Help
what's wrong about that? I always did this <?php if ( ...) { if () { } else { } } ?> and so on... -
how do i remove a certain word/phrase from a file ?
yami007 replied to yami007's topic in PHP Coding Help
how do i do that in a text file like "emails.txt" ? is there a way to do that? thank you ! -
for example, i want to search for an the string "[email protected]" and erase it. thanks in advance !
-
where can i start learning worpress customization ?? need your help
-
Thanks For All Freaks....