Jump to content

LAGirl

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by LAGirl

  1. edit: actually im thinking cookies arent the way to go. That would just change the text for that specific user i think and i dont want that. I want the change to be permanent once someone clicks that button. so now im thinking i should use.... ajax? $.ajax({ type: "POST", url: url, data: data, success: success, dataType: dataType });
  2. I have a table displaying database data and there's a "Dead" button next to each row for users to click when the information in that row is dead. When the button is clicked the info in the row is crossed out. Now this works, but the change isnt permanent. When I refresh the page, the row is no longer crossed out. I think I have to set cookies.. ? but I am unsure on how to do this. Are there any tutorials or something I can watch on this. Just looking at http://php.net/manual/en/function.setcookie.php is not helping. I'm reading it and my brain is like.. what?!?! How do I apply that to what I want to do? Here's my code php <?php while($row = $data->fetch_assoc()) { ?> <tr> <td><?php echo $row['title']; ?> </td> <td><?php echo $row['requester']; ?></td> <td><?php echo $row['reward']; ?></td> <td><?php echo $row['qual']; ?></td> <td><?php echo $row['time']; ?></td> <td><?php echo $row['category']; ?></td> <td><a href="<?php $row['link']; ?>"><button class="btn btn-mini btn-primary" type="button">Do This Hit</button></a></td> <td><button class="btn btn-danger btn-mini dead" type="button">Dead</button></td> </tr> <?php } ?> and here's my javascript $('table').on('click','.dead',function(){ $(this).parent().siblings().css({textDecoration: 'line-through'}); }); I'm just totally stuck right now, so any help is appreciated. Also, if cookies arent the way to go, please feel free to suggest other ways. Thanks.
×
×
  • 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.