Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. AyKay47

    form

    the code that you are showing me now is different then before, now you don't have values for you options.. <td><select name="sex"> <option value="Female">Female</option> <option value="Male">Male</option> </select> need the values and name
  2. this normally means that you forgot a line terminator " ; " somewhere in your code.. check the end of line 3
  3. AyKay47

    form

    only thing that stands out to me is the very top condition.. if ($username) is this condition being met? if its not.. none of your script will run in the condition.. where is $username set before this..?
  4. you're asking for me to write the code for you, which I don't feel like doing.. however i will anyway.. $(function(){ $("#cat").change(function(){ var value = this.value; $.ajax({ url: "url.php", data: "value="+value, success: function(){alert("success!")} }); }); });
  5. use jquery.. http://api.jquery.com/category/ajax/
  6. AyKay47

    form

    yes, you will retrieve the value by using $_POST['sex'];
  7. 1. by setting 2 values to $sql, you are overiding the first sql string.. 2. you are receving this error because you have not wrapped your values in quotes.. the only time in sql that you do not need to wrap a value in quotes is if its an integer..and even then its not a bad idea to.. include("server.php"); $sql = "UPDATE players SET points = points + 5 WHERE is_active = 1 ORDER BY score DESC LIMIT 50"; $sql1 = "INSERT INTO credit_logs(player_id,Description,amount,end_balance) VALUES ('$playerID','top 50 finish',5,5)"; $query = mysql_query($sql) or die(mysql_error()); $query1 = mysql_query($sql1) or die(mysql_error()); if($query && $query1){ //if both queries are successful echo "Prizes Paid"; }
  8. AyKay47

    help

    also, I would change those two lines to this anyway.. if(!empty($comment) && !empty($userid) && !empty(getid)){ if ($userid != $getid){
  9. AyKay47

    help

    the code I posted will not cause a server error.. check you error.log for errors..
  10. AyKay47

    help

    if (!empty($userid) && !empty($getid) && ($userid != $getid)){
  11. AyKay47

    help

    1. instead of if($comment), use if(!empty($comment)) 2.do the same for $userid and $getid 3. this should also fix your query issue..
  12. hard to outline the steps when I do not know how you creating the graph and calendar..
  13. AyKay47

    help

    these are basic errors, however it will be much easier to correct these if we can see your code..
  14. the . and the .. are actually directory references as well, since you did not tell the script to add a newline for each directory.. <?php if ($handle = opendir('.')) { //insert directory while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "$file\n"; } } closedir($handle); } ?>
  15. im curious, havn't used this function yet.. can you post your results.
  16. thanks for the replies guys, I think that this is an interesting topic.. this came to me yesterday when I was coding a website and couldn't quite keep my focus, I realized that the music had me focusing on that instead of my work.. I also have ADD so that doesn't help the matter.. heh.. for me, coding without music but with my headphones on is the preferred way.
  17. seems like you do not have an SMTP server set up on your localhost, in my opinion, i never encourage tampering with sending mail until your webpage is on a live server.. the host will provide the mail server for you.. however there are also third party mail servers out there
  18. no. why can't you use session id's for this..?
  19. there is no reason you would ever need a persons mac address..
  20. $_SERVER['REMOTE_HOST'] might also be an option here
  21. refer to my updated post..
  22. $after = date("H:i:s",strtotime("+8hours")); print "After 8 hours is $after";
×
×
  • 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.