- Active Posts:
- 392 (0.34 per day)
- Most Active In:
- General Discussion (87 posts)
- 24-March 10
- Profile Views:
- Last Active:
- Today, 02:02 AM
- 19 years old
- September 9, 1993
Posts I've Made
22 May 2013 - 03:17 PMWelcome to the Refinery!
15 May 2013 - 12:12 AMGet shell access and symlink images/ to img/
Haha yeah at this point, it looks hopeless. At least this would ensure that no matter what he did it would find the right path to the images.
QuoteThe images folder needs to be called "img" in order for the images to load on your website. If you change the "img" folder to "images", your website will not be able to find your pictures since the location of your images is now in a place that it doesn't know about.
Maybe he'd understand that?
13 May 2013 - 04:30 PM... This is like the fourth thread...
I used the search at the bottom of the page for "fast type" since 3 letter words are limited and I also did a google search of "how fast can you type site:webdevrefinery.com" and didn't come back with any relevant results.
Now granted I could have gone through every crevice on the site but after the 3rd page back or so on the General Discussion forum, I'd assume it was relatively safe to post the thread.
Anyway, do you mind sharing your typing speed for the 5th time if it isn't too much of a redundancy?
Yeah, this has already been posted tons of times.
But anyway, these "typing tests" don't mean anything -- I can average 100 WPM, but I never actually type that fast when working. Take this very post I'm writing; I have to think about each word I'm going to write, think about how my sentence will go, etc. Sure, I can type pretty fast when I'm just given a list of things that I have to copy, but that's rarely the case.
This would just be purely for typing speed. It isn't a measure of how fast you can think up of a logical thing to type and post. It is just for a quick statistic of how fast you can physically type compared to others that are under the same variables and situation.
13 May 2013 - 01:52 PMIt'd be funny if it was an actual message Easter Egg that the show included
10 May 2013 - 09:38 AMOk so here's the deal. I want to be able to have an input box that I can type in how much money I have in my bank account. Then I want 3 checkboxes to be assigned a value that if the any box is checked then subtract the value of the checked boxes from the input amount.
input box - 300
box 1 (checked) - 129
box 2 (checked) - 142
box 3 (unchecked) - 140
result - 29
If that doesn't make sense then I can give another example but anything will help. I'm trying to have a better understanding of php so example code would be great and an explanation to how it works would be amazing. Thank you.
So for your client side HTML code, you'd have something like this
<html> <head> </head> <body> <div align="center"> <form action="calculate.php" method="POST"> Initial Amount $<input type="text" name="initial" value="300"><br> <input type="checkbox" name="box1" value="129">Subtract 129<br> <input type="checkbox" name="box2" value="142">Subtract 142<br> <input type="checkbox" name="box3" value="140">Subtract 140<br> <input type="submit" value="Calculate"> </form> </div> </body> </html>
Basically all I have set up here is a form that is centered with the 3 checkboxes and an initial amount of money that can be entered.
For the PHP backend
<?php // Opening tag to say that document is PHP // For all of the variables below, we get the values of the form using the global $_POST variable since POST was the method in our form. // Also, the name inside of the $_POST[''] is the same as the name of the input boxes in the form. // Get the value of the initial amount from submitted form $initial = $_POST['initial']; // Get the values of the boxes from the form $box1 = $_POST['box1']; $box2 = $_POST['box2']; $box3 = $_POST['box3']; // Perform subtraction operations $result = $initial - $box1 - $box2 - $box3; // Output the result echo $result; ?>
I have to leave for a class exam soon so I didn't include any extra error checking or neatness but this will get the job done.
Basically, if you follow along with my comments, this will get the initial cost that the user inputted. If the user selected a box on the form, then the values of the corresponding box# will hold the value that the input said it holds.
<input type="checkbox" name="box1" value="129">would be
$box1 = $_POST['box1']and it would hold the value
Hope this explains it. If you have any questions, feel free to ask away. Got to go tackle this Calculus exam now