Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Ingolme

    insert problem

    If no error message is showing up then it definitely was included. require() would halt the program if it failed. The problem you're encountering could only stem from the fact that whatever is inside the included file is not behaving the way you expected it to.
  2. Ingolme

    insert problem

    You need to do two tests. The first test to see if the statement was prepared and the second test to see if it was executed. You're only doing the first one. You should understand how to debug by now, put an echo inside your if and else statements to see which ones it's going through. Your logic is confusing; why do you need to switch the order of the date and ndate fields in the insert query?
  3. Companies will either use a pre-built content management system or build their own. It can be built in PHP, ASP, Java server pages or any other language. Most professional companies don't use Wordpress because it has many security vulnerabilities. There are many content management systems out there. Content management systems are created or maintained using code editors. E-mails can have HTML content in them, but it is limited, so old techniques such as tables and presentation attributes need to be used.
  4. Ingolme

    insert problem

    Remove the location header. If any error message is showing up, the location header is making the page redirect before you're able to see the message. if ($stmt = $mysqli->prepare("INSERT INTO $temptbl(sn, vn, tr_type, date, ndate, aid, sid, description, catid, qty, rate, less, amt, ref, cid, uid) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)")) { $stmt->bind_param('iisssiisiddddsii', $sn, $svn, $tr_type, $date, $dp, $aid, $sid, $desc, $catid, $qty, $rate, $less, $amt, $ref, $cid, $uid); $stmt->execute(); if($stmt->errno) { echo $stmt->error; } exit; // $_SESSION['vousub'] = $qty." ".$unit." '".$item."' added to basket!"; //$mysqli->close(); // die (header("location: invoice.php?m=$method"));} else { die('Insert Error: '.$mysqli->error);}
  5. Check the Network tab in the developer tools (usually accessible by pressing F12) to see if the request is being sent out and what the response is.
  6. How about logging the console inside the function?
  7. Does the Javascript console have any messages? Most browsers let you see the console by pressing F12.
  8. If you don't want Javascript involved then the PHP code needs to be on the same page. You need test whether a form has been submitted or not. These days it's most common to have an application using AJAX to load the results of the form processing and show them on the page.
  9. What you should do is have your own stylesheet which is loaded after the bootstrap one. You can use selectors to override the default styles.
  10. I don't really understand why it's not working. Can you show an example page online or give all the code necessary to recreate the problem ourselves?
  11. I think it might be UTF-8 by default, but just in case, here are some instructions on how to change the entire site's encoding and the encoding for just one page. For the whole site: For just one page: Here are the manual pages https://msdn.microsoft.com/en-us/library/cc294982%28v=expression.40%29.aspx https://msdn.microsoft.com/en-us/library/cc295274%28v=expression.40%29.aspx
  12. It doesn't matter what the <meta> tag says. If the page isn't actually UTF-8, telling the browser that it is won't work. Your text editor needs to save it with that encoding. Which editor are you using?
  13. You want each textarea to have its own limit? Inside the event handler you could start it off like this: if(obj.name == "Message 1") { maxwords = 250;} else { maxwords = 300;}
  14. Your page needs a <!DOCTYPE> declaration. Then you need to make sure your code is valid, test it in the validator: http://validator.w3.org/ Once that's in order, using clear: left on an element will make it go below the floated elements on the page.
  15. The purpose of the example wasn't intended to show "power", it was intended to demostrate how to use that particular jQuery selector. As for why your code isn't working, have you checked the error console? It's probably getting a 404 error.
  16. You see, it says Hot Fuzz value? value? Without jQuery it would say name? value? value? It's not interactive. That's not the point of the example.
  17. In the HTML code, the <span> element contains the text "name?". But after jQuery has been used that text changes to "Hot Fuzz".
  18. If you read what the documentation says you will understand what it is doing.
  19. You cannot access an element by simply typing a variable name that's the same as the element's name attribute. You must use DOM methods and properties to access elements on the page. These are some of the ones you can use: document.getElementById() element.getElementsByTagName() element.getElementsByClassName() element.childNodes element.parentNode element.firstChild element.nextSibling Since you have jQuery on your page, you can also use jQuery selectors.
  20. No, that was a mistake from the forum engine. I edited the post later to fix it. You are supposed to wraps code between [CODE][/code] tags, but writing the code tag without it actually turning into a code box is tricky and doing it wrong can result in the forum software turning it into something different.
  21. You can change the vertical-align of the image to middle or top. Since the elements are inline, how they're positioned relative to each other is by their vertical-align property.
  22. You have a script trying to use jQuery on line 212, but the jQuery library was not included until line 784.
  23. What you need now, instead of a toggle algorithm is a cyclical algorithm. Let's have an array to determine which intervals go with which image: var intervals = [ 5000, 7000, 3000]; Now update the function to behave cyclically function change() { // Update image document.getElementById("rollover").src = rollover[number]; // Set the new waiting time hold = intervals[number]; // Update the iterator number++; // Make sure it cycles by going back to zero if it's too big if(number >= intervals.length) { number = 0; } // Next iteration setTimeout(change, hold);}
  24. Here's the page about it: http://www.w3schools.com/cssref/css3_pr_text-decoration-color.asp It's not supported by any browser. It will only work in Firefox if you put the -moz- prefix: -moz-text-decoration-color: green;
  25. Anything marked in red in the error console is a problem. If you don't know what it means then put it here so we can tell you. Do you have the jQuery library included on your page before your script?
×
×
  • Create New...