-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
again, you need specific things for specific situations. you say *any* condition. Well what if you got hurled into outer space? What if you are living in antarctica vs. africa? What you would need to survive depends on the situation. You have clothes and shelter on your list. In some situations, you might need them. If you are looking for being broad, then those shouldn't be on your list. Neither should fire. You can live your life eating fruits and veggies. What do you need fire for? You need water. Without water, your body ceases to function. You need food. Without food, your body ceases to function. You need air. Without air, your body ceases to function. The temperature has to be within a certain range or else you freeze or fry. The pressure being exerted on your body needs to be a certain range, or you implode or explode. Anything else is circumstantial; dependent on where exactly you're trying to survive. If you had fire, you could live in colder climates, etc...
-
echo "<b>Thankyou!</b><br><br><br>"; $cost = $_POST["cost"]; if ($cost < 0) { $msg = "Your total cost is invalid"; } else { $shipping = array(3 => 25, 4 => 50, 5 => 75, 6 => 76); foreach ($shipping as $k => $val) { if ($cost <= $val) { $cost = ($cost * 1.06) + $k; $msg = "Your total cost, plus shipping, is $$cost"; break; } // end if } // end foreach } // end if..else echo $msg;
-
you don't technically need shelter or clothing to survive. Kind of depends on where you are living... TFG: how exactly does 'survival' fall under "basic needs for survival"? That makes no sense, and the rest of your list is not necessary for survival... I think you are confusing survival with living and when I say living I think you are confusing being alive on a physical level vs. a mental/emotional level (want vs. needs). I'd say food, water and air. Unless you want to get technical and throw on temperature range, pressure, etc... but it kind of depends on where you are and what kind of stuff is available, as to what you *need* to survive. If you are in a cold area, you're going to have to have some kind of source of warmth to survive. If the only thing around is animals, you will probably need supplies to kill and cook the animals to survive. Even if you caught and killed them with your bare hands, really good possibility of dying from bacteria/disease if animal isn't cleaned/cooked.
-
echo $adj . "cat"; or echo "{$adj}cat";
-
$string = "Slither BB when you play this card, take an extra turn after this one"; preg_match('~^([^\s]*)\s([^\s]*)\s(.*)~',$string,$matches); echo "<pre>"; print_r($matches);
-
<sigh> QFT. Just because you can, doesn't mean you should. Come back with something useful kkthxbai <-- my attempt to relate to the young crowd.
-
there are a million tutorials out there showing how to format things by group. Make an effort to look for them or try on your own. We're here to help you through your coding endeavors, not write stuff for you.
-
well unless he posts what the problem is and relevant code, all I see is veiled spam.
-
The query i posted first sorts by your type_break, then by names within each type_break. So it's down to formatting the results. So in your loop that fetches the results, you would have a condition that checks if type_break changes. If it changes, start a new header.
-
so why can't you look at it to see how they did it? Or were you wanting one of us to write it for you? So what you're really saying is that you don't mind using someone else's code, as long as they specifically wrote it for you.
-
post relevant code and what it's doing that you deem to be "wrong."
-
So you want to take values from other elements, click a button, and have another element get populated with those values? Yes we heard you the first time. And the 2nd. What part of "php cannot do this" do you not understand?
-
You mean, like this? SELECT * FROM sites where type = 'bar' ORDER by type_break, name asc
-
[SOLVED] How can I process inputs if I cannot access main php script
.josh replied to docwu99's topic in PHP Coding Help
If you have proprietary code that doesn't do something basic like mysql_real_escape_string... why use it? Sounds like it either sucks or is way out-dated. But anyways, you can have the form post to your own script, do your stuff and have the script send it to this proprietary script via curl. -
You can't. php is a server-side language. It cannot dynamically change elements in a browser on a client. That's what client-side languages are for. Like javascript.
-
[SOLVED] I want PHP to count to the enterned number instead of $var++.
.josh replied to yakoup46's topic in PHP Coding Help
$x is your counter. $i is what you want to count to. At the end of your while loop, $x is incremented by 1. Your while loop ($x < $i) executes until $x counts up to whatever $i is. -
if(($subject=="") and ($message=="")) or if(($subject=="") && ($message==""))
-
[SOLVED] I want PHP to count to the enterned number instead of $var++.
.josh replied to yakoup46's topic in PHP Coding Help
so...you did this? <html> <title>File Test</title> <body> <form action="<? echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="post"> Enter Number <input type="text" name="number"> <input type="submit"> </form> <?php include("values.php"); $i = @$_POST['number']; if(empty($i)) echo "Enter Number Please"; else while($x < $i) { if($i%2==0 && $i%5==0) echo $x . $divis_2_5 ."<br />"; else if($x%2==0) echo $x . $even_number . "<br />"; else if($x%5==0) echo $x . $divis_5 . "<br />"; else echo $x . "<br />"; $x++; } ?> </body> </html> -
[SOLVED] I want PHP to count to the enterned number instead of $var++.
.josh replied to yakoup46's topic in PHP Coding Help
Okay well in the rest of your script that relied on $i being incremented before, you need to replace that with $x because that's the thing being incremented now. -
[SOLVED] I want PHP to count to the enterned number instead of $var++.
.josh replied to yakoup46's topic in PHP Coding Help
yes. But suggesting something in a different way sometimes helps. right...so you would want to count to the posted value. So unless there's something else you aren't mentioning, you would want to do the last thing I showed (or what jack showed). -
header('Location: ../install/index.php'); exit();
-
does it? I haven't really looked into IE8 all that much yet. Even if IE8 were 100% standards compliant, people will still be f'ing using ie6 and ie7 for the next 10 years.
-
[SOLVED] I want PHP to count to the enterned number instead of $var++.
.josh replied to yakoup46's topic in PHP Coding Help
so..you just want it to count from 1 to $i instead of 1 to 50? $i = $_POST['number']; while ($x < $i) { //code here $x++; } -
wouldn't hurt to just email them and ask them to arrange something for you, like said rss feed. Kind of depends on what you're wanting to do with that data. If you're planning on offering a service that would somehow generate traffic to their site or earn them money somehow, they might accommodate you. But if you're just trying to snag their data for your own profit, especially if your services involve what they are doing and you're just trying to steal their work, chances are, they will not accommodate you. In fact, they will probably sue you if they catch you doing it. Dunno who told you that lie, but that's not how copyright works. Just because I don't lock my door, doesn't mean it's suddenly legal to trespass and steal my stuff. I most certainly can go after you.
-
How to memorize the value of a variable in JavaScript ?
.josh replied to tmyonline's topic in Javascript Help
depends on how you are going from page to page. If you're clicking form submit buttons, you can populate a hidden field in the form and use js to grab it on the next page. Or if by a link, you can pass it in the url as a query string parameter and use js to grab it from the query string. Or if the user has cookies enabled, you can set a cookie and use js to grab the cookie value (as Dj Kat mentioned).