Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Yes. You either use val() or html(), I think for a textarea it's the html() one.
  2. It definitely is productive to point out that you need to understand what your own code is doing. If you don't, you end up writing code that doesn't work and not knowing how to fix it. There's nothing to ADD to the manual related to this issue because it's already there. You simply don't understand how to use a foreach or other type of loop.
  3. You just use it... What happens? What do you expect? Etc...
  4. 1. Use code tags. 2. Your subject is "getting an error" and you didn't provide any error. 3. Ask your "friend" who did it in the first place.
  5. jQuery is a library written in Javascript. Regular javascript will still run on your website even if your other code is jQuery. And no, no one is going to convert it for you (if they have any sense).
  6. I don't see how that's possible? I'm going to try this on my localhost because I don't follow you.
  7. I suggest you read about templating systems IE Smarty, and try to incorporate one. The way you're doing it, by having a function echo HTML, goes against the idea of separating business/logic from presentation.
  8. Probably because $P_POST is not the same as $_POST.
  9. That's what I expected, the while loop is: while($row = mysql_fetch_array($result)) ?> That's all. But since nothing is in $row at that point there's probably another problem. OP needs to check for mysql_error
  10. My brain "fixed" it to "PHP finally gets support" until I read it. :-P I am confused about the part they said is confusing. Why wouldn't code that's completely outside of the try/finally block not run?
  11. You still need to change your password, it's too late.
  12. Your function should return values if you need them outside of the function.
  13. How would your code know what rules to apply where?
  14. Which in this case won't the output be simply one list with data? Why would his screen be blank?
  15. Jessica

    HELPPP

    How does someone who is not good with English know the slang "dunno"?
  16. It's worrisome that you don't know what your code is doing. $query_Recordset3 = " INSERT INTO temporder ( qnt, prod_id, ptype, mfg) VALUES "; foreach($_POST['qnt'] AS $prod_id => $qnt){ $ptype = $_POST['ptype'][$prod_id]; $mfg = $_POST['mfg'][$prod_id]; $query_Recordset3 .= "('".$qnt."','".$prod_id."','".$ptype."','".$mfg."'),"; } etc...
  17. I don't think you understand how a foreach works... What do you think your code is doing?
  18. So the values you are trying to insert are arrays. $qi .= "('".$qnt.'", "'.$prod_id.'", "'.$ptype."')$i,"; This line puts the array in the string. You should use the value in the array at the current key. I would use a foreach instead of a for loop.
  19. I misread your initial post, I guess "qnt" is your quantity column. After your query, you need to check for errors. change the line to this $result=mysql_query($qi, $szabo) or die(mysql_error().' SQL: '.$qi); and see what it outputs.
  20. null is unknown. an empty, oops, placeholder. ok, I'll know it when I see it! using null as a comparison, is pretty stoopid. 1 null has no relation to any other null. null was created from relational dbs, to cover when no data exists, outside join like. SELECT * FROM user, type, WHERE user.id=type.id. What if you want all users, regardless of type? ... Then you'd use a left join, rather than an inner join (which BTW I think you did....) I don't think you understand the point of doing if($var === NULL){.... It's to check if the variable is null so you know what to PUT in the placeholder. (There are other reasons but this is an obvious one.)
  21. You should have a quantity column rather than insert the same data a number of times.
×
×
  • 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.