Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. $sql = "SELECT name FROM companies ORDER BY name"; $names = array(); $result = mysql_query($sql); while ($row = mysql_fetch_assoc($result)) { $names[] = $row['name']; } //Splits it into arrays of every 40 names. $name_groups = array_chunk($names, 40); foreach($name_groups AS $name_group){ //Echo the first name, a dash, the last name, then a space pipe space as a separator. echo array_shift($name_group).'-'.array_pop($name_group); echo ' | '; } Not tested.
  2. Link didn't work. your <input> with a type="submit" (or "button") will be a submit button. An <a> element is a link. I;'m confused on what your form looks like all together.
  3. Are you saying you are clicking that instead of the button?
  4. You could select just the names in order, choose the first, then choose the last. No need for a loop.
  5. I'm curious what browser/OS are you using? Someone said something on another thread about the submit button not always being processed into POST, I am curious if this related. I have never heard of that before.
  6. On each page you'd need to loop through the array to create the hidden inputs. Try using a session instead.
  7. How do you do what I said? Try it and see. Do you have any code written?
  8. The error is telling you where it's attempting to find the file. I don't even know where you got the removalspace stuff from?
  9. You have no form element that has the name billing. You know how all of your form elements have a name? None of them is billing. So it never enters your if() statement. you can see that in the fact that your $_POST array does not contain a value with the key of billing.
  10. Put the print_r as the first line of the file.
  11. I have no idea at this point. Do you have a link?
  12. Stop assuming he's on a windows machine!
  13. I would assume you don't have PHP on the server, is this your only PHP file?
  14. You have no form element with the name of "billing". add print_r($_POST); at the top to see what you ARE submitting.
  15. If your query does not fail and the submit button doesn't match, that is correct behavior with the code I see. Try adding print_r($_POST); Also... | | V
  16. What you are doing is a dynamic form, and it's actually not as SHOCKING OMG as the previous posters have let on. Your names for the form elements should be things like "elements[]" So when they POST the form you get an array of their desired element names. Those are your column names.
  17. Where did you come up with that path? Or are you saying that was the default? Your server is looking in "/hermes/bosweb25a/b109/ipg.removalspacecom/", not /home/ etc.
  18. You can simplify it a lot by removing the variables for rating and total. you can increment a column by the column name. UPDATE bar SET foo = foo+1
  19. insure = arrange for monetary compensation in the event of a loss. ensure = force to be the case Do you have access to your php.ini
  20. A timestamp is an integer that represents time. If you know how to store and read data from a database, you know how to do that same exact thing with a timestamp.
  21. You can put whatever you want in the font-family attribute. You'd want to put Tahoma as the first font in the list. the list is processed until the browser finds one it can use, so you always end with generic. Pick one of the sans-serif (probably the one with Verdana first) and add tahoma in front.
×
×
  • 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.