Jump to content

cutielou22

Members
  • Content Count

    81
  • Joined

  • Last visited

Everything posted by cutielou22

  1. Well, I want to make it so a user can have there own events and they show up in the calendar. The calendar you can "flip" through the months to look at the months coming up. I want the days of events to be highlighted a certain color. Since you say my " ajax code sends the date": then how do I grab that information and compare it with the calendar? That is what I don't get.
  2. So I added data-day, but that must up all dates in the calendar. What would data-day be linked to - I have nothing called that right now. Is the ajax I have now correct then (and in the correct spot)? - is json_encode() correct also? I am completely new to this. Just using Google.
  3. Okay. So I have done only ajax forms. So I am getting a little confused while researching . . . what I have added: Underneath: generateCalendar(currentDate); I added (still in the same function as generateCalendar - not sure if correct either): $.ajax({ type: "POST", dataType: 'json', url: "cal_events.php", async: false, data: {date: currentDate}, contentType: "application/json; charset=utf-8", success: function (msg) { console.log(msg); } });
  4. I have a javascript calendar and I want to make it so when a event is added to a mysql table it can be seen on the calendar. I know you can't put SELECT and other mysql stuff in a script so how can I do this? HTML: <div id="main" class="container"> <span class="jumbotron"> <h1 class="text-center"> <a id="left" href="#"> <i class="fas fa-chevron-left"></i> </a> <span id="month"></span> <span id="year"></span> <a id="right" href="#"> <i class="fas fa-chevron-
  5. I never had this problem before though. I don't know what started it. Not sure what I changed to effect it.
  6. Your form inputs do need the name="name" and name="email" added for your $_POSTS. Also, this is just to educate me. Why did you add a "@" in front of the mail()? I looked it up and I couldn't find anything telling me what this means. Thanks!
  7. Okay . . . . but do you know why I am getting this error or what I can do to fix it (besides switching my entire site to ajax)? It also sometimes throws in a 406 Not Acceptable The server cannot send data in a format requested.
  8. For example, if they just won a game and received a trophy for it. It takes them to a page to update the database with the trophy they just won and perhaps their score. It then redirects immediately back to the game in a die(header(Location: link.com/here.php?note=You+won+a+trophy.+<img src=trophylink.png>)).
  9. I want it show something like "You found this *item here*." and have it show a picture with it - without the page messing with my layout. Is that bad or something?
  10. Here is a example link: https://site.com/this_here/page.php?note=W+srchttp:>e+have+some+text+here. That shows up fine like it is supposed to, but when I want a image to show up with in it - in html - it makes the whole page wonky. Example Problem: https://site.com/this_here/page.php?note=We+have+some+text+here.+<img src=imagelink.png> I have it on any page that is now set to show an image link that. I used to not have problems with this and now I do. The 'note' text comes from a $_GET and is not decoded or anything - which you shouldn't do I know. I tested by takin
  11. cutielou22

    Says

    It is working now. No errors. Kept the global $mysqli; And I got rid of the owner part - like you said no where that is stated. Thank you so much guys! Sorry if I was a pain the butt. I really wasn't trying to be. Thanks again.
  12. cutielou22

    Says

    I added global $mysqli; to the function directly under the "include_once "addon.inc.php";" Now no errors come up, but still nothing happens.
  13. cutielou22

    Says

    Okay. Gotcha. I added the below. error_reporting(E_ALL); // Report all errors Now 2 errors come up. So you guys are right. But what would cause the $mysqli error? Just a duplicate like said above? Even though I inserted my database connection directly in the function and renamed it and that didn't work either. Glad I am kind of getting somewhere though. Notice: Undefined variable: mysqli in /home3/solpetsc/public_html/funcs.inc.php on line 525Fatal error: Call to a member function prepare() on a non-object in /home3/solpetsc/public_html/funcs.inc.php on line 525
  14. cutielou22

    Says

    Taking out the part after the "AND " still creates the same "Fatal error: Call to a member function prepare() on a non-object in /home3/solpetsc/public_html/funcs.inc.php on line 522" error.
  15. cutielou22

    Says

    Here is the whole error: Fatal error: Call to a member function prepare() on a non-object in /home3/solpetsc/public_html/funcs.inc.php on line 522 It's this whole function: I did no edits so you can see my tests. I would post the page I am using the function on where it is not working. But it is not working on any of them. Also the error is showing up now without the below - or die code. I did used to get a error about the " AND `owner` = ?" part. Not sure how I was getting that error - cannot reproduce it now to get EXACTLY what it said, but it was talking about a nonobject
  16. cutielou22

    Says

    Even going in and adding the connection directly to the page instead of the include gives same error.
  17. cutielou22

    Says

    Yes I have. On another page but I have it in a php include. Not sure if this helps, but it is something I noticed and tested. If I use include() it gives no errors, but if I use require_one() or include_once() that's when it shows the error. (for the file with the connection)
  18. cutielou22

    Says

    $exper = $mysqli->prepare("UPDATE `userpets` SET `experience` = experience + ? WHERE `petid` = ? AND `owner` = ?") or die($mysqli->error . mysqli_error($mysqli)); $exper->bind_param('iss', $gain_this_much, $grab_pet_id, $userid); $exper->execute(); $exper->store_result(); //var_dump($mysqli); $exper->fetch(); $exper->close(); The code below gives me the error : "Fatal error: Call to a member function prepare() on a non-object . . . . " However there is no non-object. I use the EXACT SAME code on another page and no error. Updates correctly on other page also just
  19. I just fixed it! I knew it was going to be a tiny problem. Thank you guys for helping me. How I Fixed It: I been putting the $battleid in my url so I can see it. I just assumed as long as it was showing it would be the right one. Then just a little bit ago I did another test and noticed that the $battleid should be higher than that. So I have the correct one showing on another page - so I checked to see if it matched or if this may be the error I am looking for! It was the error I was looking for. The problem was I was grabbing the wrong $battleid (which did not need to be updated so it
  20. haha I realize you did not use quotes "" but used the single quote. Using the single quotes for the strings I got a error, but making it into quotes with singles quotes made the error go away. (Can't remember exactly how I did it to show you - google helped me.) It was still not updating the database though. Just got rid of the error.
  21. @barand Tried that already. No errors. @requinix I thought I tried this once, but tried again and got a error. Then looked up the error and it ended up me adding quotes to remove the error. . . . . though database still not updating. Same results. I know this is an extremely odd problem.
  22. Yes, my variables are correct. The thing I really don't get is that the exact same snippet of code is working on another page, but not this page. What could cause that? I even bothered checking the permissions of the page.
  23. It seems none of the mysqli is updating on this ONE page I have. It works fine on all other pages (even using the same tables) - just not this one. It is super weird. Could it be a page problem? Is that a thing? I have tried many . . . many trial error options in more than 2 and 1/2 hours - absolutely none of them give any errors. This is how most of them look or similar. There is only 3 different tables that I update on this page and none of them update or give errors. I am at a lost. $stmt = $mysqli->prepare("UPDATE `solbattle` SET `pet_turn` = 'pet_one', `p2_turns`=p
  24. It also automatically chooses the last one no matter which one is picked from the list to delete. It also does not actually delete a selection if added. It goes right to the next one. (THIS HOWEVER DID WORK BEFORE) <<For when choosing "Yes".
  25. I am working with the code from this: https://codepen.io/adventuresinmissions/pen/nrhHF I have made my own slight changes, but I am having a problem. I am getting data from a mysql table. If the page has more than one element (or row) from the table shown it will pop up the popup for each - if hitting "No" or "Cancel". I just want it to show one pop up and go away. Not go to the next pop up/row. Hope that makes sense. The Code I am Using on the Page: ECHO<<<END <script> jQuery(document).ready(function($){ //open popup $('.cd-popup-trigger$count').on('click', func
×
×
  • 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.