Jump to content

mpharo

Members
  • Posts

    221
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mpharo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. If they are stored in 2 different databases you will need to create 2 database connections, then just deal with the arrays seperatly and compare them...
  2. I do not see the $connection variable anywhere in the scripts... you will need to use the mysql_connect() function to variable $connection...
  3. $select = mysql_query("SELECT * FROM table1"); while ($sql=mysql_fetch_array($select2)) { $select2 = mysql_query("SELECT * FROM table2 WHERE NUMBER=$sql[NUMBER]"); while($sql2=mysql_fetch_array($select2)) { echo $sql[HEADLINE] . " " . $sql2[CONTENT]; } }
  4. You will need to use stdin variables instead of post, it will not work correctly unless you use stdin...
  5. I am not sure if this was what you were looking for but... Post data is stored in an array called $_POST... You can do something like this... <?php foreach($_POST as $key=>$val) { echo "Key: $key Value: $val<br>"; } ?> This will output each post element. You can specify single post elements by a typicall array echo...ie... <?php echo $_POST['fieldname']; ?>
  6. is using a database out of the question? a query would definatly simplify this...
  7. there is a s after the closing loop bt that is out of place...
  8. Microsoft Internet Explorer (Browser) Microsoft states that the maximum length of a URL in Internet Explorer is 2,083 characters, with no more than 2,048 characters in the path portion of the URL. In my tests, attempts to use URLs longer than this produced a clear error message in Internet Explorer. Firefox (Browser) After 65,536 characters, the location bar no longer displays the URL in Windows Firefox 1.5.x. However, longer URLs will work. I stopped testing after 100,000 characters. Safari (Browser) At least 80,000 characters will work. I stopped testing after 80,000 characters. Opera (Browser) At least 190,000 characters will work. I stopped testing after 190,000 characters. Opera 9 for Windows continued to display a fully editable, copyable and pasteable URL in the location bar even at 190,000 characters. Apache (Server) My early attempts to measure the maximum URL length in web browsers bumped into a server URL length limit of approximately 4,000 characters, after which Apache produces a "413 Entity Too Large" error. I used the current up to date Apache build found in Red Hat Enterprise Linux 4. The official Apache documentation only mentions an 8,192-byte limit on an individual field in a request.
  9. and also remember average grade is calculated differently than median grade... Average sum of elements / number of elements Median Step 1: Count the total numbers given. There are 5 elements or numbers in the distribution. Step 2: Arrange the numbers in ascending order. 1,2,4,5,7 Step 3: The total elements in the distribution (5) is odd. The middle position can be calculated using the formula. (n+1)/2 So the middle position is (5+1)/2 = 6/2 = 3 The number at 3rd position is = Median = 4
  10. try this... //display all roof height vehicles when submit button isnt pressed if (!$_POST['N/ARoofHeight'] && !$_POST['Standard Roof'] && !$_POST['Medium Roof'] && !$_POST['High Roof']) { $RoofHeight = "N/A', 'Standard Roof', 'Medium Roof', 'High Roof"; } You also might want to avoid using spaces and slashes in names...
  11. Your $plusOne variable is not increasing, therefore returning the same result each time. You will need to change the +1 year to include the $l variable... <?php $y = date('Y'); $l = 1; while ($l <= 10){ ?> <option value="<?php echo $y; ?>"><?php echo $y; ?></option> <?php $plusOne = strtotime(date("Y", strtotime($y)) . " +$l years"); $y = date('Y', $plusOne); $l++; } ?>
  12. I forgot to copy for beginning form element, copy and paste the above again and it will work... also to make sure you are using <?php ?> and not just <? ?>...
  13. <form method='post' action=''>Grade 1:<input name="grades[]" type="text" /> Grade 2:<input name="grades[]" type="text" /> <input type='Submit' name='Submit' value="Submit" /> </form> <?php //initalize the total $total = 0; //loop through the grades entered if ($_POST['grades']) { foreach($_POST['grades'] as $grade){ $total += $grade; } } //show the total echo $total; ?>
  14. Typically you wouldnt use (!mysql_query($sql) you would just do (!$result1)....
  15. Your array isnt initialized until you perform the post, you need to add an if statment to see if it is posted yet, then do it else do nothing...
×
×
  • 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.