fxuser Posted January 8, 2011 Share Posted January 8, 2011 Hello, This is my javascript code: $(document).ready(function(){ $('#upd').submit(function() { $.post('php.php', $('#upd').serialize(), function(data) { $('#error').html(data).show(); if ($('#thinupd').val() > 3){ $('#act').fadeOut('slow').load('includes/my_activity.include.php').fadeIn('slow'); } }); return false; }); }); so i have 2 questions... how can i secure the pages php.php and my included file above so when i go directly to disable the users to run the code by going to the url of the file? also i do a check so if the thinupd input has more than 3 characters it will fadeout , load the included file and fadein .. which does not work.. it does work if i dont put an if statement... For the page secure i figured this out which doesnt not seem to work pretty well: if(!defined("MAIN")){ die('<tt>You cannot view this file directly!</tt>'); } if i put the above code to an included file i cant see it directly but if i try this code on the above included file i will get the "You cannot view this file directly!" inside the div i am fadingout and in ... Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/223811-jquery-post-problem/ Share on other sites More sharing options...
fxuser Posted January 9, 2011 Author Share Posted January 9, 2011 bumping for help Quote Link to comment https://forums.phpfreaks.com/topic/223811-jquery-post-problem/#findComment-1157198 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.