Jump to content

unrelenting

Members
  • Posts

    161
  • Joined

  • Last visited

    Never

Everything posted by unrelenting

  1. Wow. You are pure genius. It's akin to witchcraft how you guys can make things happen. Thanks.
  2. You understood my request perfectly. I will give that a whirl this evening when I get home from work. I appreciate your time. I am using the same forum software that phpfreaks uses (SMF) and they have that _blank attribute built into it already so that is really out of my control.
  3. It's really not that bad and is quite easy after some practice. I can move this to the Regex board if you'd like. I know they are always hungry for a new challenge there. Please do. Thanks.
  4. I figured that is what I would need but was hoping for a different approach. Regex is the most complicated thing I have seen in PHP.
  5. I am trying to modify my message board posts in a way that it will display any <img> images that are located in my smileys folder but only display a <a href> link if they are located anywhere else. So if someone makes a post using a smiley located in http://mysite/forum/smileys folder then it makes no change at all because it will already be in the <img> tags. But if it is a hotlink to an image on another site or even a hotlink to an image in a different folder on my own site I'd like to change it from: <img src="http://differentsite.com/image.jpg" alt="" border="0" /> to: <a href="http://differentsite.com/image.jpg" target="_blank">http://differentsite.com/image.jpg</a> The entire post is stored in the $message variable. How would I code this to search the variable for instances of <img> tag links and ignore it if it is in the http://mysite/forum/smileys folder but change it to an <a href> link if it points to any other folder or website? Thanks.
  6. But I need to know how to identify a cellular user to direct them there in the event that they just punched in the http://gmail.com address.
  7. There are still lots of people who pay-per-kilobyte out there, rather than subscribing to unlimited internet packages, that don't want to pay extra money for a site that is heavy on graphics. I am one of them.
  8. I would like to setup a page just for cellular viewers but I can't figure out how to identify a cellular viewer to point them to the new page. Is there just a simple PHP if statement or something I should use or how is this normally done?
  9. Try trim($user);
  10. Are you absolutely sure that there is a row in the Member table with the loginName = to $user?
  11. Try: $query = "SELECT * FROM Member WHERE loginName='".$user."'";
  12. Glad you got it working.
  13. <?php include "base.php"; $_SESSION = array(); session_destroy(); ?> <meta http-equiv="refresh" content="0";"index.php">
  14. I don't know about 'best' but you can do it with file_get_contents or cURL.
  15. Read into these... http://dev.mysql.com/doc/refman/5.1/en/encryption-functions.html
  16. Try something like this. <? // database connection info if ((isset ($_GET['currentpage'])) { $currentpage = $_GET('currentpage'); $conn = mysql_connect("80.94.196.33","USER_INFO") or trigger_error("SQL", E_USER_ERROR); $db = mysql_select_db('bssql',$conn) or trigger_error("SQL", E_USER_ERROR); $result = mysql_query ('SELECT title, subtitle, article FROM articles WHERE title = "' . $title . '"'); while(list($title, $subtitle, $article) = mysql_fetch_row($result)) { echo $title; echo "<BR />"; echo $subtitle; echo "<BR />"; echo nl2br($article); echo "<BR />"; } } $conn = mysql_connect("80.94.196.33","USER_INFO") or trigger_error("SQL", E_USER_ERROR); $db = mysql_select_db('bssql',$conn) or trigger_error("SQL", E_USER_ERROR); $result = mysql_query ("SELECT title, subtitle, article FROM articles ORDER BY ID DESC"); while(list($title, $subtitle, $article) = mysql_fetch_row($result)) { echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$title'>$title</a><BR />"; echo $subtitle; echo "<BR />"; echo "<BR />"; } else { echo "ERROR"; } ?>
  17. You probably need to have data for every column in your csv file. Something like: 1, 1, 1, Bob, 345275 2, 2, 2, Tim, 2547354 3, 3, 3, Test, 5763 Or just make the table with only 2 columns, import the csv file and then go back in and add the other columns.
  18. http://www.tizag.com/phpT/postget.php
  19. Also, make sure that $def_path is equal to /home/content/f/a/b/XXXX/html I added this line to the top of your script and it moved the file correctly (using my own filepath, of course): $def_path = "/home/content/f/a/b/XXXX/html";
  20. That means you have to enter the location like this: /home/content/f/a/b/fabis94/ The script is checking for a forward slash before and after the inputted location. If it doesn't have that then it gives you that error.
  21. Try this: <?php /* build selection list for the month */ $todayMO = $mo; //get the month selected echo "<select name='smonth'>\n"; for ($n=1;$n<=12;$n++) { if ($todayMO == $n) { echo '<option value=" . $n . " selected>' . $smonth[$n] . '</select>'; } else { echo '<option value=" . $n . ">' . $smonth[$n] . '</select>\n'; } } ?>
  22. $whitelist = array("word1", "word2", "word3"); if (in_array($input, $whitelist)) { }
×
×
  • 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.