Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. try $chance = 20; //that % so 1 in 5 $gamble = rand(1, 100); if($gamble =< $chance) { echo "win"; $gamble2= rand(1, 5); switch($gamble2) { case 1: include "win1.php"; break; case 2: include "win2.php"; break; case 3: include "win3.php"; break; case 4: include "win4.php"; break; case 5: include "win5.php"; break; } }else{ echo "loss"; }
  2. their the same function
  3. sorry i just fix his code no idea what $_POST['flags'] is refering to? unless i missed a post change if ($_POST['flags'] == 0) { echo '<select name="flags"><option value="0">Non-Burning Crusade</option><option value="8">Burning Crusade</option>'; }else{ echo '<select name="flags"><option value="8">Burning Crusade</option><option value="0">Non-Burning Crusade</option>'; } to if ($row['flags'] == 0) { echo '<select name="flags"><option value="8">Burning Crusade</option><option value="0">Non-Burning Crusade</option>'; }else{ echo '<select name="flags"><option value="0">Non-Burning Crusade</option><option value="8">Burning Crusade</option>'; } EDIT updated
  4. ok that code will list names in a drop down box so do you want another drop down box that will be populated depending on the selection of the first one ?
  5. whats the problem ? can you have a page with a if(isset($_GET['logout'])) { unset($_SESSION['username']); }
  6. is it in the html_public folder ? double check its .php check server in running got a link ?
  7. $savecontent = (isset($_POST['savecontent'])); change to $savecontent = (isset($_POST['savecontent']))?$_POST['savecontent']:"";
  8. OK see you SQL statement ie "SELECT * FROM table" if you add "ORDER BY stuff ASC" thus becoming "SELECT * FROM table ORDER BY stuff ASC" the list will be in ascending order (by field stuff) so you have a hyperlink on the page on the stuff text ie <a href=mysite.com\page.php?sort='stuff'&order=ASC now you SQL statement can be chaged to "SELECT * FROM table ORDER BY ".$_GET['sort']." ".$_GET['order'] make sense so far ?
  9. your thinking of a ticketing system.. theirs lots of free ones try osticket
  10. personally i would keep register_globals off
  11. IPB has a payment system built in
  12. php formatted if ($_POST['flags'] == 0) { echo '<select name="flags"><option value="0">Non-Burning Crusade</option><option value="8">Burning Crusade</option>'; }else{ echo '<select name="flags"><option value="8">Burning Crusade</option><option value="0">Non-Burning Crusade</option>'; }
  13. Let me be the first to say.. What ?
  14. $savecontent has NOT been set thus you can't set it to itself!!? i see no use for that line!
  15. seams like a HTML question.. unless you mean dynamic drop downs see the ajax section
  16. shot in the dark try max_execution_time: 0 thats zero also if(memory_get_usage() > 20000000) die("Out of memory"); might helps with debugging
  17. can you remove the print_r's also the site looks ok.. whats wrong with it ? the doubles have gone (from what i can see)
  18. look like your just trying to promo your site or something!!
  19. need more of the code above that!
  20. try echo "<a href='embed.php?mp3='$filename' onClick='return popup(this, \"notes\")'><img src='stream.gif' alt='Stream this song' width='14' height='14' border='0'></a>";
  21. what errors? i assume its just timieng out also the "not image", try save it to your desktop and open it in wordpad (you may see an error at the top)
  22. heehee foreach ($vendors as $K => $V) { if($vendors[$K]["vendLevel"] == "1") $vendor1[] = $vendors[$K]; //<--remove if($vendors[$K]["vendLevel"] == "1") $vendor1[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "2") $vendor2[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "3") $vendor3[] = $vendors[$K]; if($vendors[$K]["vendLevel"] == "4") $vendor4[] = $vendors[$K]; }
  23. echo substr($r["content"], 0, 150); substr
×
×
  • 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.