Jump to content

dalecosp

Members
  • Posts

    471
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by dalecosp

  1. $sql = "select standards_process_id,standard_id,process_id from standards_process $whereclause $order_by;"; $res = mysqli_query($db_conn,$sql); if ($res) { while ($row = mysqli_fetch_assoc($res)) { echo "<input type='checkbox' name='process' value=". $rowProcess["process_id"]; if ($row['process_id'] > 0) echo "selected='selected'"; echo ">" . $row['somevar'] . "<br />\n"; } echo "</td></tr>\n"; } I'm probably not understanding something (mean this is meant to stimulate thinking, not be a "drop-in" solution). You do need to use fetch_assoc instead of fetch_array if you want to use string indices on your arrays, though; fetch_array only returns an integer-indexed array... HTH,
  2. That's the template, as requinix says. The template should even tell you what file to edit in order to change it. Of course, the idea is that you'll be writing some commentary about what the file does in that space...
  3. 1. Create a system that scours some given subset of the 'Net for something (real estate, cars, wines, single women , vitamins, weapons, DVD's, $whatever), categorizes them, and uploads them to (Pinterest | Ebay | Etsy | $someplace). 2. Create a system that converts vBulletin forums to IPBB or phpBB or ub.threads or $someforum ...
  4. You might do it via Javascript after page load. Obviously, it can be done from PHP as well; you'd have to know something about WordPress internals (and, obviously, PHP). I don't know much about WordPress, though ... seems like I had an installation once, but I don't remember playing around with it ...
  5. At the risk of alienating a cousin of mine who's something of a bigwig at the above-named registrar/hosting service, I'd leave them and go to RootBSD.net without hesitation. Their name says it all Our business moved 3 sites there last year and I don't think we could be happier.
  6. Welcome, and best of luck! I'm fairly happy with MySQL. I've always wanted to try PostGreSQL though ... maybe someday. It's tough to push yourself in new directions ... kudos to you for trying!
  7. If I'm understanding correctly, you want to make your output into an HTML form which can be submitted and make changes in the data. If you cannot use PHPMyAdmin to do this (I'm presuming because you do not wish for WWW users to have access to PHPMyAdmin ), then you'll first need to modify your output to have "<form>" tags (which may have already been done, you do seem to have <input> tags), and then write a handler for the POSTed data. For a basic button, you need this: <input type='submit'>You must make sure the form has a "method" attribute of "post" and an action attribute that points to your handler script:<form method="post" action="myhandler.php">You can see what is in the post array like this: print_r($_POST);
  8. dalecosp

    Overlay Scroll

    Does overflow:scroll; in the CSS/style work for you?
  9. What does Firebug say? If the error's in Javascript it should be throwing exceptions automagically...
  10. True enough, but what's the point of serving anything from cache if not to negate the need for dynamic processing? True dat!
  11. I'm not sure if you've given quite enough information to do *much* helping. A "unit" will be an object, then? Sounds good. And you could have a generic "Unit" class and have subclasses for inch, centimeter, yard, pound, kilogram, etc. What methods would they have? Would each have a "to_other" ("to_inch", "to_yard", "to_kilogram", etc.)? As for method="PHP_SELF" ... that's simply using the same script as both the initial form and the data handler: if (!$_POST) { show_the_form(); } else { //handler code goes here }HTH,
  12. $.02, just for the sake of the future reader: we do lots of caching here. Our SOP is to always update the HTML by adding a querystring to resources that are cached whenever the cached item is changed. That is, if we make changes to "general.js", the corresponding script tag in the HTML will now look like this: <script src="/js/general.js?datecode" />This will cause the browser to see the file as a different resource, so it won't be cached. (Better than trying to "fake out" the server/browser by changing file names to imply other types).
  13. <title><?php echo str_replace("- Docwiki",'',$this->text('pagetitle')); ?></title>?
  14. Does this help you? <div class="video"> <html><center> <?php $meta_value = get_post_meta($post->ID, 'video_url', true); if($meta_value){ $url = parse_url($meta_value); $id = 0; if($url['host'] == 'youtu.be'){ $id = ltrim($url['path'],'/'); } else if(strpos($url['path'],'embed') == 1){ $id = end(explode('/',$url['path'])); } } else { parse_str($url['query']); $id = $v; } $video_info = simplexml_load_file(‘http://gdata.youtube.com/feeds/api/videos/’.$id.’?v=1'); echo '<h3>'.$video_info->content.'</h3><hr /><p><iframe width="540" height="355" frameborder="1" allowfullscreen="true" src="http://www.youtube.com/embed/'.$id. '?version=3&theme=light&fs=1&rel=0&cc_load_policy=1&iv_load_policy=1&modestbranding=1" type="application/x-shockwave-flash" allowScriptAccess="always" allowfullscreen="true" width="600" height="355"> </iframe></p><p>'.$video_info->content;.'</p>'; ?> </div>NB: *Not* linted....
  15. "Syntax error, unexpected > in line $somewhere" ... Try this? foreach ($options as $option): ?> <option value=<?php echo $option['id'].">".$option['list_value'] ?></option> <?php endforeach ?>
  16. Debugging 101: http://board.phpbuilder.com/showthread.php?t=10240608
  17. "size" might not be the best choice of names for this variable, as several objects in JS have this as one of their methods. How about this? function setSize() { if (document.getElementById('mySize').value >0) { var theSize= document.getElementByID('mySize').value; document.getElementById('btnAddToCart').options.onClick = "window.location.href='<?php echo $cart_url; ?>&s="+theSize+'"; } else { document.getElementById('btnAddToCart').options.onClick = "window.location.href='<?php echo $cart_url; ?>';"; } } Does that work? (You will need to change your HTML, of course, as well....)
  18. It works fine here ... if I want to see an array in place of the tag. Are you sure you don't want to use preg_replace() instead?
  19. Use Chrome, or install the Firebug extension in your Firefox browser. Then read this.
  20. Are you trying to debug the onfocus() in the Javascript? Have you tried Firebug or Chrome debugger?
  21. Write something in Perl or ASP and try and run it. </rimshot> But, seriously, that might work. A deliberate syntax error in a *.pl file in your cgi-bin directory would probably trigger a 500.
  22. I take it that it was *really* slow? Most people think of email as "instantaneous" ... but it's not guaranteed to be and wasn't really designed that way. Close, maybe, in a perfect world, but not instant...
  23. When arrays are created without assigned indexes, they are indexed by numbers, starting with zero. As all your arrays appear to meet this criterion, you should be able to do something like this: $ct = 0; // initialize a counter foreach($_POST['song'] as $item1){ echo "Song: $item1 <br />Link 1 ".$_POST['link1'][$ct]."<br />Link 2 ".$_POST['link2'][$ct]."<br />Link 3 ".$_POST['link3'][$ct]."<br />"; $ct++; }Obviously, you're probably not planning to just print out the data, but hopefully you get the idea?
×
×
  • 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.