Jump to content

therocker

Members
  • Posts

    38
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

therocker's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Who said anything about DevShed? Obviously your feelings still hurt, that's why you mentioned it when all I said was your argument is flawed because the forum you moderate blocks proxy servers which you so apparently and strongly have feelings for yet you do nothing in your moderating power to up-hold your flawed argument. Obviously people in the "guru" group of this website/forum can moderate, move, and approve things. This also means approving proxy users which makes your argument flawed because you so strongly suggest that blocking IP Addresses are a bad idea yet you're using a forum that does exactly that. In fact, that actually makes your argument uber weak to the point where there are no more points to give out. You might want to make sure your argument isn't so flawed the next time you start an arguement about security. All you talk about is security yet you do the opposite of what you always say. No one on DevShed nor on PHP Freaks wants to argue with you because they're so god damn scared, but I'm not because you're a troll who wants attention. And giving out horrible garbage advice makes it no different than if you were on DevShed. Heck, I'd like to see this come up in one of your topics again. Wouldn't be suprised if this happened on this forum as well.
  2. He doesn't need to nor remake it. Instead of preaching to the choir, why not go and bust down doors on 3rd party scripts/libraries like IPBoard on this subject? Why repeat yourself to people who are just beginning PHP? You're preaching to people who know nothing yet. It'll just go from one ear and out the other. And I'm pretty sure you can modify parts of IPBoard to allow proxy users. I mean if I was going to preach about something, I'd make sure everything I say isn't going to have a flaw. Since the forum we are using now blocks proxy users, the argument is flawed because you should be doing everything in your power to allow everyone in as you keep telling yourself that.
  3. You keep telling yourself that, but this forum does exactly the same thing you are trying to prevent. So that's actually really uber hypocritical for you saying that since you are in a group that allows you to moderate and approve things. I can't even make a new account using Tor on this forum and you sit there and say that "it's a bad idea to lock out (LEGITIMATE) users" when they share a proxy server. Before you start going on about "security" like you always do, you should make sure the forum you are using and are on doesn't do exactly what you are trying to say because that's already a big no no and no "legitimate" user should listen to that kind of garbage.
  4. Strider64 has a point. There are 2 things that is wrong with this. 1. You are using the old MySQL library. I don't know how you're doing your codes, but you should start using PDO or MySQLi. 2. You haven't shown any of your code which doesn't help with anything. You don't need to be a PHP moderate to know these things. You just need common sense. How is someone going to help you if you don't show them what you need help on? Example. If I tell someone I need help on with my Science homework and I just tell them that and they ask me "Well, show me." And I don't show anything. How are they going to help me?
  5. You're going to have to do a lot of work. But let's start off with this first. I turned your code into $mysqli and I tested it and I found that $row doesn't exist in the while. Where is it coming from? Also you should never echo out your errors. It should only be used during your debugging process. Otherwise, you should never put it live.
  6. Try putting this in front of your first <?php <?php ob_start(); ?> And this at the end of your entire code. <?php ob_flush(); ?>
  7. If he wants to store people's credit cards and what not, it's up to him. He has to keep things confidential if he wants to store sensitive information like that. What if he was making an online shop? What if he was storing client information so he can show them to his clients in a later time? You can't just say "Hey, I deem this idea or this way wrong so I want you to stop because I'm working on one myself." A forum is there to help others learn and code better with the codes that they have provided, it is NOT there to be critiqued. If a person wants their codes critiqued, it would be in the title "CRITIQUE MY CODE". You remind me of someone who's on a dying forum on a different website. He basically called every single person's code crap even though he knows that the people have just signed up on their website. And I wonder why the forum community on the website he uses is dying. Now back to the OP, the technique is called Exploding and Imploding. When you explode, you're basically splitting the data into arrays. When you implode, you're combining the data back. The "vertical lines" are actually called pipelines. A lot of suggestions would tell you to just use new rows and columns because storing data in one column isn't good. You're better off having a table like CREATE TABLE IF NOT EXISTS `credential` ( `id` int(11) NOT NULL AUTO_INCREMENT, `first_name` varchar(255) NOT NULL, `last_name` varchar(255) NOT NULL, `street` varchar(255) NOT NULL, `city` varchar(255) NOT NULL, `province` varchar(255) NOT NULL, `postal_code` int(11) NOT NULL, `card_nomber` text NOT NULL, `card_cvv2` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; INSERT INTO `credential` (`id`, `first_name`, `last_name`, `street`, `city`, `province`, `postal_code`, `card_nomber`, `card_cvv2`) VALUES (1, 'John', 'Doe', '222 Thames Way', 'City', 'ON', 123456, '4512121214147878', 456); This is much easier because you can specify which column or row you want to select. Example: You have about 10 customers, each with different names. But you only want John Doe's, you can use SQL and do something like $first_name = "John"; $last_name = "Doe"; $query = mysqli_query("SELECT first_name, last_name FROM credential WHERE first_name = '$first_name' AND last_name = '$last_name' LIMIT 1");
  8. Actually.. It is possible to change to anything since I'm just testing on my localhost, but would I change it because someone said it was wrong? And I'm not getting defensive. I'm actually stating facts that backup the reason behind me using timestamp. I honestly don't care which time format you use. Just don't say what kicken said to me.
  9. So you're saying when timestamp converted to this it means that it's super harder to read than datetime? <?php $timestamp = 1391141472; echo date('l, F jS, Y', $timestamp); ?> The output of this gives you "Thursday, January 30th, 2014". That's hard to read? Let's say you don't feel like going into the database every 10 seconds. Let's say you output this one to what I have and let's say you keep the datetime since you say it's readable. Is Thursday, January 30th, 2014 more readable than 2014-30-01 What if someone's dyslexic? All in all, it just depends on which one you prefer most. I like timestamp more since it's user friendly to me so I'm just going to keep it that way. You can't command me to change my time because you don't like the way I'm inserting my data. All I commented on was datetime looked weird and that's why I don't use it. I'm not saying "Hey, I'm a fan of timestamp and all those people who uses datetime are stupid." No, I'm just simply saying that it looks weird so I don't use it. Not just that. To see a current file with updates what do you normally do? You would normally have something like this. style.css But what if you made a change in that file and only the people who refreshes the page 2 times in a row can see that change? How about an image? What if someone changed their avatar, will anyone else see the newest one they've uploaded? And when I say refresh, I'm not talking about hitting that reload button up in your address bar. That won't do a thing. But I mean manually right click and hitting "refresh" or "reload". That's why you should use timestamp to do this. style.css?<?php echo time(); ?> That will give you the current updated version of that style. People don't have to refresh the page twice just to see a new style. People don't need to wait until tomorrow to see someone's new avatar. If you add in timestamp, you automatically see it in that second they change it. That is why I use timestamp in my codes and if you guys don't like it. Fine. I'm not going to change my code because you guys don't like it. I'm just asking for help for the 5 seconds and I only commented on why I don't use datetime instead. I didn't say that timestamp was better.
  10. I don't intend to use timestamp for people's birthdays and there are plenty of ways to store birthdays. The way I'm using timestamp isn't for birthdays. I'm using timestamp for people's posts. I store birthdays by using 3 different columns. 1 column is varchar and the other 2 is int. For the varchar, it's the actual month. Let's say someone's birthday is September 31st, 1930. Give them a drop down list and insert September in varchar, 31 in int and 1930 in int. Now let's say what if someone was brilliant and tried to alter that and let's say they tried to insert something like "I hacked your website." Then validate that in an if statement to check if the value exists in the array and if it doesn't, then don't allow any kind of inserting at all and send them to a different page to warn them. Array could be array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December') That's what I would do with Birthdays. But based on my code, I'm using timestamp as a method of allowing people to create posts that will tell people how old the post is. I don't intend on using timestamp as birthdays.
  11. Well yeah. I was only commenting that there are more than 1 way to store time, but a few of them don't look nice. I didn't mean storing datetime as timestamp. In my code I was trying to call a message that is 5 seconds or less old. The timestamp determines if the message should receive a colored CSS or if it shouldn't. All message are then pushed down that aren't 5 seconds old. All of the records are displayed, but the records that are fairly new will be given a CSS. That's why I wanted to use 5 seconds. I'm not saying that the datetime is a bad way. I'm just saying personally I don't like it.
  12. Agreed. I started PHP when I was in High School and I did recall asking for codes on here once, but that was when I was stupid. Now I'm learning everything by myself and I know a lot more. Learning by yourself and getting errors then asking for help will help you improve. If you just ask for the codes straight forward, you won't learn a single thing. If you say "I'm a beginner, I'm a nub". That's no excuse. I too was a noob and left this forum for a year or so and came back knowing a few more than I did back then.
  13. Ok thanks. Now it starts to make sense. I don't like to use the date one because it's a bit weird. I typically use timestamps because you can customize the date and time and stuff. The structure of the date one is a bit weird too. It's like year-date-month-hours-minutes-seconds. The format of that already throws people off. When you use timestamp, you can basically specify a specific thing that you want whether it'd be just the year itself or the date itself. It's easier that way. But yeah. I was thinking 60*60*5, but then I thought 5 should equal 5 hours because 24 equals 24 hours. So I had to ask here to clarify how to properly stamp it out. Now I know how it's done.
  14. Thanks adam_bray, that solved it. taquitosensei, comparing it like this? <?php $timestamp1 = $row['timestamp']; $timestamp2 = time(); if(($timestamp2-$timestamp1) < 5) { echo "Less than 5 seconds"; } else { echo "More than 5 seconds"; } ?>
×
×
  • 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.