Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. okay, well if what you want to be deleted is being deleted, then we know that your ajax call is valid and the "id" variable that is passed through the function is correct. what I normally like to do when returning values from an ajax call is if everything goes smooth with the backend code I return a 1, or true, else i return 0 or false. then i handle the responses as you have done..will look something like this. jQuery.ajax({ type: "POST", url: "include/ajax/delete_account.php", data: 'id=' + id, cache: false, success: function(response){ if(response == 1){ //Account was deleted $("#"+id).html("Account Deleted"); } else { alert("Response is: error") // whatever error is present } } }); also, I noticed that you are encasing columns and rows (<td> and <tr>) in a span, and you do not have <table> tags at all, change your span to a table echo "<table id='". $x[id] ."'>"; echo "<tr>"; echo "<td>" . $x['username'] . "</td>"; echo "<td>" . $x['FullName'] . "</td>"; echo "<td>" . $x['Email'] . "</td>"; echo "<td align='center'> <button onclick=\"approve(". $x[id] .")\" id=\"btnApprove\"></button> <button onclick=\"deny(". $x[id] .")\" id=\"btnDeny\"></button> </td>"; echo "</tr>"; echo "</table>"; you will want to make sure that the id that ajax is looking to inject with your response corresponds to the id of your table.
  2. I'm going to stick to mjdamato's signature for this one. http://apptools.com/rants/mailto.php
  3. ehre? perhaps you should learn some english as well. just kidding, welcome to phpf.. im sure you'll learn alot form this group.
  4. most likely your $id variable is blank, so your query will return a resource but no rows are grabbed, thus no values.. wrap your index in quotes. $id = $_GET['id'];
  5. yeah, we will need to see your logic for this one.. any relevant code will be helpful.
  6. the best practice is to always use full php tags in your code. Some, or maybe most servers do not have this setting enabled. what if you were to migrate your code to a server that had short tags disabled and access to the php.ini was prohibited?
  7. gamebattles, for console online gaming.
  8. lol, classic.
  9. edit to my post: <?php $idioma = $_SESSION['session_idioma']; if ($idioma == "eng") { ?> <a href="preordering.php"><img src="img/top_banner_<?php echo $idioma; ?>.jpg" width="744" height="182"></a> <?php }else { ?> <a href="ordering.php"><img src="img/top_banner_<?php echo $idioma; ?>.jpg" width="744" height="182"></a> <?php } ?>
  10. <?php $idioma = $_SESSION['session_idioma']; if ($idioma == "eng") { ?> <a href="preordering.php"><img src="img/top_banner_<?php echo $idioma; ?>.jpg" width="744" height="182"></a> <?php }else { ?> echo '<a href="ordering.php"><img src="img/top_banner_<?php echo $idioma; ?>.jpg" width="744" height="182"></a> <?php } ?>
  11. like a gb for sc2?
  12. ah, overlooked that. OP, update queries effect only one row, unless looped. So you really shouldn't be worried about memory usage here. The memory is automatically freed at the end of execution.
  13. set a list of valid endings for your url to the ending of the regex. $pattern = "/(jpg|gif|png)$/i"; the main thing you will need to do is check the ending of the url for the valid image extensions.
  14. the error is telling you that something is invalid in your query itself.. debug it using die() and mysql_error() $result = mysql_query($query) or die(mysql_error());
  15. This Not worked ! your code worked for static li_number ( only 13 ) ! $ROW=['li_number'] Any value can be . example : 2 - 2.5 - 8.5 - 10 - 7 the code provided loooks to be a basic example to get you started in the right direction, if you are expectin float values as well, you can use ceil to round the values up and then compare them. However I did spot an error, if you want to call the columns by name, use mysql_fetch_assoc in stead of mysql_fetch_array. $sql = mysql_query("SELECT * FROM table"); while($ROW = mysql_fetch_assoc($sql)){ $ROW['li_number'] = ceil($ROW['li_number']); if($ROW['li_number'] == 12) $class = 'class="active"'; elseif($ROW['li_number'] >= 13) $class = 'class="no"'; else $class = ''; echo '<li id="b'.$ROW['li_number'].'" '.$class.'></li>'; } again, this is just an example to point you in the right direction.
  16. I am going to try out the multiplayer once I am comfortable enough with the game, but I'm sure you are right and I will get dominated.. heh Old republic is definitely on my list of games to get, looks intense. Since I am new to battle.net, im not sure if I can add you on there?
  17. Thorpe be nice, Op, you should be echoing the name code of your character, yours in particular is ♦
  18. Set an incrementing variable in your foreach loop and test it's value with a conditional statement. Place the values 1-5 in one table, when the variable hits 6, create a new table to store the remaining values
  19. htmlspecialchars_decode will require its second parameter to be set to ENT_QUOTES in order to parse the apostrophe html character. The default value for the second parameter is ENT_COMPAT, which will leave single quotes unconverted. where is this predefined string coming from? While &#39; is an except-able character, &#039; should more than likely be used.
  20. where is the data coming from? Please give us a little more details about the issue, and post relevant code.
  21. yes that error mean that something is wrong with your query, debug your query using die and mysql_error $result = mysql_query($sql) or die(mysql_error());
  22. online play is certainly frustrating with any rts game really, that I have played at least. I'm working my way through campaign for starters.
  23. lol, yeah, havn't played it in years, since the n64 version. don't hate
  24. you are using mysql_fetch_array which will return an array corresponding to the fetched row(s), however you are calling your column by name, instead of array key. you will either need to change mysql_fetch_array to mysql_fetch_assoc or change your column output to an array key.. eg. printf ('<span>– <a href="event_edit.php?pkEventID=%s">%s</a></span><br />', $myrow['pkEventID'], $myrow[0]);[code=php:0] or you can even keep mysql_fetch_array and set the second parameter to MYSQL_BOTH
  25. just bought this game, getting back into the PC RTS games, anyone else play on here?
×
×
  • 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.