Jump to content

astralaaron

Members
  • Posts

    1,254
  • Joined

  • Last visited

Everything posted by astralaaron

  1. On more advanced forums when alot of people reply it seperates the posts onto different pages.. how when I get a certain amount of reply's can I seperate them into different pages so the one page does not get HUGE you guys know what I am asking here?if you can answer thanks..is this something very complicated?
  2. PROBLEM SOLVED:<textfield wrap="hard">
  3. astralaaron

    about my forum

    Okay, on my forum I have put together I am having 1 problem.. that is if the person puts a message or replys to a topic with something like this: "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdf"My forum does not "wordwrap" it just keeps it 1 line and expands the message box as far as the message will take it.. where you have to scroll over to the right..if there is spaces then it "wordwrap's" but just as a security reason.. is there anyway to not allow that type of post? or make it so it wordwarps..??thanks
  4. yeah thats the next thing I am going to try to do is the password encryption.when the user registers the password, I just put md5() around the string?and also when the user logs in ?
  5. i went to php.net/mysql_real_escape_stringI ended up with this:$sql = sprintf("SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'", mysql_real_escape_string($username), mysql_real_escape_string($password));and it worked.. is that doing the same thing as you said, justsomeguy??
  6. Far out! $row = mysql_fetch_assoc($result); $_SESSION['email'] = $row['email'];that worked perfectly thank you!just that the mysql_real_escape_string isnt working correctly for some reason
  7. thanks for the post, I just tried adding this:$sql = "SELECT * FROM $tbl_name WHERE username='" . mysql_real_escape_string($myusername) . "' and password='" . mysql_real_escape_string($mypassword) . "'";but now I get "wrong username and password"what could be causing that ?
  8. thanks justsomeguy - I like to hide the box the best:-)
  9. okay.. here is my "checklogin.php" file when the user submits their username / password it sends the information here.. how can I alter this so it pulls their email from the database also? so I can store it in a $SESSION?please help!!!! <?php// Start sessionsession_start();// Check if the user already is logged inif ($_SESSION['loggedin']) { header( 'Location: main_forum.php' ); exit();}ob_start();$host = "localhost"; // Host name$username = "root"; // Mysql username$password = "********"; // Mysql password$db_name = "multiforum"; // Database name$tbl_name = "members"; // Table name// Connect to server and select databse. mysql_connect( "$host", "$username", "$password" ) or die("cannot connect");mysql_select_db( $db_name ) or die("cannot select DB");// Define $myusername and $mypassword$myusername = $_POST['myusername'];$mypassword = $_POST['mypassword'];$sql = "SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";$result = mysql_query( $sql );// Mysql_num_row is counting table row$count = mysql_num_rows( $result );// If result matched $myusername and $mypassword, table row must be 1 rowif ($count == 1) { // Register $myusername, $mypassword and redirect to file "login_success.php" $_SESSION['loggedin'] = true; $_SESSION['myusername'] = $myusername; header( "location: main.php" );} else { echo "Wrong Username or Password";}ob_end_flush();?>
  10. Yeah there we go it works like that, thanks.
  11. how would it look in my code? like this?:<input readonly name="a_name" type="text" id="a_name" size="45" value="<?php echo ($_SESSION['myusername']); ?>">
  12. Well I don't really need to lock the value anymore, I just did it this way:<?php echo ($_SESSION['myusername']); ?><input name="a_name" type="text" id="a_name" size="45" value="<?php echo ($_SESSION['myusername']); ?>" style="visibility: hidden;" />so it displays the name and it is hidden so it cannot be changed.. but If anyone knows how to lock the value I would still like to know!
  13. I have a login page where the user inputs their name / password.the username is stored in the session and gets passed to the next pages..my question is, if in my database I have their email address also.. and they only input their username / passwordhow can I pass their email address into a session also so I can use it on the other pages?(It is for my forum, I want their name and email to show up when they post. the name works fine NP)if the question doesnt make any sence to anyone let me know I will try to explain better.thanks!
  14. okay I have the first page a login, passes the session to my forum..when people reply to the forum I want the name field to be locked with their session nameI have this and it works as far as putting their name into the field:<input name="a_name" type="text" id="a_name" size="45" value="<?php echo ($_SESSION['myusername']); ?>">now how do I lock that value so it cannot be changed? I know you can hide the field.. but I just want to lock the value if its possible.anyone know what i am talking about? any answers?thanks
  15. thank you for the detailed explaination! exactly what I needed.
  16. well if you have heard of Magnus Samuelson (strongest man winner many years in a row)Lars taught that guy to be strong too :-)
  17. thanks, yeah the query was select * from thetable;
  18. thanks justsomeguy, good info :-)
  19. cool thanks alot you have been very helpfull!
  20. How do you create a hidden textfield? / NEVER MIND you guys already posted that... hah sorry
  21. hey by the way mr_CHISOL this is off the subject but: where in swedin are you from? and have you ever heard of Lars Magnus Wallin?he is my jiu-jitsu teacher and hes back in swedin right now 8)just wondering.
  22. anyone have information on having a live webcamera?what languages are used to put it on a website?any tutorials / examples?
  23. by the way the code you posted works great , I just need to add in the md5 to it and it should be complete right??also I would like to understand the isset code / explain please..
  24. thanks!whats the difference between md5 and the sha1 ?
×
×
  • Create New...