Jump to content

only one

Members
  • Posts

    437
  • Joined

  • Last visited

    Never

Everything posted by only one

  1. Hi, im building a forum system, i was using cookies too log people in, but obviously some of them want too be able to be logged out when they close their browser, so i thought I'd integrate it with sessions, but on the second page of being logged in the session expires. Do i need to redeclare the session?
  2. Look through the php scripts, i found one on this site but i can't remember if it worked from a MySQL database, maybe you should try downloading SMF, they have a calendar system.
  3. A variable is always secure.. And as far as i know the only way for people to be able to get variables from you site is by using cURL. Just make sure that whenever you use a form action of post, set your variable as $_POST['variable'] etc.
  4. you dont need the isset function if your going to set your variable to true or false if (!$_SESSION["loggedIn"]){ $_SESSION["loggedIn"] = true; addToCounter(); }
  5. http://www.google.com/search?hl=en&q=PHP+GD http://www.phpfreaks.com/tutorials/105/0.php
  6. hi, i had an idea of craking md5 i thought this might work.. but my comp froze any1 got an idea?? <?php $query = mysql_query("SELECT pass FROM users WHERE user='$_GET[user]'"); while(!$quey = md5($randkey)){ $torand = "1234567890abcdefghijklmnopqrstuvwxyz"; $randkey = $torand{ rand(0,36) }; }else{ echo "$randkey"; } ?>
  7. yea that should work, it beter to try than ask as some guy always told me (cant remember who but hes a genius) id also recomend storing the info in a database (easy to work with) but its your choice
  8. where are the feild1, feild2 variables set?? if (isset($_POST['one'])) { $fld1 = $_POST['one']; } else { $fld1 = ""; } if (isset($_POST['two'])) { $fld2 = $_POST['two']; } else { $fld2 = ""; } is that not meant to be if (isset($_POST['one'])) { $feild1 = $_POST['one']; } else { $feild1 = ""; } if (isset($_POST['two'])) { $feild2 = $_POST['two']; } else { $feild2 = ""; }
  9. im not sure what your trying to make, i think its a type of registration form, if it is its completely F'd up
  10. go to http://php.net and serch the file() function and html_special_chars() function
  11. thats simple.. $roundoff = round($total_rows / 100) * $total;
  12. soz i just realised you wanted to let it be editable... just use the fopen function <?php $file = 'path to php.ini' ; $content = file_get_contents($file); //edit some of this echo " <form action='file update.php'> <textarea name='new_content'>$content</texarea><br /> <input type='submit' value='submit' /> </form> "; ?> now you need to update the file contents to the textarea variable <?php $file = 'path to php.ini' ; fopen ($file); fwrite($file, $_POST[new_content]); fcolse($file); ?>
  13. cant you just use the windows server to connect to the linux server by finding the path of the .ini file eg. $lines = file('path to php.ini'); foreach ($lines as $num => $line) { echo "Line-($num): $line<br />"; } or just use the include function
  14. yea $post = str_replace(array("<", ">","\'"), array("<", ">", "'"), $post['post']);
  15. yea i understand i dont think you want to use the abs function $post = abs($post); thats only goin to define weather its varchar or integer
  16. javascript, that would have to be done client side..
  17. if its only a number you should use int, then it will insert 0
  18. (`id`, `username`, `text`) try that??, i dont see anything wrong
  19. no, i asked this question before, you cant unhash a hash code just ask them to insert their pass again then something like if(md5($pass)==$user['pass']){ send them it.. }else{ echo "passwords do not match"; }
  20. mysql_query("UPDATE userdb set gold=$playerinfo['gold']-$cost WHERE id='$playerinfo[id]'");
  21. it is quite cool, the quiality isnt perfect. and youve posted this in the wrong section
  22. its alright, i was trying to pass a session through to it but it didnt work, so i just had to make the soure of the frame like this <iframe src='page.php?variable=$VariableToBePassed'> which i was trying to avoid
×
×
  • 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.