Jump to content

Adamhumbug

Members
  • Content Count

    270
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Adamhumbug

  • Rank
    Advanced Member

Recent Profile Visitors

2,079 profile views
  1. It does not correct and actually i am having the same issue again with a similar problem.
  2. This is the modal <div class="modal fade" id="editQuoteModal" tabindex="-1"> <div class="modal-dialog modal-xl"> <div class="modal-content"> <div id='editQuoteContent'> <!-- ajax info here --> </div> </div> </div> </div> This is the ajax $('.editQuote').click(function(){ var quoteId = $(this).data("id"); $.ajax({ type: 'post', data: {"ajax" : 'one', "id" : quoteId}, success: function(resp){ $('#editQuoteContent').html(resp) } }) $('#editQuoteModal').modal({ show: true
  3. Yep that might do it. Cant see the woods for the trees! Thanks as always
  4. I have a user form with a dete button on a dropdown. When you click said button this runs function deleteUser(){ var e = event.target var uid = e.getAttribute("data-id"); console.log(e) console.log(uid) $.ajax({ type: 'post', data: {"ajax" : 'delUser', "id" : uid} }) } which goes into this if(isset($_POST['ajax'])){ switch($_POST['ajax']) { case 'newUserMod': exit(popNewUserModal()); break; case 'userMod': exit(popUserModal($_POST['id'])); break; case 'deleteUser': exit(deleteUser($_POST['id'])); break; } }; which calls this function in
  5. Hi All, I have a number of bootstrap dropdowns in a list of users, each use has one. When i click one, it drops down and i populate a modal from one of the buttons. After exiting that modal none of the other dropdowns trigger when clicked. If i reload the page, they work again for one click. I am happy to share code if required, just wanted to know if anyone had run into this? Thanks All
  6. Final Solution function getRentalItems($display){ include 'includes/dbconn.php'; $stmt = $conn -> prepare(' SELECT i.id, item, it.type, price_GBP, price_USD, price_CAD FROM items i LEFT JOIN item_type it on i.type = it.id order by i.type desc '); $stmt -> execute(); $stmt -> bind_result($id, $item, $type, $gbp, $usd, $cad); if($display == 'Options'){ $out = ''; $t = ''; while($stmt -> fetch()){ if ($t == $type){ $out .= "<option data-item='$type' data-GBP='$gbp' data-USD='$usd' data-CAD='$cad' value='$id'>$item</option>"; }else{
  7. ok much closer now. Still struggling a bit as you can see function getRentalItems($display){ include 'includes/dbconn.php'; $stmt = $conn -> prepare(' SELECT i.id, item, it.type, price_GBP, price_USD, price_CAD FROM items i LEFT JOIN item_type it on i.type = it.id order by i.type desc '); $stmt -> execute(); $stmt -> bind_result($id, $item, $type, $gbp, $usd, $cad); if($display == 'Options'){ $out = ''; $t = ''; while($stmt -> fetch()){ if ($t == $type){ $out .= "<option data-item='$type' data-GBP='$gbp' data-USD='$usd' data-CAD='$cad'
  8. Thanks for that i feel like i am getting close. i have this now function getRentalItems($display){ include 'includes/dbconn.php'; $stmt = $conn -> prepare(' SELECT i.id, item, it.type, price_GBP, price_USD, price_CAD FROM items i LEFT JOIN item_type it on i.type = it.id order by i.type desc '); $stmt -> execute(); $stmt -> bind_result($id, $item, $type, $gbp, $usd, $cad); if($display == 'Options'){ $out = ''; $t = ''; while($stmt -> fetch()){ if ($t == $type){ $out .= "<option data-item='$type' data-GBP='$gbp' data-USD='$usd' data-CAD=
  9. Hi All, I have a table, the column type is an attribute that items in this table share. A simple explanation would be if the field was colour and the items could be one of the colours. I am struggling with a for each loop to get the items out of this table grouped by this value. I am wanting to create a dopdown where the item_type is a header. This is what i have so far which obviously doesnt work: unction getRentalItems($display){ include 'includes/dbconn.php'; $stmt = $conn -> prepare(' SELECT i.id, item, it.type, price_GBP, price_USD, price_CAD FROM items
  10. I immediately saw my issue as soon as i wrote the above. I was including head at the start of the register document rather than just above the html.
  11. Hmm, i am sure i am being very simple here but im not sure i follow. I have updated the code in my head.php to what is in the post above. Most of my other pages include head.php On my register page i have the following error: Register line 73 is: header("location: register.php?user_may_exist"); and head line 14 is the last line of this: <?php if(isset($currentPageTitle)){ $curPage = $currentPageTitle; }else{ $curPage = 'Baldock Town Cricket Club'; }; if(isset($currentPageMeta)){ $desc = "<meta name='description' content='$currentPageMeta'>
  12. Do i not still have to include something after the html section? Like follows: <?php if(isset($currentPageTitle)){ $curPage = $currentPageTitle; }else{ $curPage = 'Cricket Club'; }; if(isset($currentPageMeta)){ $desc = "<meta name='description' content='$currentPageMeta'>"; }else{ $desc = "<meta name='description' content='All the latest from CC'>"; }; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> <?= $curPage ?> </title> <?= $desc ?> <meta name="viewport" content="
  13. Hi All, I am trying to use headers at the end of functions to put the user where they need to be. header("location: register.php?user_may_exist"); I understand how they work and their qwuirks. My issue is, in my head file, i am outputting which causes issues for the headers which come after. I have the following in head.php <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> <?php if(isset($currentPageTitle)){ echo $currentPageTitle; }else{ echo 'Cricket Club'; }; ?> </title> <?
  14. Thanks all for this - opened the door a little for me
  15. I wasnt sure where best to put this question. I have a website that i built locally using mamp, i now have this hosted with 1&1 and its working online. I am trying to continue development locally rather than playing with the live version but when i now try and navigate to it via local host i get the following error: SSL_Error_rx_record_too_long Anyone got any hints?
×
×
  • 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.