Jump to content
xisto Community

beeseven

Members
  • Content Count

    628
  • Joined

  • Last visited

Posts posted by beeseven


  1. we will never live in peace because it is human nature to be aggresive and to be greedy.  The only way there will be a lasting peace is if everyone is brainwashed to be exactly the same as everyone else...

    68002[/snapback]

    Agree'd. Not to mention the fact that some people would only be at peace if they were causing war, a nice psychological thing thrown in there. :) Peace can't work, and besides, it'd be kind of boring. Get up, turn on the news, see that another disease has been cured and some world leaders are playing a friendly game of golf, go to work, go home, sleep, get up, etc. It wouldn't last long unless we were brainwashed.

     

    This is encroaching on my argument against heaven, but that's for another time.


  2. I'm making a forum and I've had several problems tonight which I've come here to ask then found the answer to myself, but this one is stumping me. Whenever it goes to write the post to the database, it saves the poster, and the time, but the part where the message would go is empty. Here's the code, with comments about what it's supposed to do (what I wanted it to do and thought it did):

    $imsg = stripslashes($_POST['msg']); //Get message	if(strlen($imsg) > 5 && strlen($imsg) < 10240) //Check length	{  $imsg = htmlspecialchars($imsg); //Change stuff to entities  $imsg = str_replace("&","&",$imsg); //Change ampersands back  $allowedentities = array('<b>','</b>','<i>','</i>','<u>','</u>','<B>','</B>','<I>','</I>','<U>','</U>','<br>','<BR>','<Br>','<bR>'); //Tell which entities to change into tags  $allowedtags = array('<b>','</b>','<i>','</i>','<u>','</u>','<B>','</B>','<I>','</I>','<U>','</U>','<br>','<BR>','<Br>','<bR>'); //Tell which tags to turn them into  $imsg = str_replace($allowedentities,$allowedtags,$imsg); //Replace  $msg = nl2br($imsg); //Add line breaks  echo "<table class=\"posts\"><tr><td class=\"msg\">$msg</td></tr></table><br><form method=\"post\" action=\"temppost.php\" name=\"f2\"><input type=\"submit\" name=\"post\"value=\"Post Message\"></form>"; //Display preview of post and post button	}
    That's how it takes the message and processes it. The rest is as follows:
    $postedby = $username; //Get user posting	$postedon = date("F jS, Y \a\\t g:i:sa"); //Get date/time	mysql_query("INSERT INTO `tempposts` (`postedby`,`postedon`,`msg`) VALUES ('$postedby','$postedon','$msg')"); //Send it to database
    I'm not sure if it's something about the $msg variable being available in the different parts or the mySQL table. I'm kind of new to it. The data type for the message was originally a BLOB, if that matters. I tried changing it to TEXT and it still didn't work.

  3. you have to think of making mistakes with your incredible speeds. typing so fast can cause lots of probs for ya. Even though I can type real fast (250+ WPM) I still slow down whenever I am coding in order not to make stupid mistakes in there.

    66592[/snapback]

    Why do I think 250WPM isn't accurate? Maybe because you'd be like the best secretary in the world.

  4. Hey, back in the hotel now, I'll be going home tomorrow. I took a couple pictures of the keyboard, but about 900 of the land animals and birds and 60 or so more of the fish. The boat was also nice, we had a lot of stuff to do there. Some people from my group also invented and taught the bartenders to make "krunk juice" (it's just Coke with lime, but it's what the Coke they actually sell with lime should be). They also had instrumental versions of Beatles songs playing aruond the ship most of the day. We did karaoke, too, and I sang "Submarino Amarillo" (did you know the Beatles translated their songs?). The last 40 seconds was just (translated): "Submarine, yellow it is. Yellow it is. Yellow it is." repeated.Overall, it was a very cool trip, and everyone should have the chance to go to the Galapagos sometime in their life.-b7


  5. So I'm in Ecuador today after a whole day of plane trips yesterday. Tomorrow I have to wake up early to fly to Guayaq?l (don't know spelling), then to Baltra (I think) in the Gal?pagos islands. Today we (a group of 23 students and parents from my school) did some sight-seeing in Quito and saw a lot of neat stuff.When we get to the Gal?pagos, we'll go on an 8 or so day cruise around the islands stopping every day (except one where we exchange some people on the boat) and walking around the islands or snorkeling or something. This is probably the last time I'll be on Trap for a while--the ship will have internet, but I've heard it could be as much as $9/minute.Just checking in with everyone, see how Trap's doing. I'll be back home on the 29th. Oh, I'm also using a Spanish keyboard so it's really easy to do accents and ?'s and stuff, but most everything else is moved around (It's still pretty much a qwerty, though).See/talk to/type to you all later.-b7


  6. Finally figured it out, it was a combination of things. First, when I originally had it as an associative array, I used the right column but forgot to have stripslashes. Then, I used a numeric array I forgot that it starts at 0 and used the actual column number instead of what it should've been in the array. Thanks for the echo idea, haron.Unfortunately, it still doesn't work. At the end, I have it to set the variable $loggedin to 1, then at the top I have it check if $loggedin is 1, and if it is to start the session. I don't think it's doing anything, though. I'd use cookies, but I don't know how to set it to die when the browser is closed, and cookies also have to be at the top.


  7. I don't know what's going wrong here, but it's probably a typo:

    $iusername = $_POST['username'];	$ipassword = stripslashes($_POST['password']);	include "opendatabase.php";	opendatabase();	$userrow = mysql_query("SELECT * FROM `users` WHERE `username`='$iusername' LIMIT 1;");	$userarr = mysql_fetch_array($userrow);	$ipassword = md5($ipassword);	if($ipassword != $userarr[3])	{  echo "<div class=\"err\">Error: Incorrect username/password combination.</div>";  exit("</BODY></HTML>");	}	mysql_close();
    That's not all of it, but the rest is just to check if they hit login or were logged in successfully.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.