Jump to content

jardrake

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by jardrake

  1. If your talking about the user clicking a button, then showing a dropdown. Look into jQuery's click and toggle functions.

     

    If your talking about automatically clicking a button, which I am assuming will execute a javascript function. Just go ahead an call that function without clicking the button.

  2. You cannot submit form inputs outside the form. What if you had multiple forms? How would you decide what inputs to submit then, hence the logic of what stays in the form is sent with the form. :)

  3. Giving a textarea a name and capturing that name in the same way you did with a textfield is the only way to do it in html, without JavaScript. Maybe you're asking why you can't get the value and not stating that you cannot use a textarea?

  4. With that query you had:

     

    <?php echo mysql_query("SELECT SUM(wish_total) FROM wish_list WHERE wish_date = '" . $mymessage . "' AND wish_product = " . $totalnum);?>

     

    just rename the sum(wish_total) so that you can get that value like:

     

    <?php echo mysql_query("SELECT SUM(wish_total) AS new_total FROM wish_list WHERE wish_date = '" . $mymessage . "' AND wish_product = " . $totalnum);?>

     

    Then fetch that new_total with mysql_fetch_array()

     

    *please try to stay away from mysql* commands as they are deprecated, please use mysqli instead

  5. Quick note here. You don't have to have 5 different insert queries.

     

    INSERT INTO `a_table` VALUES (6, '666', 'xy'),(6, '666', 'xy'),(6, '666', 'xy'),(6, '666', 'xy'),(6, '666', 'xy') 

     

    Is the equivalent of 5 different inserts

×
×
  • 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.