Jump to content

elite_prodigy

Members
  • Posts

    158
  • Joined

  • Last visited

    Never

Everything posted by elite_prodigy

  1. Thanks. The strips_tags() is perfect! Now, as for the $bad_words, it's a start but I need a way to know if the text contains those words and then if it does to not even enter it into the database. Thanks!
  2. Okay, when I built my site, I had no idea I was going to have to get this involved, but apparently I do. I posted earlier about my Dirt Digger thing and now I've had to disable it until I can prevent certain tags from working. I had users posting pornographic images and what have you. I also need to just not even enter the submission into the database if there are words that I may set off a bunk submission such as a rant about nothing with ton of swearing. I don't want to get so involved with this as to build an entire user system and make people log in to make a submission. I think the one function I need is like StripTags("","") or something. I want to remove all tags except for <i>, <br />, <p>, <b> <u> and their counter parts. Plus, I can't think of a simple way to search a string to see if it contains certain words. Maybe str_search? I also want to record their IP into the DB upon submission. ---------------------------------------------------------------- I also have a relatively simple ACP/staff area where staff can log in and what not to make submissions to a special page that is "official", however, I want this ACP to recognize them and I need to transfer their user name to another variable and change the code inside the page depending on who logged in because each staff member has a web page and I want them to be able to update only their own page when they log in so I need to change some info in the PHP code so that everything is sent to the right databases.
  3. Parse error: syntax error, unexpected T_STRING in /home/david08/public_html/hasdsecret.co.cc/dirt_digger_archive.php on line 13 <?php $get_articles = "select id, alias, article from dirt_digger"; $get_articles_res = mysql_query($get_articles,$conn) or die(mysql_error()); while ($article_info = mysql_fetch_array($get_articles_res)) { $alias = $article_info[alias]; $title = $article_info[title]; $article = $article_info[article]; $display_block .= "<h1 class="title">$title</h1><br /> $article <br /><br />Author:<br /><strong>$alias</strong><br /><br />"; //line 13 } ?> Why do I keep getting these damn errors?! ??? ???
  4. Thanks! But now I have a different problem: Parse error: syntax error, unexpected T_STRING in /home/david08/public_html/hasdsecret.co.cc/dirt_digger_archive.php on line 13 <?php $get_articles = "select id, alias, article from dirt_digger"; $get_articles_res = mysql_query($get_articles,$conn) or die(mysql_error()); while ($article_info = mysql_fetch_array($get_articles_res)) { $alias = $article_info[alias]; $title = $article_info[title]; $article = $article_info[article]; $display_block .= "<h1 class="title">$title</h1><br /> $article <br /><br />Author:<br /><strong>$alias</strong><br /><br />"; //line 13 } ?>
  5. Okay, I'll consider it, But I still need to remove the T_STRING error.
  6. I have, but since I'm not password protecting any pages and since anyone is free tof make a submission, I don't see the necessity in protecting against injections. Unless I'm mistaken, then let me know.
  7. <?phpif ((!$_POST[alias]) || (!$_POST[article])) { header("Location: dirt_digger.html"); exit; } $conn = mysql_connect("localhost", "david08_dirt", "spartan") or die(mysql_error()); mysql_select_db("david08_dirt",$conn) or die(mysql_error()); $update_db = "insert into dirt_digger values ('', '$_POST[alias]', '$_POST[title]', '$_POST[article]') or die(mysql_error()); mysql_query($update_db,$conn) or die(mysql_error()); $msg = "Thanks for your dirt, <strong>$_POST[alias]</strong>. Your support and help wiht exposing Hempfield is appreciated!"; I just changed the password for that database, I forgot it was in plane sight! *smacks self*
  8. I don't understand where this error message is comming from: Parse error: syntax error, unexpected T_STRING in /home/david08/public_html/hasdsecret.co.cc/do_dirt.php on line 13 <?phpif ((!$_POST[alias]) || (!$_POST[article])) { header("Location: dirt_digger.html"); exit;}$conn = mysql_connect("localhost", "david08_dirt", "spartan") or die(mysql_error());mysql_select_db("david08_dirt",$conn) or die(mysql_error());$update_db = "insert into dirt_digger values ('', '$_POST[alias]', '$_POST[title]', '$_POST[article]') or die(mysql_error());mysql_query($update_db,$conn) or die(mysql_error());$msg = "Thanks for your dirt, <strong>$_POST[alias]</strong>. Your support and help wiht exposing Hempfield is appreciated!";?><html><head><title>HASD Dirty Little Secrets</title><style type="text/css">@import url("http://www.hasdsecret.co.cc/styles/overall.css");</style></head><body bgcolor="#FFFFFF"><table class="main" border="0"> <tr> <td colspan="2"> <table class="logo" border="0"> <tr valign="top"> <td> <center><img src="http://www.hasdsecret.co.cc/images/header.jpg" /></center><br /> <embed src="http://discussion.exofire.net/hasdsecret.co.cc/sound/bg_sound.mp3" width="100" height="25" controls="smallconsole" autostart="true" loop="true" /> <noembed> <bgsound src="http://discussion.exofire.net/hasdsecret.co.cc/sound/bg_sound.mp3" loop="infinite"/> </noembed><br /> </td> </tr> </table> </td> </tr> <tr class="mid" valign="top"> <td class="nav"> <a href="http://www.hasdsecret.co.cc/index.html"> Home </a> <br /> <a href="http://www.hasdsecret.co.cc/secrets.html"> Dirty Little Secrets </a> <br /> <a href="http://www.hasdsecret.co.cc/staff.html">Staff</a> <br /> <a href="http://www.hasdsecret.co.cc/dirt_digger.html">Dirt Diggers</a> <br /> <a href="http://www.hasdsecret.co.cc/dirt_digger_archive.html">Dirt Diggers Archives</a> <br /> </td> <td class="body"> <h3> Article Submitted </h3><br /> <br /><?php echo $msg; ?><br /><br /><br />The article you submitted was successfully added to our database. You may view it <a href="http://www.hasdsecret.co.cc/dirt_digger_archive.php">here</a>. </td> </tr> <tr class="bot" valign="top"> <td class="footer" colspan="2"> <center> <script type="text/javascript" src="http://x10hosting.com/adserve.js?corporate"></script><br /> Copyright © 2008 HASD Secrets and Their Volunteers<br /> All Outside Links and Articles are © Their Respective Owners<br /> </center> </td> </tr></table></body></html>
×
×
  • 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.