Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. VN21Nov2008-1.pdf VN21Nov2008-2.pdf VN21Nov2008-3.pdf VN21Nov2008-4.pdf VN21Nov2008-5.pdf Are they all strictly in this format to start with? Will be there any like: VN1Nov2008-10.pdf ?? I am asking because to use substr() you'd need to know the positioning of each section. Adam
  2. Try playing with... $file = basename(htmlentities($SERVER['PHP_SELF']), ".php");
  3. Your site just isn't optimized for search engines... For example... http://www.fatalinjury.org/list.php?dir=nature Not search engine friendly at all .. Try giving the images meaningful names and preferably a short description. They'll be more likely to end up on google and other image search engines - which will boost traffic a hell of a lot! Adam
  4. It's better but as everybody else has said, seems to lack something! The nav definitely needs work! Looks like you spent all your time working on the rounded corners then when you came to design the nav, was fed up / bored. The main text is also a bit bland, looks tiring to read.. there's no headers, images or anything to catch your eye and keep you interested. The logo doesn't really fit the style you're trying to achieve, or at least the "SPIGN" text doesn't.. and the 2 blues don't go well together. Adam
  5. Doubt anyone here's going to do that for you for free to be honest .. http://www.phpfreaks.com/forums/index.php/board,8.0.html
  6. "Looks to me like mID is not numeric." Think corbin was barking up the same tree.. Echo out the value of $mID to double check it has a valid value... Adam
  7. Well why not just send it in the URL as a $_GET param? The purpose of #anchorName is to jump to different parts of the page without reloading, so it's not going to make another request to the server anyway. Adam
  8. Can we see some code? How are you converting to the text to an image? What does the text originally look like? "0xDA" looks like hexadecimal .. http://en.wikipedia.org/wiki/Hexadecimal Adam
  9. Is it simply a file content search? If so of course it's possible, what do you think google does to about 1,000,000,000,000 sites!? If you're wanting to search a database from each site, that could get more complicated, but still quite possible... ? Adam
  10. None come to mind.. Might be worth posting in the freelance section, seems a bit specific.. Adam
  11. Yeah use: $text = str_replace("\n", "<br />", $text);
  12. You'll need to use regular expressions.. Sounds like it'd be tricky to do though.. Adam
  13. It perfectly possible, but you'd need some kind of delimiter to determine when one section starts and another begins. Can be anything really.. blah blah this is section 1 // NEW_SECTION blah blah this is section 2 Then you can use explode() to explode the contents by "// NEW_SECTION" and echo out the right section. A quick example: <?php $text = file_get_contents("dataholder.txt"); $sections = explode("// NEW_SECTION", $text); echo $sections[0]; // section 1 echo $sections[1]; // section 2 ?> Adam
  14. Why would you have to load times into an array? Adam
  15. I believe on some websites they use a special tag like: === BREAK === or something .. in which case you could explode the text by "=== BREAK ===" then have say "?page=2" in the URL and return the text at that index of the array. So something like: // assuming $article contains the text $page = (!$_GET['page']) 0 : (int) $_GET['page'] - 1; $article_pages = explode("=== BREAK ===", $article); echo $article_pages[$page]; .. not tested but it's just a quick idea. Adam
  16. $query = mysql_query("DELETE FROM yourTable WHERE dateField = '" .date("dmy"). "'"); Look into PHP's date() function so you can format the date to how you have it in your database.. Adam
  17. The second way will work, but it's good coding practise to do it the first way, or to put curly brackets around the variable: echo 'hello my name is {$name}'; Adam
  18. great stuff. I wasn't 100% sure about the syntax with the short-hand if .. Adam
  19. print ' /><input name="sprice[' .$key. ']" type="text" class="dropdown" /><br/>'; error was: class='dropdown' ..
  20. $labels = array( 0 => '200mm x 200mm', 1 => '200mm x 300mm', 2 => '200mm x 400mm', 3 => '200mm x 500mm', 4 => '200mm x 600mm', ); foreach ($labels as $key => $label) { print '<label>' .$label. '</label><input name="sizes[' .$key. ']" type="checkbox" value="' . $label. '"'; $key == 0 ? print ' checked'; print ' /><input name="sprice[' .$key. ']" type="text" class='dropdown' /><br/>'; } Might need a few adjustments..
  21. then to get $sprice: $sprice = $_POST['sprice'][$key]; Not tested but should work - assuming you're using the POST method..
  22. foreach ($POST['sizes'] as $key => $size) { // .. } ..I think would work.
  23. Basically he's saying when a checkbox isn't checked, it doesn't return a value. So if you were to do that you may end up with two arrays like: true | some text value true | some other text value true | another text value | yet another text value | maybe another text value Where say the first, third and fifth checkboxes were checked, if you follow? He's saying if you loop through the checkboxes and have a counter increment on every loop, you can then set the index for both arrays, for each input. You could do it manually if it weren't so easy to loop through the inputs. but it would mean you'd end up with an array like: (0) true | (0) some text value (1) | (1) some other text value (2) true | (2) another text value (3) | (3) yet another text value (4) true | (4) maybe another text value If that makes more sense? Had to do it with brackets btw cause it went funny with [] .. Adam
  24. while ($row = mysql_fetch_assoc($result)) { if ($modules[][mid] == $row['mid']) { $module = array ( 'col' => $row['col'], 'title_en' => $row['top'], ); $modules[] = $module; } } $modules[][mid] isn't right .. you're not specifying an index for the array. Plus you need quotes for "mid".. $modules[0]['mid'] That would be valid, but I can't guess as to what you're trying to do? Are you trying to find a match in the $modules array and then add to that particular index? All I can think you're trying to do is something like: while ($row = mysql_fetch_assoc($result)) { foreach ($modules as $key => $mod) { if ($mod['mid'] == $row['mid']) { $modules[$key]['col'] = $row['col']; $modules[$key]['title_en'] = $row['top']; } } } Not checked.. Adam
  25. I'm not sure about this, but can you not use: <label>200mm x 200mm</label><input name="sizes['size']" type="checkbox" value="200 x 200" checked="true"><input name="sizes['sprice']" type="text" class='dropdown'><br/> Never tried so.. Adam
×
×
  • 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.