Jump to content

Philip

Staff Alumni
  • Posts

    4,665
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Philip

  1. You could, but I'm guessing it would be unlikely with the info provided. Changing the delimiter would easily fix this. $strs = explode("|||", wordwrap($mystring, 25, "|||"));
  2. http://www.snowdropkcs.co.uk/snowdropkcs_integrated_softwar.aspx ?
  3. No, you're understanding wordwrap correctly, but if you use explode on that (as seen in my example) it'll convert it into an array
  4. Why wouldn't wordwrap work? $strs = explode("\n", wordwrap($str, 25, "\n"))
  5. "SELECT * FROM cinos11_pages WHERE name='chatbox'" What is the column "name"? I thought it was "title" - and it is case sensitive. Did you try plugging in my query?
  6. What does your current code look like? And doing this: $result is not the actual text results, its the MySQL resource.
  7. Use a while loop & mysql_fetch_* Here's a good tutorial (see the bottom example): http://www.tizag.com/mysqlTutorial/mysqlfetcharray.php
  8. SELECT path FROM yourTable WHERE title='Chatbox'
  9. Well, there is no "global command" that I'm aware of. Each system will be a bit different. Even looking at wordpress, it doesn't look like there is a default way to do this.
  10. Depends if their system is setup to read parameters.
  11. I was gunna say, this whole time I was taught wrong!! Kinda offtopic, IPv6... whats the status on that? I haven't heard a lot on it recently...
  12. What site? That site.
  13. +1 - That's what I have one of my smaller restaurant clients doing for seasonal menus.
  14. Well, I do agree. It does blend in pretty well, I think underlining it or changing the color would help, if even just a little bit. I mean compare the two mail() calls I have in this mail filled sentence. Even doing something like mail from the original mail would help IMO.
  15. I'm having issues with htaccess displaying images. It works, I just can't get the images to load. What do you mean?
  16. If your running of Apache, why not just use .htaccess to do this for you?
  17. Blogs: use Mu http://mu.wordpress.org/
  18. You want to pay someone to do your homework? That just is begging for trouble Why didn't you think about this before making them? >.< Well, okay, what kind of login systems does each use? Different hashes? That should be pretty easy, just google 'sanitizing inputs php' Again, google that or visit http://regexlib.com/ or http://www.regular-expressions.info/examples.html
  19. Perhaps you do not have an easy to understand data hierarchy on the page (proper things in the h1,h2,etc)?
  20. Possibly took it out whenever installing the card (I know I had to with longer cards.) Then when putting it back in, didn't push it in all the way - thus not making a connection. Or TLG was bored and swapped all the connections.
  21. Wasn't me, but Tony Oops, just saw a red badge! Look what I get for assuming
  22. What is the use of tidying it in production? So those few people that care to look at the source code go "oh thats so nice and pretty!" ? It's pretty much a waste of resources outside dev, like Daniel said.
  23. Or another way: // Populate the input vars... $hair = 'golden'; $eyes = 'blue'; $table = 'test'; // Your array of mysql column names => variable names $vars = array('hair'=>'hair','eye'=>'eyes','bodyType'=>'bodyType','ethnicity'=>'ethnicity','lookingFor'=>'lookingFor'); // Setup an array to hold whatever is going in the db $sqlArray = array(); // Loop through each variable (using the double $), if not empty... it will be added to the query foreach($vars as $mysql=>$input) { if(!empty($$input) && $$input!='Any') $sqlArray[] = $mysql . ' = "' . $$input . '"'; } // Count the number of elements that will go in the query and properly handle them if(count($sqlArray)==1) $query = "select * from {$table} where {$sqlArray[0]}"; else if(count($sqlArray)>1) $query = "select * from {$table} where ".implode($sqlArray,' and '); else $query = "select * from {$table}"; // Show the query ... you would normally run the mysql_query here echo $query; Anyways. What errors are you getting?
×
×
  • 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.