Jump to content

Jason28

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by Jason28

  1. Anyone please? Just a link that when clicked displays AJAX generated info from the DB would be great. I used a few tutorials but they only gave errors from the javascript.
  2. Hmm well I meant just some simple codes that allows a user to submit html to a DB but nothing malicious so that it will appear on their page. I could create an array and use preg matches and stuff but I was hoping to save time by finding a little script that does this for me. Thanks. EDIT Actually I may try to use htmlspecialchars_decode() for the first time with htmlspecialchars to see how that turns out.
  3. I can write this up myself but was wondering if there was a script that allows users to use html in a submit form but prevents danagerous code from being entered? Thanks.
  4. I have seen a few tutorials about Ajax working with php and mysql but they always use form values. Could anyone provide an example of using a url with $_GET statements and have AJAX display the results from the DB? Such as: blah.php?action=view&user=5 and AJAX would pass the action and user info to php and display the result? A working example would be great. Thanks.
  5. Can I get a direct solution instead of going though 279,000 unrelated webpages? Thanks.
  6. I have set the cookie for 7200 (I recently changed it from 3600 hoping it would solve the problem). I didn't post the code since I have other files such as the config and other includes so the cookie code may not make much sense but here it goes anyway I basically wrote it this way in case I ever wanted to change a cookie name I can and it also checks to make sure someone doesn't cheat by editing their cookie file by checking that all of the cookie values match those found in the DB. Here is part of the code for the login page: if ( clean_var($_POST["login"]) && $error != TRUE ) { $md5_pass = md5($pass . SALT); setcookie($ck_admin_user, $user, time() + $cookie_expire_time); setcookie($ck_admin_pass, $md5_pass, time() + $cookie_expire_time); setcookie($ck_admin_level, $row['level'], time() + $cookie_expire_time); header("Location: ".$site_url."admin/admin.php"); exit; } Basically just using the setcookie function. It always works in Firefox but sometimes it doesn't work in IE.
  7. Hello, I do not understand if it is just my PC acting weird or perhaps a bad way I coded a script. I used cookies as logins by following different tutorials and everything works perfectly. However every now and then for some reason it is like the cookies are not being stored on my PC when I try to login. The page just refreshes itself with no errors or anything and when I check my cookie folder there is nothing there. However I can login with FireFox just fine and a week or so later Internet Explorer will begin working again. Any ideas? If it is just my computer I am not too worried about it but if it is not then I do not want to have my members complain about it. Thanks!
×
×
  • 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.