Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. yo need an if statement in there right after you hav done the calcs on power. Check if either are <= 0 if they are then stop the contest if not carry on.
  2. google 'friendly urls' and have a look at this... http://www.alistapart.com/articles/succeed/
  3. You may have to concat the $_POST vars in the query string - don't know why but I often get errors if I don't.
  4. Indeed - I was just writing it so that it would manage any 2d array.
  5. that shouldn't matter... just post the old html code and the php your run to process it and we will find the problem...
  6. your second option is the one you should adopt... efficient/bets way of doing it is upto your coding skills.
  7. Some people simply will not believe it when you say the web can't do something they want it to.... Oh well I can happily ignore this thread from now on...
  8. change $str = '{$_POST['audit_passpassword']}'; to $str = $_POST['audit_passpassword'];
  9. Some code and perhaps what method you are using on the form might help...
  10. when you hit F5 the data will be sent again so it will be placed back into the POST array. The post array is stateless anyway - so expecting it to do something different when you repeat a submit is a bit daft - it is populated on a request and emptied at the end of the processing of the request if you repeat the request then it will be populated once more. If you put unset($_POST); at the very top of your script and then submit you should see that the post array is cleared. If you are trying to prevent a double posting of a comment or similar then you should process the data and the use.. header('Location: donepage.php'); This will prevent a fresh sending the data once more.
  11. if(in_arrayr($needle, $v) === true) no in_arrayr function - remove the 'r'
  12. really? I am surprised - can you post your html - I am interested in teh doctype and why this aint working.....
  13. I have yet to see video frame carpture but until someone post details to a script that can (which I am sure will be in a couple of minutes) I would go with your second option.
  14. you can set an array of cooikes but what you suggest would indeed overwrite the previous values... to set array use mycookie[0], mycookie[1] ..... as the cookie name.
  15. OK 1st I made a type-o!!! change 'label.span' to 'label span' The second is your bad - type="checkbox2" no such type so get rid of the 2. the last step will be alter the width of the label.chbxlbl to suit your needs... Oh and value="$drid" needs to be value="' . $drid . '" Oh and label.chbxlbl should be label.chkbxlbl in the style tag...
  16. that was my impression of what a faux column was...
  17. ok well if you made the other changes then add that 'cc code' to your page by placing it inside a style tag in teh head section of your html.
  18. Alternatively NEVER send out any sensitive information in a cookie. If you have a site that deals with finacial transactions or contacting others (where legal action could ensue) then require users to login on each visit.
  19. $uploadImage = trim($uploadImageDir . $_FILES['image']['name']);
  20. trim($filename); you shoudl also check if the file name already exists if so append something to the basename of the file like '_1'.
  21. Sorry for sounding harsh but what a terrible method of indexing an array... This is far more logical.. $array['type'][0] = 'Fruit'; $array['name'][0] = 'Apple'; $array['price'][0] = '2.5'; $array['type'][1] = 'Vegetable'; $array['name'][1] = 'Carrot'; $array['price'][1] = '1.7'; $array['type'][1] = 'Meat'; $array['name'][1] = 'Lamb'; $array['price'][1] = '5.5'; then you could do all sorts.... <?php if ( count($array['type']) > 0) // is the array populated { ?> <table> <?php $fields = array_keys($array); // how many fields in there foreach ($fields as $fkey => $fval) { ?> <th><?php echo $fval]; ?></th> <?php } ?> </tr> <?php $types = sort(array_unique($array['type'])); // extract types - alphabetically. foreach($types as $key => $value) // loop through types. { $temp = array_keys($array['type'], $value); // get all items in type. foreach ($temp as $tkey => $tval) { ?> <tr> <?php foreach ($fields as $fkey => $fval) { ?> <td><?php echo $array[$fval][$tval]; ?></td> <?php } ?> </tr> <?php } } ?> </table> <?php That is fairly robust...
  22. I am not quite getting what you are asking... Are just retrieing the source html from a file and parsing it? or is this curl request returning query results from another database table... Could just be me but I don't think your question is very well explained.
×
×
  • 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.