ToonMariner
Members-
Posts
3,342 -
Joined
-
Last visited
Everything posted by ToonMariner
-
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.
-
google 'friendly urls' and have a look at this... http://www.alistapart.com/articles/succeed/
-
[SOLVED] Just a little bit of string manipulation
ToonMariner replied to optimaximal's topic in PHP Coding Help
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. -
Multi dimensional Array, retreiving index value, not data type
ToonMariner replied to PC Nerd's topic in PHP Coding Help
Indeed - I was just writing it so that it would manage any 2d array. -
that shouldn't matter... just post the old html code and the php your run to process it and we will find the problem...
-
your second option is the one you should adopt... efficient/bets way of doing it is upto your coding skills.
-
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...
-
[SOLVED] Just a little bit of string manipulation
ToonMariner replied to optimaximal's topic in PHP Coding Help
change $str = '{$_POST['audit_passpassword']}'; to $str = $_POST['audit_passpassword']; -
Some code and perhaps what method you are using on the form might help...
-
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.
-
if(in_arrayr($needle, $v) === true) no in_arrayr function - remove the 'r'
-
Getting the coordinates of a mouseclick over an image
ToonMariner replied to martin_g's topic in PHP Coding Help
really? I am surprised - can you post your html - I am interested in teh doctype and why this aint working..... -
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.
-
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.
-
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...
-
that was my impression of what a faux column was...
-
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.
-
google 'geoip'
-
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.
-
$uploadImage = trim($uploadImageDir . $_FILES['image']['name']);
-
trim($filename); you shoudl also check if the file name already exists if so append something to the basename of the file like '_1'.
-
Multi dimensional Array, retreiving index value, not data type
ToonMariner replied to PC Nerd's topic in PHP Coding Help
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... -
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.