Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gristoi

  1. if you are using the glyphicons am going to bet you are using bootstrap, if this is the case just use a compination of bootstrap modal and an ajax call to the back end on confirmation
  2. you want to get the visitors country code in php, not javascript, you can do this by extracting it from their ip. have a google on "extracting visitors country code from their ip"
  3. ok, unless you 100 % want to use IIS, I t=suggest you use Mysql instead. just install WAMP server, and you will be good to go
  4. unless you are doing this to learn the fundimentals of javascript then STOP. Firstly , use Jquery to listen to the click events. it is 2014, no one needs to write javascript like this anymore
  5. have a look at codeacademy, and of course php.net
  6. try{ $laser_cannon->AddUnit(New Archer()); // This is not allowed }catch(Exception $e){ // do what you need here }
  7. Andrew12313413, you're not going to get any help with that attitude, gerkintrigg is right, you cant just post random code on the forum and expect people to drop everything and fix it for you. If you do want that then you need to post it in the freelance section and be willing to pay for it, otherwise describe what you have attempted to do to get it to work, and what errors you are getting or what debugging you have done. Spitting your dummy out of your pram helps no one, especially you. This forum is to help people to learn php, not fix scripts for people that they 'found' on the internet
  8. I have the same with my kids, Personally, what i do is remove IE completely from the pc, install chrome as the browser of choice, and set up seperate chrome user accounts for the kids. So they can only go to sites i have whitelisted, and if they try to go to anything else I receive an email to white list or reject the site
  9. you need to catch the exception in the php code, and if caught return a json object with the correct error code. the problem you have is an error shows, but the script keeps executing
  10. what is items.php returning?
  11. jaques1 ,I was just highlighting the fact that there is no way to 'secure' client side code, specifically javascript because this was posted in the 'Ajax help' section. And that all validation needed to be server side to help stop xss
  12. firstly you have to realise that you are sending the data using ajax / javascript, and as this is client side you can never make that aspect of it completely secure. What you need to focus on is ensuring that the php side is escaping and validating all of the data being passed to it. looking at the code you have you are going in the right direction by using prepared statements.
  13. you're not posting jobId anywhere in that code. if you want job id to be posted then you need to specify it: $.ajax({ type: "POST", dataType: "json", url: "actions/ApplyData.php", data: { jobid: ID }, cache: false, success: function(data) { console.log(JSON.stringify(data)); $('#ApplyModal').modal('show'); } });
  14. trq is completely right, if you have to develop on windows , then get a vargant box. bin off phpmyadmin and use something like mysql workbench
  15. backbone is pretty much what it says, it provides a solid backbone to your javascript projects, allowing you to model your code into an MVC style of application, and allowing easy communication between the back and front end
  16. for a start you are using xmlhhtp request directly. where there is nothing wrong with this, it is 2014 and you should use jquery ajax for all of your requests. have a google for jquery ajax chat room.. plus, you're never calling the function you have made <a href="#" onclick="">send</a> the onlick handler is empty. I am going to presume you have copied this script from a veeeeeeery old site. Like i stated before, in modern javacript you dont put event handlers direct into the html, you use event listeners
  17. codeigniter is a dead framework, you should look at using a more up to date one like laravel
  18. you have to be aware that html will render differently based on the browser / device
  19. i think you need to read up a little more on your mysql and php. these are server side languages, which means that by the tie your page is rendered all proccesing in the php and mysql has completed. What you 'need' to do is fire off an ajax request to a php script on the backend to process your request
  20. why would you want to convert something from a widely used modern scripting framework back to basic javascript?
  21. $( "#button" ).click(function( event ) { event.preventDefault(); });
  22. should be mysqli_real_escape_string($con, $_POST['age']);
  23. have you actually done any work on this, or just found it on the internet?
×
×
  • 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.