Jump to content

Gayner

Members
  • Posts

    549
  • Joined

  • Last visited

    Never

Everything posted by Gayner

  1. Still doesn't help me im not as Physic as u? So ur telling me to reduce my php code? lawls i just spent 4weeks on my index.php comon and rajivgonsalves i dont got access to edit .php ini on my server, it's sharedhosting ^^
  2. Why does that have any relevancy when it works on localhost, but not on a server, arn't they both php? rofl
  3. Warning: Cannot modify header information - headers already sent by (output started at /home/praylife/public_html/index.php:29) in /home/praylife/public_html/index.php on line 188 Warning: Cannot modify header information - headers already sent by (output started at /home/praylife/public_html/index.php:29) in /home/praylife/public_html/index.php on line 189 LINE 189: if (isset($_GET['skin']) && $_GET['skin'] == "0") { setcookie("skinid", "default", time()+60*60*24*60, "/"); header('Location: ./?'); } LINE 29: if(!isset($_COOKIE['skinid'])) { echo '<style type="text/css" media="all">@import url(2.css);</style>'; } Ever since i moved from localhost to official server, this is happening why?
  4. how does that relate to your topic tittle "Re: How do I use a global footer..?" Can't you use a footer include? yea but when my exit get's run it aint including anymore therefore it wont show? lol
  5. If my index.php has a bole bunch of if functions and exit's in them.. lol ?
  6. Your the Captain dumbass for spelling "Captian" wrong :-) Solved by PM? no1 want's to help thru pm's post in forum please, thx
  7. Hey google some questions before posting here, because u can get faster responses :-) That error means u don't have matching rows in ur inserts check again.
  8. So they can still register with username hey@rofl ?
  9. function lnonly($string) { $eregi = eregi_replace("([A-Z0-9]+)","",$string); if(empty($eregi)){ return true; } return false; } So that's only for LEtters and numbers right. But I want to add more available characters. like let's say i want people to use the ₧ code, or maybe a @ Sign, how would i add it so it's usable in that string?very confusing
  10. That's what i wanted, thank u sir iuno why guy posted other code toc onfuse me?
  11. I need $_SESSION{'username'} to be like this: if $_SESSION['username'] = "gayner,bob,jesus"; echo "ba blah "; but do i use Arrays or what for those 3 nameS? how thx
  12. lol i will just use this unless easier way? error_reporting(E_ERROR | E_WARNING | E_PARSE);
  13. if (isset($_POST['search']) AND $_POST['search']) $search_string = strtolower( str_replace( "*" , "%", $_POST['search'] ) ); $search_string = preg_replace( "/[<>\!\@£\$\^&\+\=\=\[\]\{\}\(\)\"';\.,\/]/", "", $search_string ); echo $search_string; But whenever I DONT USE MY SEARCH BUTTON I GET UNIDENTIFIED ERROR cause it's underneath a IF function.. How do i stop the error if no1 is pressing my search button from $_POST['search'] on my form
  14. Perhaps that why it's you "all the time" then. ALEXWD has been being a rude person to me lately but i cant report him? Cause he's mod...
  15. Lol ur Script didn't even help me people just used &Debug=true to keep spamming. here is the final product, works flawless, reduces 80% of views // anti flood protection if(isset($_SESSION['lol']) && $_SESSION['lol'] > time() - 3){ // users will be redirected to this page if it makes requests faster than 2 seconds echo ""; exit; } else echo "hey"; $SQL = sprintf("UPDATE prays set views=views+1 WHERE id=%d LIMIT 1",$row['id']); mysql_query($SQL) or die($SQL."\n".mysql_error()); mysql_close(); $_SESSION['lol'] = time(); } WIN WIN!
  16. Yea the problem is if somone knows &debug=true then they will just spam away....
  17. rowid from my mysql $query="SELECT `id`,title,prayer,time,level,nameid,name,prays FROM prays WHERE id = {$_GET['view']} ORDER by id DESC"; $result=mysql_query($query); while($row=mysql_fetch_array($result)) { it's just id from table, i dont wanna use _GEt to override that will look ugly on the url, i know some sites have in built in..
  18. will this work if(empty($_SESSION['viewed'])){ $_SESSION['viewed'] = true; echo "hey"; mysql_query("UPDATE prays set views=views+1 WHERE id={$row['id']}"); } else echo "already viewed"; I am sorry but i am so lost on sessions, how'd u get $_SESSION['viewed'] can we just create our own names for sessions? lmao cause right now it doesn't update i got over 200 prayers rows how does this work for each one seperately?
  19. Like I have a row in my table called "views' and in my php code When i view my prayer, i want it only increment my views using this code: update table set views=views+1 where id=$id But only once per session for each prayer :-) So people don't spam views up u know ?
  20. YES FINALLY!! 8minutes, 20second's ago! HAha I FINALLY Got this to work thanks to u bro!!! I Really love you no homo but seriously, this script is epic, kudo's to ur brain and soul my broski! lol All i needed was the 20second's ago added to the 8minutes, took us 4pages but i got it! THANKS! AWW CRAP:: Whenever u get to the next minute, it stays at 11minutes ago until the first minute is up then it start's displaying the second after, could u fix this?
  21. $id = mysql_insert_id(); header("Location: ./?view=$id"); Why $id pulling blank nothing? mysql_query("INSERT INTO `prays` (`title`,`prayer`,`time`,`level`,`nameid`,`name`) VALUES ( '". mysql_real_escape_string($_POST['title']) ."', '". mysql_real_escape_string($text) ."', '". mysql_real_escape_string($time) ."', '". mysql_real_escape_string($_POST['level']) ."', '". mysql_real_escape_string($e) ."', '". mysql_real_escape_string($name) ."');") or die(mysql_error()) ; mysql_close(); $id = mysql_insert_id(); header("Location: ./?view=$id");
  22. I am using function removeUnsafeAttributesAndGivenTags($input, $validTags = '') { $regex = '#\s*<(/?\w+)\s+(?:on\w+\s*=\s*(["\'\s])?.+? \(\1?.+?\1?\);?\1?|style=["\'].+?["\'])\s*>#is'; return preg_replace($regex, '<${1}>',strip_tags($input, $validTags)); } Works fine
×
×
  • 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.