Jump to content

therocker

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by therocker

  1. Here is what I've got. This is the URL that I'm going to be using. This is my database record. This is my code. And this is the .htaccess I tried to use.
  2. Thanks for the help, but I've tried that before. It just makes the userprofile page go unavaliable. My userprofile page is custom made by me. What I do is use a $_GET to get the username in the URL. Then put it in a query and see if the username exsists in a seo tabel. If so then allow the profile to be displayed. If not then echo out "Profile unavaliable". So that being said, When I change my Rewrite to the Rewrite you provided, it makes the page go "Profile unavaliable"
  3. Hello, is it possible to allow dots inside your .htaccess? So like in the URL it would look something like. http://domain.com/the.rocker instead of http://domain.com/therocker Here is my code. RewriteRule ^([-a-zA-Z0-9_]+)$ userprofile.php?username=$1
  4. Thanks this helped. Had to do a little modifing, but I got it. Thanks. $filter_words = array('morning', 'noon', 'afternoon', 'evening', 'night', 'dawn'); foreach($filter_words as $w => $word) { $replacement = str_repeat('*', strlen($word)); $text = str_replace($word, $replacement, $word); echo $text; }
  5. Hello, how would you count the number of characters in a string and then replacing the string with astrics? So some examples are if I have a list of 6 strings like this morning, noon, afternoon, evening, night, dawn each string gets their own astrics So for morning, there's 7 characters in that string. Then replace that word with 7 astrics like so. ******* And then the same with the rest. Noon has 4 characters so replace it with 4 astrics **** I have this as of right now which is my only code that counts characters. I would like someone to help me fix it and modify it. <?php print(strlen($row['original_row_goes_here'])); ?>
  6. Hello so I'm trying to make my own simple forum. How would can I do a quick quote/ reply to comment. Something WordPress would normally do with the #respond. I've done my own code and I can't seem to insert the code into a hidden input so that the users can't see the HTML codes that are outputted in the reply string. Generally, my code works fine and all, it's just that when someone clicks the "Quote" link, it literally inserts the actual HTML outputs into the textarea. I want something like WordPress' #respond command so that when someone hits the "Quote" link, it'll still quote the actual content the user is trying to respond to, but it'll also not output the HTML codes into the textarea. Here is my PHP code: <?php $reply = '<div style=\"border: 1px dashed\"><span style=\"text-transform: uppercase; font-family: Oswald, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 300; margin: 0px 10px 0px 0px; width: 100%; color: #00A6EB;\">' . $row['username'] . '</span><p>' . $row['message'] . '</p></div><br /><br />'; ?> Here is my HTML code: <a href="#" onclick='insertext("<? echo $reply; ?>"); return false;'>Quote</a> Here is my Javascript code: <script type="text/javascript"> function insertext(text) { document.formname.messages.value += text + " "; document.formname.messages.focus(); } </script>
  7. Thanks guys. It's working now. How do I change this topic to Resolved?
  8. Hello, I can't seem to be able to count the number of rows that have the same numbers. For example, in column forums_id, if the column contains 3 then count all of them with the number 3. If column contains then count all of them with the numbers 2. Here is what I mean. Is there a way to do that? I've got something like this. SELECT count(*) as forums_counting FROM forums_comment WHERE forums_id = '$forums_id' GROUP BY forums_id
  9. This is the desired results, people have been telling me all these things, but they don't end up to be like this. This is how I want it to be, but no one seems to be giving me the right answer I need. This is just photoshopped so don't expect that I got it right. No one seems to understand what I'm trying to ask and so I just photoshopped this part so people can get a better understanding instead of giving me wrong results.
  10. And how is this possible?? If I move the ID away from the while loop, the ID will not get displayed, if I leave it in there, it will stack up and it will show errors, I need help trying to move the ID to a different part of the code that it will be able to read and display at the same time with out showing just #%s in there because I tried to move #%s outside of the while loop and I tried to move the second DIV to another part of the code and I get the same exact results, it seems that I'm not getting the answer I'm wanting for. And people may have not get what I wanted the results to be.
  11. So I'm having issue with trying to pull the ID from my database out correctly. This is the ideal way I want the ID to be pulled. http://a7.sphotos.ak.fbcdn.net/hphotos-ak-snc6/226659_219275201434540_100000561868489_827151_3402533_n.jpg But then it always pulls the ID like this and stacks the number ID ontop of each other and I want it to have separate DIVS. http://photos-e.ak.fbcdn.net/hphotos-ak-snc6/226659_219275204767873_100000561868489_827152_3422285_n.jpg This is the code that I'm using. Tell me what I'm doing wrong. <? mysql_connect("localhost", "mysql_user", "mysql_password") or die("Could not connect: " . mysql_error()); mysql_select_db("mydb"); $result = mysql_query("SELECT id, name FROM mytable"); echo "<div class=\"body_resize\"><div class=\"left\"><br /><span class='date'>$timedate</span><br /><br />"; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { printf("<h2>#%s</h2>", $row["id"], $row["name"]); } mysql_free_result($result); echo "<br /><div class=\"comment_gravatar left\"><img alt=\"\" src=\"http://photos-b.ak.fbcdn.net/hphotos-ak-snc6/229186_219276548101072_100000561868489_827154_8135363_n.jpg\" height=\"32\" width=\"32\" /></div><p>Posted By $name<br><br /><p>$message</p><br></div><div class=\"clr\"></div></div>"; if ($ip==$userip && $delcom==1) { ?>
×
×
  • 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.