Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


requinix last won the day on November 1

requinix had the most liked content!

About requinix

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

requinix's Achievements

Prolific Member

Prolific Member (5/5)




Community Answers

  1. Right now the code assumes there is a file. $name = $_FILES['file']['name'] [$ID]; if(move_uploaded_file($_FILES['file']['tmp_name'][$ID],$target_dir.$name)){ What you need to change is have it first test if there was an uploaded file (the "error" in $_FILES is UPLOAD_ERR_OK). Then you only try to move the file if there was one. Then have your insert query not depend on moving that file.
  2. Like I said, sometimes you need to step away from the computer for a while. I really did mean to do that, you know. Wasn't even joking.
  3. I'm not talking about a column in a table. I'm talking about the PHP variable you have there called $voucher_code_in_transaction. Where is the line of PHP code that declares that variable?
  4. Okay, now I'm done. $stmt->bind_param('s', $voucher_code_in_transaction); Where is the $voucher_code_in_transaction variable coming from?
  5. This might be one of those times when you should step away from the computer for an hour or so, get something to eat, watch TV, and come back to the code with a fresh pair of eyes. As a reminder, this works: $stmt = $con->prepare('SELECT request_receiver_id, request_receiver_name FROM transactions WHERE voucher_code_in_transaction = ?'); $stmt->bind_param('s', $_POST['voucher_code_in_transaction']); and this does not work: $stmt = $con->prepare('SELECT voucher_value FROM voucher_codes WHERE voucher_code = ?'); $stmt->bind_param('s', $voucher_code_in_transaction);
  6. Almost had my fun. This query works, right? $stmt = $con->prepare('SELECT request_receiver_id, request_receiver_name FROM transactions WHERE voucher_code_in_transaction = ?'); $stmt->bind_param('s', $_POST['voucher_code_in_transaction']); There's a big difference between the two of them.
  7. I meant in the code. Good news: I've had my fun. $stmt = $con->prepare('SELECT voucher_value FROM voucher_codes WHERE voucher_code = ?'); $stmt->bind_param('s', $voucher_code_in_transaction); That query is not returning any results.
  8. Good so far. How do you get the value of that voucher? Because if, for some reason, you didn't happen to have a value for it, you'd be adding 0 to the balance and total received, thus making it look like nothing happened...
  9. Hint: It might not so much be that the query isn't working, but that the query is working except it's not actually changing the data...
  10. This "<button type='button' onclick=\"javascript:'" + ZoomAndCenter(locations[i]) + isn't going to work. What it does is actually call the ZoomAndCenter function right at the moment that you're creating the button, when what you want is to have that function called when you click the button. As part of the onclick. Calling the function, which returns nothing, is why you see onclick="javascript:'undefined'" when you inspect the button. This code is rather old in its practices. Modern Javascript has you creating a button element like with document.createElement, attaching an event handler with addEventListener, then inserting the button into the document. That said, my preferred approach is to throw data attributes on a button and pull them out in the event handler. <button type="button" data-center-latitude="1.52986" data-center-longitude="110.36">Click me</button> I also still use jQuery because it's much easier than dealing with DOM stuff manually. $("#results button[data-center-latitude][data-center-longitude]").each(function() { const lat = parseFloat(this.dataset.centerLatitude); const lng = parseFloat(this.dataset.centerLongitude); const latlng = new google.maps.LatLng(lat, lng); new google.maps.Marker({ position: latlng, map, }); $(this).on("click", function() { map.setCenter(latlng); map.setZoom(15); }); });
  11. It's going to be very, very hard for us to help you through this step by step if you don't have any PHP or development experience. It's like trying to cook some complicated dish in a kitchen and asking a chef to guide you through it - and the chef can't see what you're doing or even what dish you're trying to prepare. We can still try. However, first you should try to reach out to the original developers/company if you can. Let's start with a lot of details. What kind of software? What is this report? What about it doesn't work the way you want and how do you want to change it? What kind of fields do you want? Edit what parts of it?
  12. Why did you change the error log path at all? The php:apache image should have set everything up for you already.
  13. Sounds like you've discovered the concept of feature creep. Is the rest of your voucher system already set up?
  14. What do you mean by "actionable"? My suggestion was, given you seem to like using YouTube, to find videos that can explain aspects of page design and not just simply about HTML and CSS syntax. The idea is that you could be able to look at the elements of a page and consider, say, whether they're using flexbox or grid, or how their arrangement changes when you resize your browser window. If your goal is really just to copy that site then use the browser developer tools to look at a site and see how they set it up, then see if you can replicate what they did (and without cheating by literally copying it).
  15. Knowing the fundamentals of something is different from knowing how to apply them. That works for everything: speaking a language, driving a car, cooking a dinner... What you've learned is the fundamentals but perhaps not how you actually use them. That said, website design is another thing by itself that takes some amount of learning. Learning how to use paint and a brush doesn't mean you can sell a painting. If you're a video person then see if you can find videos about the designing side of websites, not so much the syntax side.
  • 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.