Jump to content

webbiegurrl

New Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About webbiegurrl

  • Rank
    Newbie
  1. I'm sure this kind of thing you can do in your sleep, but sadly I can't, but still want to get there. I really appreciate all your help and it pushed me to get this done. I almost gave up (& cried), but got it done and learned a lot along the way. Here is my final code - still had some snags that I had to sort out, but I did it. <?php $urlParts = explode('.', $_SERVER['HTTP_HOST']); $str = $urlParts[0]; $subdomain = preg_replace('#^https?://#', '', rtrim($str,'/')); $stmt = $pdo->prepare('SELECT * FROM images_tbl WHERE subdomain=? ORDER BY width ASC, height ASC, email'); $stmt
  2. Absolutely! I completely agree that this is much simpler (and definitely cleaner) than what I had. Thank you. I am stuck though with the script repeating the last value in every instance and I really can't see the problem. Here's what I have: <?php $urlParts = explode('.', $_SERVER['HTTP_HOST']); $str = $urlParts[0]; $subdomain = preg_replace('#^https?://#', '', rtrim($str,'/')); $stmt = $pdo->prepare('SELECT * FROM images_tbl WHERE subdomain=? ORDER BY width ASC, height ASC, email'); $stmt->execute([$subdomain]); if($stmt->rowCount() != 0) { echo "<h3>Donated</h
  3. Jacques1, I must admit that when I first read your second submission, I was pretty ticked off by your bluntness. I mean I did state that I am just learning. I really felt like I was one simple tweak away with my existing script, but then you wanted me to put something else together entirely. I have been over and over your suggestion since reading it and have googled and really tried to figure it out how to setup the array - pretty sure I'm over complicating it. I want so desperately to learn php, you have no idea. I read once that you're either a coder and it all makes sense to you, or you'r
  4. Thanks for answering Jacques1, but truthfully, I have no idea what you're talking about or where/how to implement it.
  5. First, please don't blast me for the ugly code, as I am still learning php and altering existing code is the easiest place to start. I hope to fix it up a bit once it's working properly. I want to display graphics in groups by size, but within that size also grouped by the donator. GRAPHIC SIZE Donated by Bob image image image Donated by Sue image image GRAPHIC SIZE The following code does successfully group by size, but just adds the new donator's codes in with the previous. <?php $urlParts = explode('.', $_SERVER['HTTP_HOST']); $str = $urlParts[0]; $subdo
  6. Not exactly sure how to do that, though I do understand what you mean. Even though the query works, it seems very crude next to the existing code, is there anyway of using what's already there to add what I need? Here's the full page <? require 'config.php'; require_once( 'mod_errorlogs.php' ); require_once( 'mod_owned.php' ); require_once( 'mod_members.php' ); require_once( 'mod_settings.php' ); // function to clean data if( !function_exists( 'clean' ) ) { function clean( $data ) { $data = trim( htmlentities( strip_tags( $data ), ENT_QUOTES ) ); if( get_magic_quote
  7. Please be kind as I am simply modifying an existing script to suit my needs and I am still just learning PHP. I have this code foreach( $sorters as $sortvalue ) if( $sortvalue == '' ) echo '<li> <a href="' . $list_url . $connector . $sortfield . '=none">None given</a> </li>'; else echo '<li> <a href="' . $list_url . $connector . $sortfield . '=' . $sortvalue . '">' . $sortvalue . '</a> </li>'; echo '</ul>'; which lists the names of the countries that members live in. I have
  8. Just popping by to say hello! I love using PHP but am mostly just a dabbler who likes to figure out how to modify existing scripts. I would LOVE to know more about it and will most likely learn a lot by checking out all the posts here. See you around the boards
×
×
  • 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.