-
Posts
840 -
Joined
-
Last visited
-
Days Won
1
Everything posted by gristoi
-
Noob Q: Simple JS Alert POST callback to php script
gristoi replied to anderson_catchme's topic in Javascript Help
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 -
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"
-
codeacademy
-
Totally Befuzzled with installation!
gristoi replied to mjs_novice's topic in PHP Installation and Configuration
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 -
Need a delete row with checkbox function onclick event button--DOM
gristoi replied to GOLDfeet's topic in PHP Coding Help
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 -
have a look at codeacademy, and of course php.net
-
try{ $laser_cannon->AddUnit(New Archer()); // This is not allowed }catch(Exception $e){ // do what you need here }
-
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
- 10 replies
-
- php
- authentication
-
(and 2 more)
Tagged with:
-
How to keep kids from tampering with Internet Explorer history on Win8
gristoi replied to sKunKbad's topic in Miscellaneous
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 -
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
-
what is items.php returning?
-
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
-
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.
-
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'); } });
-
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
-
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
-
messaging with server for data (chat-like page loading)
gristoi replied to Q695's topic in Javascript Help
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- 5 replies
-
- chat
- javascript
-
(and 2 more)
Tagged with:
-
codeigniter is a dead framework, you should look at using a more up to date one like laravel
-
you have to be aware that html will render differently based on the browser / device
-
Passing a value in MySQL query using jQuery
gristoi replied to web_garaux's topic in PHP Coding Help
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 -
why would you want to convert something from a widely used modern scripting framework back to basic javascript?
-
How to Avoid Postback on JQuery Button click in PHP
gristoi replied to fanboime's topic in Javascript Help
$( "#button" ).click(function( event ) { event.preventDefault(); }); -
change === to ==
-
should be mysqli_real_escape_string($con, $_POST['age']);
-
have you actually done any work on this, or just found it on the internet?