Jump to content

crossfuse

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

crossfuse's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok message me and we can do a deal ok?
  2. LMAO. It is basic math operations dude. I take it if you are taking a PHP class, you can at least do "some" PHP. But obviously you cannot read the text and have to probe for answers on forums and have people do the work for you instead of attempting to learn how to do basic PHP with BASIC math. Lazy people like you disgust me. look buddy. i have been trying ok? i'm tired of this stupid language and i have been working my butt off, and that website is thegist of what I've been trying to do. i've done my PHP work, but no one understands what i'm asking and i don't understand what they're saying and people like YOU are absolutely worthless and like talking down to people who don't understand this damn language and also people like you who 'assume' thing make an ass out of themselvesas well as me so if you aren't going to help me, don't bother.
  3. Not to mention the above takes basic 5th grade math to accomplish. oh really? what 5th grade teacher taught you PHP? yea not everyone has the brain the size of a whale
  4. this is really simple but yet i don't know how to do it...i really need the PHP code on this page http://cpsc.maconstate.edu/students/aperlman/assign7/Assignment7.html i'm not sure how to obtain it but i'm going to use it for a personal webpage of mine...someone help?
  5. um well i'm not understanding how to get the '$num' variables to work in the arrays
  6. ok let me show my code before i explain what i'm doing <html> <body> <h2 align ="center">Enter Numbers!</h2> <form method="number.php" action="post"> #1 <input type="text" size="4" maxlength="7" name="num1"><br> #2 <input type="text" size="4" maxlength="7" name="num2"><br> #3 <input type="text" size="4" maxlength="7" name="num3"><br> #4 <input type="text" size="4" maxlength="7" name="num4"><br> #5 <input type="text" size="4" maxlength="7" name="num5"><br> #6 <input type="text" size="4" maxlength="7" name="num6"><br> #7 <input type="text" size="4" maxlength="7" name="num7"><br> #8 <input type="text" size="4" maxlength="7" name="num8"><br> <br><input type="Submit" value="Submit"> <input type="Reset" value="Reset"> </form> </body> </html> <?PHP $numbers[] = '$num1'; $numbers[] = '$num2'; $numbers[] = '$num3'; $numbers[] = '$num4'; $numbers[] = '$num5'; $numbers[] = '$num6'; $numbers[] = '$num7'; $numbers[] = '$num8'; rsort($numbers); $big=max($numbers); $small=min($numbers); print ("The biggest number is $big, and the smallest number is $small."); ?> ok well i'm trying to make a form where a user can enter numbers and the numbers come out with the average of the numbers that are typed in. i can't use the array function though because some numbers may not be filled in. i feel like i'm close to building the array, but i still am not doing it right...help??
  7. how would i make that work with my code?
  8. how would i multiply 6% using a function?
  9. i would but i need to make it a function...
  10. I'm trying to make a function to add 6% tax to the total cost which the user can type in the cost of an item. The outcome is supposed to include the shipping as well (which I've done),but using variables isn't my forte. I understand the concept of them but here's what I got so far. http://cpsc.maconstate.edu/students/justin.ham/cost.html <?php print("<b>Thankyou!</b><br><br><br>"); $cost = $_POST["cost"]; $cost1 = $cost + 3; $cost2 = $cost + 4; $cost3 = $cost + 5; $cost4 = $cost + 6; if ($cost < 0) { print("Your total cost is invalid"); } elseif ($cost <= 25) { print("Your total cost,plus shipping, is $$cost1"); } elseif ($cost <= 50) { print("Your total cost,plus shipping, is $$cost2"); } elseif ($cost <= 75) { print("Your total cost,plus shipping, is $$cost3"); } elseif ($cost > 75) { print("Your total cost,plus shipping, is $$cost4"); } ?> do i insert a function before the 'if' statement and what exactly would i put?
  11. am i on the right track? Html <code> <html> <body> <h2 align="center">Find the sum and square of a number</h1> <form action="square.php" method="post"> <br> Odd number: <input type="text" size="4" maxlength="7" name="num"> <br><input type="Submit" value="Submit"> <input type="Reset" value="Reset"> <br><br> </form> </body> </html> [/code] PHP file <html> <body> <?php $num = $_POST["num"]; $number2 = (1) ; $sum = ($num + $number2) ; print("<br> The number plus 1 is $sum"); ?> <br><br> <font size="4" color="blue"> Table of Square Values</font><br> <table border= "1"> <th> Number</th><th>Sqr </th> <?php $end = $num while ($i <= $end) { $sqr= $i * $i print ("<tr><td>$i</td><td>$sqr</td></tr>"); $i = $i + 2; } ?> </body> </html>
  12. I was given this assignment in my PHP class. "Write PHP scripts that: 1. Adds up the odd numbers beginning with 1 up to and including a positive odd number that the user inputs into an HTML form type text box. This Sum will be printed. 2. Makes and prints a table containing the above odd numbers in the first column and beside each number in the 2nd column, put the square of the number. There should be two files, an html form that allows the user to enter the max number in an text box. The second is a php file that receives the number and performs the above two tasks." All i need to know is what to do in the html file, not the second part.
  13. ok that looks about, but something's still wrong...i get this error: Parse error: syntax error, unexpected T_FOR in /usr/local/www/cpsc/students/justin.ham/square.php on line 26 http://cpsc.maconstate.edu/students/justin.ham/square.html that's the website i have and here's the PHP code for receiving. <html> <body> <?php $number = $_POST["number"]; $number2 = (1) ; $sum = ($number + $number2) ; print("<br> The number plus 1 is $sum"); ?> <br><br> <font size="4" color="blue"> Table of Square Values</font><br> <table border= 1> <th> Number</th><th>Sqr </th> <?php $max=$number for($i = 0; $i < $max; ++$i){ echo "<input type='text' name='data[]' /><br />"; } ?> </body> </html> i really have no clue how to make this work...
  14. http://cpsc.maconstate.edu/1010/chapter3/drivecube.php i'm trying to make a site like this for my php program but with a textbox instead where you can type in numbers...i know it includes this code: ------------------------------ for ( $i = 0; $i < $max; $i++ ) { Set of statements to repeat } and while ($ctr < $max) { Set of statements to repeat } ------------------ i'm a newb so if i could get some help i would appreciate it
  15. Awesome! That actually WORKED!! lol Thanks buddy
×
×
  • 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.