-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
Having a portfolio counts more than having a certain "level" of understanding. Learn the basics through tutorials/books/looking in the manual. Go to freelancer type sites and look at what kind of jobs/projects are posted. Read the description. If you feel you can handle it, put a bid on it. If you feel you can't, then read some more tutorials and books and stuff. Or maybe take one of those postings on as a personal project to learn on. That is, you don't post a bid, but decide hey, people are asking for things like shopping carts, etc.. so why don't I try to make one myself? Go back and read more postings. Maybe you'll find one you feel you can do. Wash rinse, and repeat. Eventually you will feel up to the task to bid on something for real. Bid on it. Do it. Add it to your portfolio. Make a website offering your services, showcasing your portfolio. Come to places like phpfreaks.com and help out. Help answer people's questions. Focus on the ones you know, to keep your skills sharp. Focus on the ones you don't know so you can learn something. Write tutorials. Write articles. Write a blog about things. Post them on your site. Submit them to others. All these things are what you would list on your resume to employers.
-
Disclaimers and policies are only as good as someone's ability to write them, even if the person writing it is a lawyer. You could go retain a lawyer and he could write down the exact same thing as what you found online, or even write one from scratch that's worse than what you found online. The only difference between hiring a lawyer and using something someone posted, is that you can't sue your own lawyer if it doesn't hold up in court. But then, you can't sue anybody from getting it off the internet, either, because a) more than likely you won't be able to prove who actually wrote it, and b) virtually all of them are posted with a disclaimer about it already, just like you do with your code. We have a lot of professional coders helping out for free around here. We supply articles, tutorials, pieces of code, advice, tech support, etc.. to help people out. We do it on our own time, for free. People are welcome to come here and use us as a resource, but they cannot hold us responsible if something goes wrong, because we have signed no contract with them. The content is provided as is, without warranty, etc.. just like the disclaimers you read from the legal places. It's just like when you write a piece of code for someone and you know it works but you put a disclaimer on it anyway, because you don't want to be held responsible if somebody manages to hack it. Technologies change. You can't guarantee things to be 100% secure. Ever. Basically what the disclaimers from "free resources" are really telling you is that nothing is perfect, and even if the policy is bulletproof, they're still not going to back you up, because the bottom line is they gave it to you for free, on their own time. If you want them to back you up, then pay for their services. The problem is not that they think the policy/disclaimer sucks: it's that they won't defend it unless you pay them to do so. Might makes right. Survival of the fittest. Those are idioms that our society of equality tries day in and day out to prove wrong in the real world. But online, this is one of the most truest phrases of all. Why do you think open source projects are the most stable and innovative out there? Websites and products and services and pieces of code and blocks of legal text all hold true by virtue of being scrutinized by the masses. They are either held up, passed around and used because they are strong, or they are laughed at and shoved under the eCarpet because they are weak. Looking on the internet is likely to produce a more solid privacy policy, because the people (even the lawyers) who know what stands the most chance of something online holding up in real life court, are probably the same people who wrote the ones you found online in the first place. In addition to that, you potentially have hundreds and thousands and millions of people of varying degrees of skill reading and scrutinizing it. How many people check over your policy if you go to a lawyer? Just him? Maybe some other people in his firm? Maybe he'll post it online in some lawyer forum he frequents, looking for advice, probably to be answered by the same people who wrote the ones you googled? The fact is, most lawyers don't really know a whole lot of "online" laws, or how laws apply to "online" content. If you walk into a lawyer's office and ask for a policy/disclaimer, he'll promptly go pick up a book and get online and start reading and researching, just like you would have. Only you get to pay him lots of money to do it. So why pay him to do the research you've already done? You do know that if a legal issue comes up, you can always go to a lawyer with your policy/disclaimer just the same, right? He'll be more than happy to defend it best as he knows how, and he'll be more than happy to tell you that winning is not guaranteed (he'd tell you the same exact thing even if he wrote it himself), and he'd be just as untouchable if you lose. I think your biggest problem here is thinking about it in abstract terms, making it out to be a much bigger deal than it really is. Let's face it: even though millions of people go online for something or other, the truth is, very little online activity is actually taken to court. 99% of disputes are handled outside of court. Disputes between two 'customers' are handled by the company. Or if it's you against a company, 9/10 times you just call up your credit card company to stop payment. Failing that, you're usually fucked and end up fighting back by making some hate blog or posting on one of those ripoffreport.com type places, trying to blacklist the company. In today's society, people measure "rightness" by how much money you're making. Why do you think "the customer is always right" came about? As a company, it doesn't matter how "right" you are. The customer could be a complete jackass and totally in the wrong, but you have to decide to either do what it takes to make them happy, or tell them to fuck off and let them tell their friends never to go to your business again. At the end of the day, which one yields more money? Personally, I would tell the customer to fuck off. But then, that's why I'll probably never have a multi-million dollar company. Or even a multi-thousand dollar company, lol. So here's the bottom line: If I were in your shoes, I would look around on the internet for a good policy/disclaimer. There are tons and tons of resources out there. Find one that sounds about right for you, write down what exactly it is your site/service is doing, and post that and your disclaimer on the free legal advice forums. Post it on several. A dozen, even. People are more than happy to put their 2 cents in. They'll offer some edited versions, tell you it's good, tell you it sucks. But there will always be a prevailing 'opinion.' Go with that. If for some reason you run into some kind of legal issue, try to resolve it yourself. If you can't make the person happy or at least tell them if they don't like it then fuck off, then hire a lawyer to defend you. Because I promise you, whether you had hired a lawyer to write it in the first place or not, you would have ended up in that mess, regardless.
-
use a bigger char type like blob or longblob
-
okay well I really have no idea what you're talking about because every time you post you have some new piece of code and it seems like you're on an entirely different issue... but anyways, the difference between = and == is that = is an assignment operator, as in you want to assign something to a variable. == is a condition operator, as in, you want to compare two things.
-
Think this is the right section - Someone explain whats going on?
.josh replied to xoligy's topic in PHP Coding Help
randomly found a php script on your hard drive huh... -
remove the single quotes while ($getUpdates = mysql_fetch_array($findUpdates)) { putting single quotes around that causes you to assign a literally interpreted string to $getUpdates, and as long as php successfully assigns it (which there's really no way it won't fail to assign it unless some meteor crashes into the server or something), your loop will always be true and you'll have an infinite loop.
-
no actually you'd do just one query. Look into relational databases and doing queries with JOIN.
-
I almost mentioned that but then I just figured he put something generic in there like most people do with host/name/pw when showing code.
-
$sql=mysql_query("SELECT teams.teamName, teams.Points, contacts.division FROM teams LEFT JOIN contacts ON teams.teamName = contacts.teamName WHERE contacts.division=1 "); while($row=mysql_fetch_array($sql)) { echo "Team: " . $row['teamName'] . " Points: " . $row['Points'] . "<br />"; } the mysql_fetch_array fetches the data 1 row at a time, assigning that row as an array to $row. You access each element by using the column names. Each time mysql_fetch_array is called, an internal pointer points to the next row. When there's no more rows, the loop ends.
-
Well your 2nd query doesn't have quotes of any kind...
-
if ($Submit2) should be if ($_POST['submit2'])
-
some server setups have prefixes added to user names and database names. A common setup is for instance, if you owned www.mycoolsite.com and your assigned account name is mycoolsi that could be the prefix followed by an underscore followed by your username: mycoolsi_pcscript. same with the database name: mycoolsi_testdb. You want to talk to your host or read their documention to find out if they add some kind of prefix.
-
okay maybe I'm just being stupid and these are unrelated, but: echo '<span onclick="window.location.href=\'dt_display.php?id='.$row_DT['id'].'\'"><tr class="test colLabel RowOverOdd" onmouseover="this.className=\'RowOverSelected\';" onmouseout="this.className=\'RowOverOdd\';" width="100%">'; echo '<td width="2%" nowrap>'.$row_DT['id'].'</td>'; if($row_DT['Approved'] != 'AP'){ echo '<td width="50%" align="left" nowrap><a href="dt_display.php?id='.$row_DT['id'].'"><font color="red"><strong>'.$row_DT['Title'].' ('.$totalRows_a.') </strong></font></td>'; } elseif($datetime < $d9){ echo '<td width="50%" align="left" nowrap><a href="dt_display.php?id='.$row_DT['id'].'"><font color="orange"><strong>'.$row_DT['Title'].' ('.$totalRows_a.')</strong></font></td>'; } else{ echo '<td width="50%" align="left" nowrap><a href="dt_display.php?id='.$row_DT['id'].'"><strong>'.$row_DT['Title'].' ('.$totalRows_a.')</strong></font></td>'; } In that first code block you have an onclick in the span that calls your display.php (which inserts) and the rest of your code blocks have links that also request display.php so maybe just maybe (I don't really know jack about js, so I'm just kinda pulling shit out my ass...) when you click on one of those links, since it's inside your span tag, it's triggering the onclick as well, causing it to be executed twice?
-
sounds like a plan, so hop to it! or...did you have a problem you forgot to mention?
-
if you have a bunch of numbers you want to loop through, and one of those numbers you want to do something special with, where do you think the condition should be?
-
hmm you say your page is blank but you have stuff like echo('<table border="1">'); echo '<tr><th>Title</th><th>Author</th><th>Pages</th></tr>'; that aren't in any conditions or anything, so you should at least be seeing that. Do you have error reporting turned on? Stupid question, but your filename is *.php not like *.html right?
-
well i have no idea what the point of $val is supposed to be but if you want the "current" one not to be a link then you need a condition to see if ($i == $num)
-
are you wanting to learn how to program this or would you be happy with a prefab program? Because there are plenty of prefab photo album programs out there already, like Gallery2
-
well I think this is what you are trying to do... $num = ((int) $_GET['num']); for ($i = 1; $i < 12; $i++) { $val = ($i - 2 )* 10; if ($val != $num) { if ($i == 1) { print '<strong><a href="index.php">'.$i.'</a></strong> '; } else { print '<strong><a href="index.php?num='.$val.'&var=1">'.$i.'</a></strong> '; } } else { print $i.' '; } }
-
well, you could add a condition to check if $i == 1 and if so, build link without the added stuff, or you could just do a plain echo of it before the loop and start your loop at 2 instead of 1.
-
put backticks around desc like so `desc` the problem is that desc is a reserved word. Though I really recommend you change it to a different name instead of using backticks, as only mysql will support that. And even still, it's just bad coding to use reserved words as column names.
-
register globals on?
-
You can keep passing them through hidden vars in your next form if you want, or look into making them session vars.
-
well if it happens right at the beginning then wouldn't it be whatever happened right before that that's the culprit? (assuming it's not some bogus glitch)