-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
convert it to unix timestamp format and just do a regular comparison. look at the mktime function
-
Multiple values from a database function [Solveded]
.josh replied to seran128's topic in PHP Coding Help
are you sure your query is returning a result? are you getting an error message of some kind? -
yeah that's why it's so shady. Sony is claiming that they are concerned about compatability. Since they themselves aren't the ones shipping out the japanese console with the european transformer, they can't be sure that this 3rd party is actually doing it, or whatever. What happens if a european receives this package and the console fries due to defective converter or something? Should Sony be held liable? Sure, it's a sony product working with a sony product, but sony did not package these 2 products together, nor condone them being packaged together. I can understand and agree with Sony's arguments. But I do not think that these concerns warranted shutting down a business. Especially when it's obvious that this was the strawman argument they were using, to hide their real intentions of hurting their advertising schedules, which would not hold up in court.
-
Multiple values from a database function [Solveded]
.josh replied to seran128's topic in PHP Coding Help
(altered code) adminfunctions.php [code] <?php require("connection.php"); function geteditcontent($inTable,$inId){ $sql="select * from $inTable where regionId='$inId'"; $result=mysql_query($sql,$connection) or die(mysql_error()); while($row=mysql_fetch_array($result)) { $info[] = $row; } return $info; } ?> [/code] listcontent.php [code] <?php include("../include/adminfunctions.php"); $fa =$_POST["fa"]; $id=$_POST["ItemId"]; $info = geteditcontent("webcontent_regions","$id"); ?> <form name="example" id="example" method="post" action="../include/formsubmit.php?mode=content"> <input type="hidden" name="id" value="<? echo $id; ?>" /> <div align="left"> <table width="100%" border="0"> <tr> <td colspan="2" class="ListTableHeader" ><div align="center"><strong>Update Content</strong></div></td> </tr> <tr> <td class="Results" >Region Id:<? echo $id ?> <div align="left"></div> Region Description:<? echo $info[0]['description'] ?> <div align="left"></div></td> </tr> <tr> <td> <textarea id="textarea1" name="test1" style="height: 100%; width: 100%;"><? echo $info[0]['content'] ?> </textarea></td> </tr> </table> <input type="submit" name="Submit" value="Save Content"> <input type="button" name="btnCancel" value="Cancel" onclick="JavaScript:history.back()" > </div> </form>[/code] if you are expecting only one row returned, then you can change your function. remove the [] from $info (or just return $row instead of $info) and then in your form do $info['description'] instead of $info[0]['description'] etc.. -
[quote author=j3rmain3 link=topic=112812.msg458022#msg458022 date=1161877471] [b]echo "<a href=http://".$row[1].">".$row['3'].";[/b] [b]But this doesnt change the last section of the url, it just changes the whole url. [/quote] that's because you've done http://$variable not http://www.yoursite.com/whatever/$variable
-
Two part Question.. Ethics and International Law..
.josh replied to tomfmason's topic in Miscellaneous
Okay the first thing you need to do is use that securi<ack!> mmff mmmf! <gets dragged away by the french secret service> -
FYI, that's not 100% reliable. people can hide their ip address or change it.
-
or maybe market your crap in a fashion where everything is released at the same time, or close enough to where it doesn't matter, or where varied release dates are a non-issue, or SOMETHING. And instead of trying to shut someone down over it, how about making a converter and selling THAT. Or maybe make different region products available on your OWN website and make money off that, instead of someone else doing it for you. SOMETHING. Seriously, Sony needs to just go ahead and commit hari kari over this shameful thing they have done.
-
okay first of all: [quote] if you use the above defult then your be adding a count of 1 to the stats table but if you added 100 to the stats table and used A - YOUR BE DEDUCTING FROM 100 OK. [/quote] that makes absolutely no sense at all. I [i]think[/i] you are giving an example of an alternate way to keep track, like counting up vs. counting down? 2nd, Can you please explain to me how your code has anything to do with sessions? I mean, I can sorta kinda see that you are providing an example of listing the id's for the links, but I fail to see how that's even remotely necessary? I would assume that one would do a query of some kind to get the id numbers, creating the links in a loop, or some other such similar fashion. I don't really see the point in carrying over the list of IDs in a session. I hope that you are not trying to say that $_GET variables are session variables..
-
Well I will agree that they [i]probably[/i] bought it for investigative purposes. I mean come on, you would think that the CEOs of Sony would be able to get one for free from themselves if they wanted on for the entertainment. On the other hand...one would think that in an 'investigation,' they would have had some peon order it, not themselves personally.. But still...that's just messed up. And lame. "we're concerned about voltage incompatability" wtf is that? That's shady, is what that is. I understand that Sony has this big marketing plan as far as releasing things at specific times in specific places blah blah blah but to shut down a business simply because of something like this...shady. And quite frankly, I don't even agree with the ruling at all. Judge was obviously in Sony's pocket. Once you buy something, it's yours. You can re-sell it to whoever you want. I think the only stipulation on that is that you can't sell it for more than the current retail price from the manufacturer or something. That's how it is in the states, anyways. I guess they might do it different overseas. But that's still lame. It shouldn't be that way. Instead of going around bullying people, maybe Sony should come up with a more effective marketing plan that takes into consideration the fact that people buy and sell things online worldwide. To me, this is a case of Sony not getting with the new world trend. Not even new.
-
gah! must..turn off..cheezy music..! other than that, I am finding chip's challenge entertaining!
-
umm..what state do you live in? well you don't really have to answer that. I just thought that medicaid only covered children and (pregnant) women? And anyways, I hate to say it, but someone needs to (your mom or your dad, your wife, etc.. would be better), but you just posted earlier today in another thread about buying hundreds of dollars in video games last week, and how nothing stands between you and your video games. Maybe if you re-organized your priorities, you'd be able to figure something out.
-
okay that whole limit 1 thing is debatable, but breaking out of the string and concactonating the variable to it like that is totally unecessary. and again, the backticks aren't necessary unless you are naming your tables and fields names that are reserved words..which is bad coding practice in the first place.
-
query runs successfully but reports a mysql error.....? *SOLVED*
.josh replied to sambib's topic in PHP Coding Help
okay if (@mysql_query($query)) { you are trying to run a query on a result source. should change that to $sql not $query. but you're still running the same query twice. just get rid of the previous one. -
query runs successfully but reports a mysql error.....? *SOLVED*
.josh replied to sambib's topic in PHP Coding Help
well you've only shown 1 query in your code above which drops it. where's the part that recreates it and stuff? also, in the code above, you're actually running your drop table query twice. since you don't have an 'if exists' in your query, that might actually be where your error is coming from, as it is trying to drop something that doesn't exist, the 2nd time around. -
Okay there's this certain game that i've played. It's come in different forms, but the principle is the same. One of the versions I played was you were this guy and you had to push blocks around on the screen and had to get them positioned on the screen a certain way in order to clear a path to the door. Another variation I played was on a cell phone with sheep, where they were positioned a certain way on the screen and you had to move them around and get them all in a certain place. The challenge was that unless you like, moved them a certain way, you get screwed, for instance, you can't pull the block out of the corner or something. Does anybody have any idea what I'm talking about here? I'm trying to figure out if there is an official name for these games or happens to know of a game like that. I'm bored and want to play it but I can't google it cuz I can't figure out what keyword(s) to search for.
-
[code] if ($score <= 3){ $image1 = "<img src = 'images/0-3.jpg'>"; } else if (($score >= 4) && ($score <= 7)){ $image2 = "<img src = 'images/4-7.jpg'>"; } else (($score >= 8) && ($score <= 10)){ $image3 = "<img src = 'images/8-10.jpg'>"; } [/code] or... [code] switch ($score) { case >= 8 : $image3 = "<img src = 'images/8-10.jpg'>"; break; case >= 4 : $image2 = "<img src = 'images/4-7.jpg'>"; break; case <= 3 : $image1 = "<img src = 'images/0-3.jpg'>"; break; } [/code] although i'm not sure i understand your logic here.. I mean, you have 3 different variables (image1,image2, image3) and depending on what score is, one of those 3 get changed. Are you going to later on check which one exists or something? I suppose that's all up to you on what you're doing. It just seemed odd to me..
-
first off, you query has some quotes in there that shouldn't be in there. Don't put quotes around table or field names. Use backticks ` ` if you want, though it's not necessary unless you are using reserved words as names (which you shouldn't do in the first place). It should look like this: [code] $sql = "UPDATE phpbb_users SET user_points = '$after_bet_points' WHERE username = 'kevloink'"; [/code] 2nd, as mentioned above: all you have shown is the query string. Where do you connect to your database? Where do you actually perform the query?
-
you would make a link to a page and the link would have an id pass to it. You would then update a field in your database based on the id and then output the filename based on the id.
-
query runs successfully but reports a mysql error.....? *SOLVED*
.josh replied to sambib's topic in PHP Coding Help
...and there are no other queries running in your script anywhere? -
form script doesn't show any errors but doesn't work either
.josh replied to simcoweb's topic in PHP Coding Help
what about before you added that session_register stuff -
form script doesn't show any errors but doesn't work either
.josh replied to simcoweb's topic in PHP Coding Help
umm i think that's more of a bandaid than a fix... echo out $match see if it contains something -
did your host change ip addresses or dns servers? you may need to update where your domain name is pointing to.