Jump to content

lalnfl

Members
  • Posts

    136
  • Joined

  • Last visited

    Never

Everything posted by lalnfl

  1. I seemed to have fixed my problem by placing the javascript code that I want to run with the ajax callback in that.
  2. Javascript Code: $(document).ready(function(){ // selecting worker if (!document.getElementById("worker_id").value){ document.getElementById("worker_content").innerHTML="<div class='inner_right'>Select a worker to view.</div>"; } $("#worker_id").change(function(){ if (!document.getElementById("worker_id").value){ document.getElementById("worker_content").innerHTML="<div class='inner_right'>Select a worker to view.</div>"; } else { var worker_id = $("#worker_id").val(); $.post("get_worker.php", {worker_id : worker_id}, function(data){ $("#worker_content").html(data); }); } }); // mark down / mark up $("#mark_up").click(function(){ var wage = $("#wage").val(); $("#wage_display").html(wage); }); }); Ajax Callback HTML part: <input type='hidden' name='contract_wage' id='wage' value='$wage' /> <span id='wage_display'>$$wage</span> <input class='form' type='button' name='mark_up' id='mark_up' value='Mark Up' /> What is causing it to not function?
  3. What do you mean? Everyone was set at INT, except for one of them, that I accidentally skipped. Exactly right. requinix pointed out that the data types were a concern. We have know way of knowing what the data types were, but we assumed that you checked all of them, not one of three. In the future don't cut corners. That is the lesson that hopefully you will learn. Consistency is an important aspect of successful development practices. It doesn't matter to requinix or myself. Neither of us would have made the mistake you made. Well excuse me, didn't know you had to be perfect. lol
  4. Each one have different fields.
  5. What do you mean? Everyone was set at INT, except for one of them, that I accidentally skipped.
  6. Son of a bitch. 2 hours and that is the problem. Thanks for your help gizmola.
  7. After posting a re-looking at the code and then redoing it in the phpmyadmin sql query thing, it doesn't display correctly. And the reason is if I declare more than 2 UNION statements, it messes up the results. Do you know why it does that?
  8. Could it be because I am using parenthesis around each SELECT part (SELECT id, card_id, ordered FROM Match_1 WHERE card_id='$card_id') UNION (...
  9. How does that work then?
  10. So I would have to make the php string a number then?
  11. So say I have a union sql statement like this: (SELECT id, card_id, ordered FROM Match_1 WHERE card_id='$card_id') UNION (SELECT id, card_id, ordered FROM Match_2 WHERE card_id='$card_id') UNION (SELECT id, card_id, ordered FROM Match_3 WHERE card_id='$card_id') ORDER BY ordered ASC ordered is an INT, but yet when I order the results its like this 1 11 2 11 should obviously be last but it isn't, what am I doing wrong?
  12. You would have to set up like a file directory called Members. When a user would sign up to your site you would create a new folder for that member in the Members directory. Then it would come into work for the application you have here. You would simply pull up the image from the Members/username/profile_pic.jpg for example. Something like that.
  13. $sql_get_worker = mysql_query("SELECT id FROM Worker WHERE mem_id='$id' AND retired='n'"); $get_worker = mysql_fetch_assoc($sql_get_worker); foreach ($get_worker as $value){ $sql_get_worker = mysql_query("SELECT * FROM Worker WHERE id='$value'"); $get_worker = mysql_fetch_array($sql_get_worker); $worker_firstname = $get_worker['firstname']; $worker_lastname = $get_worker['lastname']; $worker_options .= "<option value='$value'>$worker_firstname $worker_lastname</option>"; } How about this then? There are two rows that return with this id, but yet only one is returning.
  14. $array = array("1","2","3"); foreach ($array as $value){ echo $value; } Put its only echoing out 3, not the whole array.
  15. Alrighty guys thanks! Wasn't too sure about this. Thanks for the help.
  16. The id is INT, but should the posts be INT aswell? Right now it is VARCHAR.
  17. I have tried it with more numbers, and it seems to be doing something like this: 84 803 77 707 51 505 It doesn't take into account the third number on some of these.
  18. Lets say I have this query: $sql = mysql_query("SELECT * FROM Member ORDER BY posts DESC LIMIT 10"); while ($get = mysql_fetch_array($sql)){ $row .= $get['id']; $posts .= $get['posts']; echo "$row - $posts<br />"; } Lets say I have two of rows, with posts fields of 84 and 803. When it displays it, it grabs the 84 row first, when I want the bigger number 803 first. Is there a way to fix this?
  19. Using ajax/jquery: this is the form: <form action="" method="post"> <input type="hidden" id="mem_id" value="<?php echo $id ?>" /> <textarea class="text4" name="chat_message" id="chat_message" style="width: 450px; height: 100px;"></textarea> </div> <div style="width: 120px; height: 100px; float: left;"> <input type="submit" class="submit" value="Submit" /> </form> this is the javascript: $(document).ready(function(){ var chat_message = $("textarea#chat_message").val(); var mem_id = $("input#mem_id").val(); var data = "chat_message=" + chat_message + "&mem_id" + mem_id; $(".submit").click(function(){ $.ajax({url: "chats.php", data: data, type : "POST", dataType: "script"}); }); }); Its not sending it to chats.php, so what am I doing wrong here?
  20. How would I keep a set time, without it changing in php? I have a ajax and a javascript interval running for 3 seconds. But everytime it intervals, the time changes in my php script. So how would I keep the time that the person came onto this page?
  21. Seems as though I have fixed my own problem, as I am getting verifired from Paypal now. Awesome. Thanks guys.
  22. Okay I got it to work. Is my cURL stuff right, when I send it back to paypal?
×
×
  • 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.