Jump to content

milesap

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

milesap's Achievements

Member

Member (2/5)

0

Reputation

  1. Nothing to do with PHP, unless they are being created by PHP which is unlikely. This is an HTML CSS issue.
  2. name="duration['.$row['Name'].']" if you name an element as an array, then it can hold multiple values. Not going to read over all your code, but I would do a print_r of the $_POST['duration'] variable to see what that returns, and from there ensure that the element is getting properly filled.
  3. happens to me to sometimes, take more breaks or else nothing makes sense lol
  4. Ahaha 600 seconds is 10 mins . . . Just divide 600 by 60 to display it in minutes.
  5. To clarify, the IP address is the user requesting the form, not your hosting servers IP. Here's how it works: 1) User's navigates to your page and is presented with a legitimate form. This form contains the uniqueId found above. 2) When the user submits the form, the uniqueId is verified. The reason this works is because if another website has a form linking (and posting) to your server, they now cannot do so since they lack the ability to generate valid unique ID's. In general you don't need to worry about this, as long as the form data is valid there shouldn't be any concern. However there are times where it is useful. . . I've never needed to though!
  6. You have: name"gender" Change to: name="gender"
  7. Yes there is, simply make a hidden field in your form called 'uniqueId'. Set the value of that field to: MD5(USERS_IP . SALT_STRING) Example MD5(12.34.34.123 . 'XD657349'); Insert that into the hidden field, and on each form submission check to ensure the uniqueId is valid. Since the uniqueId is unique to each I.P, the form cannot be submitted without that unique ID thus rendering POSTs from other places useless.
  8. I would ask a specific question after you've done some research yourself if your having trouble putting it all together rather than posting code and asking someone to write the script for you.
  9. Page requests are 'stateless' meaning that any actions are only performed when the user requests them. The script starts and ends with each page request, and therefore the short answer is no you cannot easily have the server process a file while the user leaves the page. However, there are ways around this and in your case I would suggest setting up a cron job that runs a conversion script for uploaded files. That way the user can leave the page without affecting the conversion process (since the cron job is making the request).
  10. Excellent! So all subsequent methods must be extensions of the last method called, makes a lot of sense when trying to build easy to read, flexible code. Thanks for your help!
  11. I've seen some people code with objects in PHP, but one thing that others do (that I'd like to do) is the ability to call multiple methods at once. For example, in Zend Framework it's possible to write the following: $variable->setMessage('Text')->addColor('blue')->toArray(); (just an example) Notice how you can call several methods at once without having to write $variable next to each method? I've tried to do similar stuff in my code but cannot achieve this effect. Does anyone know how to set this up or point me in the right direction? Thanks!
  12. Quick question, not sure if I'm doing this right. How can I get the value of a forms id element? Would it be $_POST['id']? <form id="test" . . .> </form> Thanks so much!
  13. hahahahahahaha Why don't YOU write YOUR own code
  14. Try: if (empty($_POST)) { header('Location: http://www.example.com'); }
×
×
  • 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.