beeseven
Members-
Content Count
628 -
Joined
-
Last visited
Everything posted by beeseven
-
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.
-
<? Include ?> <iframe/> This could save me tons of time
beeseven replied to Joshthegreat's topic in Programming
I'm not sure I entirely understand what you're saying, but what if you made a table or something similar then included the stuff in there? <table> <tr> <td> something </td> <td> <?php include 'file.ext'; ?> </td>etc... -
The same way you do in a post. Type the code or go to Smilies and click on one.
-
First, Java != Javascript. Second, PHP is the best language for dealing with mySQL and it's also really easy to learn. php.net is a really good resource, and there are some tutorials here in the tutorial section.
-
Ah, I figured it out. It was my poor programming at work again. I had htmlspecialchars going, but I didn't set it to escape single quotes, too. It just didn't like it because of the quote.
-
On the forum I'm making, it won't take the posts and write them to the database. It did a little while ago, but it's not now. I'm pretty sure I didn't change anything since it worked, and I've looked over it again and it looks right.
-
Is anyone else having trouble with mySQL right now? I can't get it to store information. It was working a few hours ago, and I don't think I changed anything with my code.
-
Writing To Database Problem With Mysql - Not Writing Forum Post
beeseven replied to beeseven's topic in Programming
I figured it out! I feel pround now (and a bit nerdy). The problem had to do with refreshing variables or something similar. I just had it store the message as a session variable, and then it was available to the second part to write to the database. Thanks mobious for figuring out it wasn't a mySQL problem. -
I like them, but I haven't heard many of their songs. My favorites of what I've heard are probably Immigrant Song, Achilles Last Stand, and Kashmir. Do you have any recommendations?
-
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 databaseI'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.
-
I'm not sure if it's supposed to be, but the picture on the top left of php.net changed to a dog instead of the PHP logo.
-
Yeah, somebody told me that the joke was first on the "In the news" section, so when I got there and saw "Pope John Paul II (pictured) is on the verge of death as a result of his recent health problems." I thought "wow, that's a really sick joke"
-
A lot of websites do April Fools jokes, let's make a collection of them: Google (Google Gulp) Gmail (Infinity+1 MB storage)Maddox (Xanga) Homestarrunner (Pay site) GameFAQs Boards (Admins and Mods banned) I can't think of any others right now, what do you all have?
-
New Custom Bbcodes For This Board
beeseven replied to miCRoSCoPiC^eaRthLinG's topic in Alerts, News & Announcements
I just noticed a glitch or something similar--If there are multiple notes on a page and you try to collapse the second, the first collapses and the second stays open. Don't think that this is too important but it's something that could be fixed. -
Why do I think 250WPM isn't accurate? Maybe because you'd be like the best secretary in the world.
-
New Custom Bbcodes For This Board
beeseven replied to miCRoSCoPiC^eaRthLinG's topic in Alerts, News & Announcements
Maybe a spoiler tag for game boards? I'm not sure if there already is one, but if not it could be like SPOILER: Like this, maybe then when you hover over it it turns normal color. (if you're wondering if it really is a spolier, it just says "Like this, maybe") -
?hola, Estoy En Ecuador! (Hello, Im in Ecuador)
beeseven replied to beeseven's topic in General Discussion
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 -
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
-
Would it be possible to "shut down" my site for a while? I probably won't have access to a computer, and if I do, it'll be about $9 USD/minute. I won't be able to do anything to my site, and there are at most 4 people who have ever gone there, so would it be possible to just take it down for a while?
-
I looked at what I had on my school's server, and realized that it works if you just put all the code at the top instead of making it jump around. Now I just have to make something that only members can see =P
-
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.
-
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.