Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. validate that any include, require file is actually on your server...
  2. strip_tags(). you can decide which tags are not stripped out OR you could use a preg_replace... <?php $takeout = array('/<(\/)?bold>/','/<(\/)?strong>/','/<br( \/)?>'); $str = preg_replace($takeout,'',$astring); ?>
  3. you could remove the button tag all together and style the a tag to llok like the submit button (you'd have to style the submit button a little too and note not all browsers will actually apply the styling on buttons), OR replace it with an input type="button" tag (would have to remove the a tag and use js to change location)
  4. perhaps consider using a flash player and converting teh file to an flv on upload.... you'll need ffmpeg to do such things so if you don't have permissions to install it on your server forget that bit.
  5. thebadbad - you can always put you own methdo for loacting the file to be downloaded and do checks etc... The essential stuff is there - just modify to suit your needs.
  6. if you name the checkboxes in array fashion (name="chkbox[]") you can then use.. $checked = count($_POST['chkbox']); use print_r($_POST['chkbox']) to get a visual display of what has been selected....
  7. if you just used rsort($array) then $array[0] will gove you the highest value. (assuming you sort highest first as that is what your array looks like.)
  8. $ReceivedValue = $_GET['argv1'];
  9. you'll have to make it a string and use http://uk2.php.net/manual/en/function.str-pad.php
  10. you can't do it one line in css2... you cand do it in 2 though; border: 1px solid #8c8c8c; border-top: none;
  11. not in ie6 - the only method you can really use is the faux column (just google it)..
  12. I suspect what you were seeing there was a <fieldset><legend> in a form...
  13. that will show which classes are defined - which if you are not using php5 and __autoload will return all the defined classes. This could be (99% of the time will be) different to the actual classes used!
  14. array_multisort() IF you take barands advice on the 'award' field but store numeric values 1-4 with 1 representing gold, 2 silver and so on this will be a piece of excreation....
  15. In php!!! <script type="text/javascript"> var abc="<?php echo($str); ?>"; alert(abc); </script>
  16. @aschk - by all means disagree but the proof is in the pudding! The array I porposed is MUCH easier to work with... @gin you have managed to create a 3D array which will be even harder to work with!!! you have got hung up on keeping all the data of one record grouped together... think of your database table - its a series of records that all have a field - my array is just that it stores teh the data for each field in one array and the association is by the key - just as the database i stored in fileds and the association is made by the record number... you shoudl end up with a 2-D array like so... <?php $array = array ( 'award' => array ( 'Finalist - Public Service Messages and Cause Appeal Category', 'Finalist - Private Death Camp Service in Guantanamo', ..... ), 'year' => array ( 2006, 2007, .... ) ); .... and so on. ?> the you could do somethink like $findyear = array_keys($array['year'], 2007); the result would be all the keys of $array['year'] that were 2007 and use them to get the information out of the other arrays (like $array['award']) using those keys. Because you have this associative key you have much more flexibility in what you can achieve...
  17. perhaps maybe use this <script type="text/javascript"> ?????
  18. this is about how you set your array up. In terms of searching an array with the availble php functions and constructs its actually better to group your sub arrays by their type.... SO you would have... Array ( 'award' => array('Finalist - Public Service Messages and Cause Appeal Category', 'Finalist - Private Death Camp Service in Guantanamo', .....), 'year' => array(2006,2007,....) .... and so on. ); this would allow you to search the types you want or apply array_multisort to the array and do what ever... now I could put som emore code down - but then you would lose teh pleasure of learning it yourself and seeing how much easier it is to work with an array constructed as I have shown..)
  19. do you wanted them floated or centered? its not really clear what you are after.. you can keep a whole page centered by giving the body a width (% or absolute) and margin: 0 auto;
  20. you can't echo an array... print_r($array) yes but echo no.. try $strkeys = implode(' ', $keys); echo $strkeys;
  21. well you now have an array of the indexs of $array that match your search criteria... you can either loop through the array and echo each one out or implode the array into a string or what ever you want to do with it.
  22. <?php $array = array(0 => "bleu", 1 => "bleu", 2 => "ghgf", 3 => "gfhfgh"); $keys = array_keys($array, 'bleu'); print_r($keys); ?>
  23. no - browsers render fonts differently thats just the way it is.. try using em's as your font unit and then play around until its readable in each browser
×
×
  • 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.