Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. okay oni-kun suggestion is correct but using $_GET may not be the best solution in this set-up, So try this (i assume by default you want to SHOW the sidebar) above the sidebar add <?php if(empty($hidesidebar)) { ?> and below it add <?php } ?> Now when you load the page nothing has changed So now we want to hide the sidebar on some pages.. Now go to http://govbuzz.com/index.php?page=howtouse and your see the sidebar, Now open the howtouse.php file in the inc folder and add <?php $hidesidebar = true; ?> Now reload the howtouse page and the sidebar should be gone Rinse and repeat with any other files in the inc folder
  2. Technically this is not a PHP issue but a HTML one the sidebar is this code, (see below) remove that and the sidebar will be removed EDIT: However you say remove it on some pages..do you have a list of pages you want to remove it from ? a little more info would help <div id="sidebar"> <ul> <li> <h2>Note To Officials</h2> <p> <img src="http://govbuzz.com/images/note.png"> </p> </li> <li> <h2>Categories</h2> <ul> <li><a href="http://govbuzz.com/post.html">Post and Comment Here</a></li> <li><a href="http://govbuzz.com/classifieds.html">Classifieds</a></li> <li><a href="http://govbuzz.com/jobs.html">Employment</a></li> <li><a href="http://govbuzz.com/weather.html">Al Weather</a></li> <li><a href="http://govbuzz.com/government.html">Government Resources</a></li> </ul> </li> <li> <h2>Blogroll</h2> <ul> <li><a href="#">Uncategorized</a> (3) </li> <li><a href="#">Lorem Ipsum</a> (42) </li> <li><a href="#">Urna Congue Rutrum</a> (28) </li> <li><a href="#">Augue Praesent</a> (55) </li> <li><a href="#">Vivamus Fermentum</a> (13) </li> </ul> </li> <li> <h2>Archives</h2> <ul> <li><a href="#">December 2007</a> (29)</li> <li><a href="#">November 2007</a> (30)</li> <li><a href="#">October 2007</a> (31)</li> <li><a href="#">September 2007</a> (30)</li> </ul> </li> </ul> </div> <!-- end #sidebar --> <div style="clear: both;"> </div> </div> <!-- end #page --> </div> Its right at the bottom, just before <div id="footer"> <p>Copyright (c) 2009 Govbuzz.com. All rights reserved. </p> </div> </div> </body> </html>
  3. I don't see how your having variable conflicts unless your included them in the same file, a simpler solution would be to create a bridge class between them,
  4. I just downloaded a copy to take a peek, in the message.php file just update the parse function to something like this function parse($txt) { if($this->command != 'usrp') { $txt = $this->replaceBadWord(htmlspecialchars($txt)); if($this->command == 'msg') { $txt = $this->parseURL($txt); $txt = $this->keyWords($txt); } } return $txt; } function keyWords($txt) { $txt = str_replace("xuserx",$_COOKIE['UserName'],$txt); return $txt; }
  5. Hello and welcome to PHPFreaks, Personally I would do the replace xuserx for $username during the output stage, however I don't use Flashchat so I have no idea how it works, From what you have said I'm going to assume the user inputs a message the that's written to a database and then Flashchat read from the database to display the messages. So really my question is where is PHP involved ? as I'll need to know what entry points you have available, even if you Flashchat reads data from a data file for messages that would be a possible entry point.
  6. Please note that mikesta707 and I BOTH used the same order! that should work! if you still have problems then please let us know what the problem is; "This doesn't work" is truly not helpful, I could reply "it does for me" or "theirs a problem then" which helps just as much, I'll have to assume that $_GET['genre'] isn't set.. echo out the query and check.. also turn on error reporting and use mysql_error(); for more details see Daniel0 post that points to the manual,
  7. Erm.. maybe like this $extra_alb_qry .= " AND `cat_id` = " . $_GET['genre']; $extra_alb_qry .= " ORDER BY `id` DESC";
  8. Maq: Did you happen to look at the user name of who replied? onedumbcoder
  9. Yes it will work but as his having problems I'll have to assume his using a URL this thread is pretty unclear, Without any valid information most of the work is guess work, but for anyone else who reading this here's a good/bad example <?php print_r($_GET); ?> <form action="" method="GET"> <select name="Interests[]" multiple="multiple" size="10"> <option value=".NET Using C#">.NETUsing C#</option> </select> <input type="text" name="fine" value="can you see me"/> <input type="submit" value="This works fine"/> </form> <a href="?Interests=.NET Using C#&fine=can you see me">Bad Link</a><br> <!--Long good example: note that %20 could be replaced with + --> <a href="?Interests=.NET%20Using%20C%23&fine=can%20you%20see%20me">GoodLink</a><br> <!-- let PHP encode for you --> <a href="?Interests=<?php echo urlencode('.NET Using C#');?>&fine=<?php echo urlencode('can you see me');?>">GoodLink</a>
  10. If you true are want to learn then your, try out the tutorials mikesta707 has found for you and attempt to make them fit your site.. if when you have a problem first try to solve it yourself (the manual is one of the best things about PHP) and if your still stuck then ask for help, explain what your trying to do and what it is doing. IF you just want a site and don't want to learn PHP then freelance section is very useful,
  11. okay try this and report back the errors <?php $result = mysql_query("SELECT * FROM history ORDER BY `id` DESC LIMIT 0,5",$link) or die(mysql_error()); while($row = mysql_fetch_array($result)) { $history = $row['history']; $playerid = substr($history, 0, 4); $SQL = "SELECT * FROM `players` WHERE `id` = '$playerid' "; $getp = mysql_query($SQL,$link) or die($SQL.mysql_error()); $player_name = mysql_fetch_array($getp); $Player = $player_name['name']; echo "$Player $history<br/>"; } ?>
  12. He said his using GET but who know!
  13. Well that's a completely different question, You can't just send # via the URL as its a URL syntax character, your need to encode it use urlencode() and urldecode() to decode it # = %23 echo urlencode("#");
  14. Link = http://madtechiesupport.com/265770.php tested in IE8, FF3.5, Safari 4.0.3 (all work fine) code <?php $_POST['Interests'] = array('.NET Using C#'); $Interests = is_array($_POST['Interests']) ? $_POST['Interests'] : array(); ?> <select name="Interests[]" multiple="multiple" size="10"> <option value=".NET Using C#" <?php if(in_array('.NET Using C#',$Interests)) echo " SELECTED"; ?>>.NETUsing C#</option> </select> Screen shot [attachment deleted by admin]
  15. I can't re-create the problem the below code works fine <?php //$_POST['Interests'] = array('.NET Using C#'); $Interests = is_array($_POST['Interests']) ? $_POST['Interests'] : array(); ?> <select name="Interests[]" multiple="multiple" size="10"> <option value=".NET Using C#" <?php if(in_array('.NET Using C#',$Interests)) echo " SELECTED"; ?>>.NETUsing C#</option> </select>
  16. missing a quote! <?php $Interests = is_array($_POST['Interests']) ? $_POST['Interests'] : array(); ?> <select name="Interests[]" multiple="multiple" size="10"> <option value=".NET Using C#" <?php if(in_array('.NET Using C#',$Interests)) echo " SELECTED"; ?>>.NETUsing C#</option> </select>
  17. if its stopping, then the die is being called form $player_name = mysql_fetch_array($getp) or die(mysql_error()); View Source and read the last few lines you should see a SQL error
  18. View source and check the error So problem solved!
  19. Remove the following extensions ionCube, Zend Optimizer, and xcache and try it
  20. Security seams okay, comments in comments will fail in fact I would use this RegEX '/<!--.*?-->/si' (that doesn't support comments in comments either) for example, this will fail <!-- test <!-- another comment- -> --> test --> Leaving I'll move this to the RegEx section if you like
  21. What do you have so far ?
  22. Hows it bugging you ? error ? no result ? keeps tapping you on the shoulder and running away ?
  23. I guess you could use include include($file_location;
  24. <input type="button" name="more "value="View all categories"> should be <input type="button" name="more" value="View all categories">
  25. Please read the whole post. an point out what part doesn't make sense. <img src='MYsite.com/images/image.jpg' /> becomes <img src='MYsite.com/images.php?file=image.jpg' /> and the images.php reads and displays the $_GET['file'] file. the same is true for ANY file BUT this doesn't mean they can't save get a copy of the file Also I think your question is also asked here
×
×
  • 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.