Jump to content

phpnoob

Members
  • Posts

    117
  • Joined

  • Last visited

Everything posted by phpnoob

  1. editI see now, wasnt guess what you guys talking,
  2. i was check this forum, and not the A was the search, it have a hide div with id= #entry something.and what is this anchor? i was see this somewhere when i search js
  3. I'm not good in js, so plz help meI want to make a jump to the first unread post in forum and i figure it out, it need a js for moving the browser view to a hide div.Help me, at least if you not want to make full script, then post how to find a script in net, i try to search it but no luck
  4. not sure but maybe the problem is here if($_FILES['video_upload']['size'] <= $maxfilesize_vid ) { the > was the problem
  5. I post it again, maybe you miss read itSo for forum now it have 3 tableForumgroupForumtopicForumpostForumgroup have 3 columnID + Name + StatusStatus its for admin itForumtopic have 15 column, don't ask what, don't want to post what haveand Forumpost have 10 columnid + post + date + userid + forumid + topicid + sub + status + edituserid + editdateand now for postmark tablehave 4 column ID + Userid + Forumtopicid + postcountidid for delete and update, userid know why and forumtopicid to, and for postcountid to know which post was readed last this can make two way, write real Forumpost id.Example recordForumpost tableid=563 forumid=1 forumtopic=36Postmark tableID=1 Userid=3 Forumtopicid=36 postcountid=563 the other wayForumpost tableid=563 forumid=1 forumtopic=36 postcount=5id=564 forumid=1 forumtopic=36 postcount=6id=570 forumid=1 forumtopic=36 postcount=7Postmark tableID=1 Userid=3 Forumtopicid=36 postcountid=6 and if i del post? I just need to update only postcountid in Postmark table, to older 1 in each finded record And which idea you recommend?
  6. sorry i was write it to fast, check now
  7. editedi check your post again for true or not, the multiple page its like this index.php?showtopic=45544&st=20st=20 its the code for pages, i talk sid not stLookwith pidw/o pidi was remove the pid and no different, its not do anything for pages script New questionWhat you advice for postcountid put real post id or alt 1?alt its like this, new column for counting post for each topic.Example:Forumpost tableid=1000 forumid=1 forumtopic=100 postcount=3 the topic have only 3 post, and each + record will be +1 in post count, like in here, or here those number its from of js? anyway i think its better to make this instead to add post id to postmark/postcountid column
  8. Now i know what need to do, i was wrong about how to go to the first unreaded post :)I was check some forum, this forum to, and now i know how to make 1 :)the browsercode its like this. forum.php/forum.php?f=topicview&p=3$view=gotonewpost the p number its forumtopic id numberall select its if, and this script start with view=gotonewpost GETNote postmark table have 4 column ID + Userid + Forumtopicid + postcountid, the strategy is this, first record its insert into, the second will be update record1. select table "postmark" and search Userid and forumtopicid and get the postcountid data2. select table "forumpost" and search forumtopicid and check if have higher post then postmark/postcountid have, if have or not, put the right id to browser with header loc.Browsed code:forum.php/forum.php?f=topicview&p=3$pid=1 3. and now just need a js for searching hide div id with that number what pid have, and go to that position. Just wondering, in here why have so many code showtopic=45754&pid=255007&st=0entry255007for entry i know that that code need to js for go to that hide div id, but for pid number why need?
  9. phpnoob

    Password update

    I was made a nice website and i can tell how to make a good pass update script, but first i write how i was build my login security. in login.php, it have 2 way, cookie + session and the other have only session, in user table have session + cookie + ip column, session and cookie column have 32 lengh value, and before i log in the php make a random number and compress it to md5 and update both column, and after that create 1 session + cookie with that code, and it have a check.php, each browser freshing, it check all stat, cookie and session and ip address, and if something not match, then cookie and session will deleted.And now for the pass update, ingolme link just perfect for you, just don't forgot to put security in update script like in your reg script.
  10. I know lots of thing about php, i have a nice website, just dont know how to make this, step by step1. select all record and start while2. check "thread mark table" for which post you see, and stop the process in last watched id post3. ...................4. ................... I hope you understand now, what i mean, and i think that 2 step its good.
  11. I don't want php code, only just want to know how to build it.Most forum have 2 simple way, the easy 1, only go to last post in thread, the other it go to the first unreaded post.The easy php its like thisI post the code step by step 1. counting how many post have in that thread2. start while for to select all record3. because of the first step you can get the last post id, and can put it to js, it need only a for code when need to active the js.so after the page loaded, the js will activate and go to last post by id searching in html But for how to reach the first unreaded post, cant figure how to do it, help me.
  12. phpnoob

    Security for post

    i get what you mean by momment :)and if i make both string at once? or do those code 2 time?
  13. phpnoob

    Security for post

    i was read it, but a little bit confused, that why i post that. this one i cant understand, the thread name "Security for post" only 1 section i can post, in forum EditBut ok i add mysqli_real_escape_string
  14. phpnoob

    Security for post

    forum posting secure, and mysql database
  15. maybe every1 blind? :)Already show 2 way for that problem.
  16. easy, it have two way1. before you start insert into, you check the last id and you add that id+1, so you will know which id is have in table 1, you can then just put that id to table 22.when you insert data to table1, you search it whit all your data, example$Check=mysql_query("SELECT * FROM table1 WHERE name="$_SESSION['username']" and age="$_SESSION['age']");if($checkid=mysql_fetch_array($Check)){$checkidfortable2=$checkid['id'];}
  17. phpnoob

    Security for post

    i was read that page in 1 year ago, and now again, and now i modified the code, is this enough? and can hack it?htmlspecialchars($post, ENT_QUOTES)i want to protect the most knowed hack tactic, is my code enough for that? like xss
  18. phpnoob

    Security for post

    1 more question Can i remove the first code in post protection? $post=htmlspecialchars($_POST['post']);$search=array('<?','?>');$replace=array('<?', '?>');echo str_replace($search, $replace, $post); the htmlspecialchars i was mean
  19. phpnoob

    Security for post

    i figure it out, i was put it in config.php, and before include check.php, thx for helping
  20. phpnoob

    Security for post

    then where?Config.php<?php mysql_connect("","","")or die("Error connection");mysql_select_db("")or die();include "include/check.php"; echo check();include "include/login.php"; include "main.php";include "online.php";$start_time = microtime(true);include "page.php";include "pregreplace.php";?> all php <?php session_start();include "config.php";$getpage=empty($_GET['listen']) ? header("Location: index.php?listen=news") : mysql_real_escape_string($_GET['listen']); echo onlineindex();if ($getpage=='news'){include "include/news.php";echo news();echo end($start_time);}?> where can i put that code and what need to do?
  21. phpnoob

    Security for post

    not works <?php function topicview(){function unMagicQuotify($ar) { $fixed = array(); foreach ($ar as $key=>$val) { if (is_array($val)) { $fixed[stripslashes($key)] = unMagicQuotify($val); } else { $fixed[stripslashes($key)] = stripslashes($val); } } return $fixed;}<form action="'.$_SERVER[REQUEST_URI].'" method="post" name="postform"><textarea name="post" rows="15" cols="80"></textarea></div> <p /><input type="submit" name="submit" value="Go" /></form>if(!empty($_POST['submit'])) { if (!empty($_POST['post'])) { $post=htmlspecialchars($_POST['post']);$search=array('<?','?>');$replace=array('<?', '?>'); $cleanedpost=str_replace($search, $replace, $post); $process = array($cleanedpost);$fixed = array();foreach ($process as $index=>$glob) {$fixed[$index] = unMagicQuotify($glob);} list($cleanedpost) = $fixed;echo $fixed; }} full edited codeerrorWarning: Invalid argument supplied for foreach()and in the bottom it say Array in echo $fixed;
  22. phpnoob

    Security for post

    maybe i put that code in a wrong place? Plz wait, i try something Editit have a main.php, and i include topicview.phpif ($getpage=='forumview'){include "forum/forumview.php"; echo forumview();echo last($start_time);} all fourview code i was put it in function and i was add your code in fuction, so it have 2 function, maybe i need to add something to the first function?
  23. phpnoob

    Security for post

    it have some code that i dont want to post here, but i can say it have a 32 long code :)Array( [f] => topicview [p] => 3)Array()Array( [CookieID] => SECRET [phpSESSID] => SECRET)Array( [f] => topicview [p] => 3 [CookieID] => SECRET [phpSESSID] => SECRET) btw in the bottom of the error, it was write arraynot what i post in textarea
  24. phpnoob

    Security for post

    i try to add that code, but i have an errorWarning: Invalid argument supplied for foreach() ini was add this code function unMagicQuotify($ar) { $fixed = array(); foreach ($ar as $key=>$val) { if (is_array($val)) { $fixed[stripslashes($key)] = unMagicQuotify($val); } else { $fixed[stripslashes($key)] = stripslashes($val); } } return $fixed;}$process = array($_GET,$_POST,$_COOKIE,$_REQUEST);$fixed = array();foreach ($process as $index=>$glob) { $fixed[$index] = unMagicQuotify($glob);}list($_GET,$_POST,$_COOKIE,$_REQUEST) = $fixed; the error target this pieceforeach ($ar as $key=>$val)
×
×
  • Create New...