Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. ??? you sure? just use the dort string flag and it should be hunky dory - it may wel put numbers before characters but...
  2. http://uk2.php.net/manual/en/function.array-multisort.php
  3. http://uk2.php.net/manual/en/functions.variable-functions.php
  4. GRRRRRRRRR phlip beat me to it <?php $work_start=strtotime("8:00:00am"); $work_end=strtotime("20:00:00pm"); $curr_time=strtotime("now"); if ( $work_start <= $curr_time && $work_end > $curr_time ) { $hours_left=($work_start) -($curr_time); echo "There are ".date("h:i:s",$hours_left)." business hours left, untill 8pm closing time"; }else{ echo "Sorry it ".date("h:i:sa")." we are closed"; } ?>
  5. check your mark up and DOUBLE CHECK you have changed the names of the inputs. instead of echoing them out individual fields just use print_r($_POST); that will show you everything that has been posted and what vale it has been given..
  6. try echoing out the path used in the function call.. also try delivering the FULL path - I often use $_SERVER['DOCUMENT_ROOT'] in any calls of any type to files to prevent anyone putting the path to their own files ...
  7. sorry completely missed the strtotime!!!! my bad... should do - try it... (i'm too lazy to install php on the machine I am currently on)
  8. http://uk3.php.net/manual/en/features.file-upload.post-method.php once you have uploaded just put a link to it in your html
  9. time() will return the unix epoch timestamp... you either need to convert yoyr 8am into a time stamp or have a look at these http://uk3.php.net/manual/en/datetime.sub.php
  10. you need to give each field in your form a separate name.. <form action="quick-form.php" method="post"> First Name: <Input type="text" name="firstname" size="30" maxlength="12"><br /> Last Name: <input type="text" name="lastname" size="30" maxlength="12"><br /> Address: <input type="text" name="address" size="30" maxlength="12"><br /> <input type="radio" name="sex" value="male" /> Male <br /> <input type="radio" name="sex" value="female" /> Female<br /> <input type="submit" value="Submit"> </form> in your code just use print_r($_POST) to see resutls;
  11. mainstream browsers should never be the issue - if you produce something that simply will not work in the most popular browsers then you have built something bad... people tend not to want to have to scroll at all for the info they want...
  12. radio buttons and check boxes are notoriously difficult to style. your most reliable method is replacing them by a faux radio/check box image overlay controlled by javascript (not my favorite but many do do this). as an alternative you could style the label for that input and have the text turn red
  13. no need to apologize fella!!! just when you want help is often some markup or code that is elsewhere that is causing the problem...
  14. hacking/cracking is a serious issue and one that needs open discussion. unless you know how people gain access to your systems/code how on earth are you going to learn counter measures????
  15. so you are telling me that there is no body tag in your markup? remember I said parent containers NOT parent divs...
  16. do you have the page available to view online? we would need to see all markup and css as what you have provided has none of the details about the parent containers we would need
  17. if you say so.... wait until you need to modify your table based layout....
  18. <?php $query2 = "SELECT * FROM $table"; $row = mysql_fetch_assoc(mysql_query($query2)); if (is_empty($row['name'])) { $joblink = "no download"; } else { $joblink = "download"; } ?> i do suspect how ever you want to check if its NULL in which case use is_null()
  19. OK can't be arsed at looking at what you have done - its a mess... 2 things 1. break out of php for outputting mark up . Its a nightmare to manage if you need to change mark up.. <?php ..... lots of code... echo "<table border=0 cellspacing=0 sellpadding=0>"; echo "<tr>"; echo "<td>"; echo "<a href='browse.php?fatherID=".$subcat['ID']."' title='".$subcat['Title']."'>"; echo "<img src='icons_folder/folder.jpg' border=0 alt='".$subcat['Title']."' >"; ..... ?> should be <?php ..... lots of code... ?> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td> <a href="browse.php?fatherID=<?php echo $subcat['ID']; ?>"' title="<?php echo $subcat['Title']; ?>"> <img src="icons_folder/folder.jpg" border="0" alt="<?php echo $subcat['Title']; ?>" > <?php .... ?> this helps you separate you code and presentation a bit better (no MVC but hey its your code we are dealing with here ) 2 recursive actions require recursive functions... http://devzone.zend.com/node/view/id/1235
  20. you store the salt else where (in an encrypted file or somthing) and use that in your code do not store salts anywhere where people COULD get access to them - very important that you protect them by encrypting your file with zend guard or ion cube. I put this encryption in an encryption class which takes your sting and encrypts it as you instruct and passes the string back - that file is protected by encoding it with zend guard so even if someone got ftp access they'd have a hard time figuring it out....
  21. http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html
  22. use a template for your site - don't use a frame - they suck ass big styleeeee
  23. <?php $totsys=mysql_num_rows($result); $totrows=ceil($totsys/4); $arr = array(); $counter=0; for($col=0;$col<4;$col++) { for($row=0;$row<$totrows;$row++) { $arr[$row][$col] = $counter++; if ($counter > $totsys) continue 2; } } print_r($arr); ?> that should do what you need it to.
×
×
  • 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.