Jump to content

jcbarr

Members
  • Posts

    219
  • Joined

  • Last visited

Everything posted by jcbarr

  1. Search for javascript form functions or manipulations on google and you will find a ton of sites that can give you a run down of how to do what you want. They aren't that complicated most of the time.
  2. Do you mean before the form is actually submitted? If you want to do it before the form is submitted then you will more then likely have to use javascript to disable the rest of the form inputs until the above mentioned input has a value.
  3. Awesome, worked like a champ. I'm going to have to read up on that so I don't have to keep asking about it on here.
  4. Okay I have the following code that pulls text and subject from a phpBB database and displays it on the main page of a site. I want to pull the bbcode tags out cause it looks ugly. My question is how would I integrate that in to the code that I have below? <?php mysql_select_db ("csbl"); $query=mysql_query("SELECT post_id FROM phpbb_posts WHERE forum_id='2' ORDER BY topic_id DESC, post_id ASC LIMIT 1"); $a=mysql_fetch_array($query); $postid=$a['post_id']; $query=mysql_query("SELECT * FROM phpbb_posts_text WHERE post_id='$postid'"); $b=mysql_fetch_array($query); $title=$b['post_subject']; $text=$b['post_text']; if (strlen($title)>38){ echo "<font size=+1><b>"; echo substr($title, 0, 35); echo "</b></font>...<br><br>"; } else { echo "<font size=+1><b>$title</b></font><br><br>"; } if (strlen($text)>'225'){ echo (substr($text, 0, 500)); echo "...<br><div align=right><a href='http://csbl-ebl.com/forums/viewtopic.php?p=$postid#$postid'>Read More</a></div>"; } else { echo ($text); } mysql_close($dbh); ?> If you aren't familiar with what bbcode looks like when you pull it out of the database as text here are some examples. Bold [b:28e3b06cb2] [/b:28e3b06cb2] Italics [i:dff082c1f7] [/i:dff082c1f7] Underline [u:dff082c1f7] [/u:dff082c1f7] The text is of course enclosed inside those tags. The id after the : changes, but before the : is always the same. I'm really only worred about those three tags, as that is all that the board allows at the moment. Any direction on this?
  5. You would need to catch them in an array, and then use a foreach loop to process each one of them and output your desired information. Right nowthe recordID is simply overwritten until it gets to the last one, and that is the only recordID that your script is actually processing.
  6. Did you check the Wordpress support forums? I'm sure there are many people there that have attempted to do edits within the script.
  7. You have to submit the form somehow. I think you can use an onSelect javascript function to automatically submit the form when a user selects an option. Try the javascript forum, they will be able to help you much more than we will.
  8. I'm no expert but it looks like you have way too many ///s in that file path.
  9. Why don't you show us an example of the code that gives you this error and we might be able to figure out what is wrong.
  10. From the color coding above you should see where your error is; comic.php?title=$dbRecord["title"]
  11. You haven't closed your { } for starters. Other then that I'm not sure yet. Enclose it in php tags on the board and it should highlight it for you which will help. <?php while ($dbRecord=mysql_fetch_array($queryResult)) { echo "<TR><TD><A href=\"comic.php?title=$dbRecord["title"]\">".$dbRecord["title"]."[/url]</TD>"."<TD>".$dbRecord["author"]."</TD>"."<TD>".$dbRecord["artist"]."</TD>"."<TD>".$dbRecord["publisher"]."</TD></TR>"; } ?>
  12. Nope, it is not an infinite loop. At least I don't believe so. $i increments with every addition to the array, so when it reaches the 10th element ($i=9) it will stop as after that $i will no longer be less than 10.
  13. How is your database set up? Does each column have a weight value in it?
  14. I didn't even think about that, but that would be very hard to prove, or even figure out in my mind.
  15. The only thing that I could think is that they were using some sort of SQL injection method to retrieve all the email addresses in your database and then executing their on script to send spam. This information comes from a user submitted form correct? I'm not sure how they would have accessed the form if it is in a password protected directory, but as we all know nothing is impossible really, and it could have possibly even been a member of the site, you never know. I would read up on SQL injection and take any needed steps to protect yourself from that first.
  16. This is a very broad question. Basically you would have to restrict access to certain pages and features based on the security level of the user. On each page you would need to check their security level, and then only display the things that they should have access to. Not sure if that answers your question or not. Try to be less vague and we may be able to help more.
  17. You can't do that with PHP. The page will have to reload to change the variable and display new information. You might be looking for possibly a javascript or CSS type of solution.
  18. Awesome, thanks a lot for the direction. I guess I could have looked for that myself. Got the page to load and scroll the way that I want it to.
  19. I know nothing of javascript, but I do know that something like this should be possible. Is there a way to add a snippet of code to my page so that when users load the page it will auto scroll down to a certain point in the page? I don't want it to scroll to the bottom, but just a certain amount of lines or pixels down. Anyone know something that can do this?
  20. connection string is the actual connection to the database, for example the parameters you would use in the mysql_connect function.
  21. Also, what are you getting as a result of the code?
  22. Center it inside a div, that will take a user defined area and then center the text within that area.
  23. Put this in the head section of the page for an auto refresh. <META HTTP-EQUIV="refresh" CONTENT="60"> Not sure how to go about making it alarm you if anything has changed, probably javascript would be the best way to go about that.
  24. You can submit it via a form or you can add it to the session array. All depends on what you are trying to accomplish. Sounds like some sort of shop script, so I would reccomend using a form to then submit to the purchase page.
  25. Hmmm... Putting what up where? If this is just about how to upload a layout to the web it should be posted in the HTML forums I believe.
×
×
  • 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.