Jump to content

pheidole

Members
  • Content Count

    15
  • Joined

  • Last visited

Community Reputation

0 Neutral

About pheidole

  • Rank
    Member
  1. wow Gin, is life so bad that you cant even take wha is an obvious joke? Very defensive, i suggest you may have a chemical imbalance. I do hope your chemical imbalance is not caught in an infinite loop! Thats another joke haha, get it ? Just making sure, because you did not get the first one when the others did..
  2. If you need to see my admin.php file let me know <?php ini_set('display_errors',1); error_reporting(E_ALL); echo 'Logged in'; ?> <form> Login : <input type=textbox name=login><br> Password : <input type=password name=pass><br> <input type=button value="OK" onCLick="if (login.value=='admin'&&pass.value=='brent187') window.location.replace('admin.php'); "> </form>
  3. I have copious amounts of books on php that i have been reading for the last 10 months.. My favorite one so far has been latest version of PHP & MySQL: Novice to Ninja.. there are a cple other books i have read and continue to read that are extremely helpful. Unfortunately i purchased a cple books that teach you outdated programming: functions like mysql_connect and so on. Anyhow i found that coding in php is rather fun and the basics of of how php and mysql works it not extremely challenging to figure out. Its unlimited to what you can do it seems. I find the hairy part to be SECURITY. I find it challenging to write code that is secure.. I have written a few basic scripts and posted the code in a few different spots asking for help when i get stuck. The code i write does what is suppose to do most of the time, if not i figure it out with help, but guess what ? ill get a comment from an experienced programmer that tells me my code is prone to sql injection and so on. Its just a headache and makes learning php and mysql rather tedious.you spend hours coding just to find out there are 5 possible exploits in 250 lines of code. Fortunately i find it fun and addicting so i do not plan to stop anytime soon. PS thanks for the helpful group
  4. Im trying to find some examples on how to pull results from a mysql database. I have different ants species stored in the database for each state. I would like to fetch all the ants found in the database from the selected state and echo them to the page... here is the html <!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="view.css" media="all"> <script type="text/javascript" src="view.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <title></title> <style> .hover_bkgr_fricc{ background:rgba(0,0,0,.4); cursor:pointer; display:none; height:100%; position:fixed; text-align:center; top:0; width:100%; z-index:10000; } .hover_bkgr_fricc .helper{ display:inline-block; height:100%; vertical-align:middle; } .hover_bkgr_fricc > div { background-color: #fff; box-shadow: 10px 10px 60px #555; display: inline-block; height: auto; max-width: 551px; min-height: 100px; vertical-align: middle; width: 60%; position: relative; border-radius: 8px; padding: 15px 5%; } .popupCloseButton { background-color: #fff; border: 3px solid #999; border-radius: 50px; cursor: pointer; display: inline-block; font-family: arial; font-weight: bold; position: absolute; top: -20px; right: -20px; font-size: 25px; line-height: 30px; width: 30px; height: 30px; text-align: center; } .popupCloseButton:hover { background-color: #ccc; } .trigger_popup_fricc { cursor: pointer; font-size: 20px; margin: 20px; display: inline-block; font-weight: bold; } </style> </head> <body> <script> $(document).ready(function() { $(".trigger_popup_fricc").click(function(){ $('.hover_bkgr_fricc').show(); }); $('.hover_bkgr_fricc').click(function(){ $('.hover_bkgr_fricc').hide(); }); $('.popupCloseButton').click(function(){ $('.hover_bkgr_fricc').hide(); }); }); </script> <a class="trigger_popup_fricc">popup</a> <div class="hover_bkgr_fricc"> <span class="helper"></span> <div> <div class="popupCloseButton">X</div> <img id="top" src="top.png" alt=""> <div id="form_container"> <h1><a>Queen Ant Databank</a></h1> <form id="form_34089" class="appnitro" method="post" action=""> <div class="form_description"> <h2>Queen Search</h2> <p>Make Sure Sure All Your Data Is Correct!</p> </div> <ul > <li id="li_1" > <label class="description" for="element_1">Size of Queen </label> <span> <input id="element_1_1" name="element_1" class="element radio" type="radio" value="1" /> <label class="choice" for="element_1_1">1-2 mm</label> <input id="element_1_2" name="element_1" class="element radio" type="radio" value="2" /> <label class="choice" for="element_1_2">2-4 mm</label> <input id="element_1_3" name="element_1" class="element radio" type="radio" value="3" /> <label class="choice" for="element_1_3">4-6 mm</label> <input id="element_1_4" name="element_1" class="element radio" type="radio" value="4" /> <label class="choice" for="element_1_4">6-8 mm</label> <input id="element_1_5" name="element_1" class="element radio" type="radio" value="5" /> <label class="choice" for="element_1_5">8 + mm</label> </span> </li> <li id="li_2" > <label class="description" for="element_2">State Found </label> <div> <select class="element select medium" id="element_2" name="element_2"> <option value="1" selected="selected">All States</option> <option value="2" >Alaska</option> <option value="3" >Alabama</option> <option value="4" >Arizona</option> <option value="5" >Arkansas</option> <option value="6" >California</option> <option value="7" >Colorado</option> <option value="8" >Connecticut</option> <option value="9" >Delaware</option> <option value="10" >Florida</option> <option value="11" >Georgia</option> <option value="12" >Hawaii</option> <option value="13" >Idaho</option> <option value="14" >Illinois</option> <option value="15" >Indiana</option> <option value="16" >Iowa</option> <option value="17" >Kansas</option> <option value="18" >Kentucky</option> <option value="19" >Louisiana</option> <option value="20" >Maine</option> <option value="21" >Maryland</option> <option value="22" >Massachusetts</option> <option value="23" >Michigan</option> <option value="24" >Minnesota</option> <option value="25" >Mississippi</option> <option value="26" >Missouri</option> <option value="27" >Montana</option> <option value="28" >Nebraska</option> <option value="29" >Nevada</option> <option value="30" >New Hampshire</option> <option value="31" >New Jersey</option> <option value="32" >New Mexico</option> <option value="33" >New York</option> <option value="34" >North Carolina</option> <option value="35" >North Dakota</option> <option value="36" >Ohio</option> <option value="37" >Oklahoma</option> <option value="38" >Oregon</option> <option value="39" >Pennsylvania</option> <option value="40" >Rhode Island</option> <option value="41" >South Carolina</option> <option value="42" >South Dakota</option> <option value="43" >Tennessee</option> <option value="44" >Texas</option> <option value="45" >Utah</option> <option value="46" >Vermont</option> <option value="47" >Virginia</option> <option value="48" >Washington</option> <option value="49" >West Virginia</option> <option value="50" >Wisconsin</option> <option value="51" >Wyoming</option> </select> </div> </li> <li class="buttons"> <input type="hidden" name="form_id" value="34089" /> <input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" /> </li> </ul> </form> </div> <img id="bottom" src="bottom.png" alt="" > </div> </div> </body> </html>
  5. ha, $.get("search1.php", {term: inputVal}).done(function(data){ was $.get("search.php", {term: inputVal}).done(function(data){ so it kept going to new search bar on that page that looked the same thanks
  6. I changed all to $_GET since its not requesting anything that needs hidden Also may i ask whats wrong with $_REQUEST bottom variable look usable ? $sql = "SELECT state FROM loc WHERE state LIKE '%$name%'";
  7. i edited the post. I found them , thanks
  8. ill try to find POP examples on prepared statements... nevermind ....... i just looked at first bit of code sorry
  9. Getting 0 results $server = "localhost"; $user = "root"; $pass = ""; $dbname = "st"; $link = mysqli_connect($server, $user, $pass, $dbname); if (!$link) { die();} //////////////////////////////////////////////////////////////////////////////////////// if(isset($_REQUEST["term"])){ $sql = "SELECT * FROM loc WHERE state LIKE '%$name%' "; if($stmt = mysqli_prepare($link, $sql)){ mysqli_stmt_bind_param($stmt, "s", $param_term); $param_term = $_REQUEST["term"] . '%'; if(mysqli_stmt_execute($stmt)){ $result = mysqli_stmt_get_result($stmt); if(mysqli_num_rows($result) > 0){ while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)){ echo "<p>" . $row["name"] . "</p>"; } } else{ echo "<p>0</p>"; } } else{ echo "ERROR: $sql. " . mysqli_error($link); } } mysqli_stmt_close($stmt); } mysqli_close($link);
  10. I did your modifications and it worked perfectly. Thanks CyberR
  11. yeah, its firefox i don't think Mozilla makes any other browsers do they? i have developer tools installed, no errors i just put the Javascript and css into the same file... It should run, but.... If you wish you can toss i into a file and give it a go and see if it works for you.. i think imma move on and concede defeat and try my secondary plan. I really was wanting to keep js off my site anyhow <!DOCTYPE html> <html> <head> <title></title> <script> .hover_bkgr_fricc{ background:rgba(0,0,0,.4); cursor:pointer; display:none; height:100%; position:fixed; text-align:center; top:0; width:100%; z-index:10000; } .hover_bkgr_fricc .helper{ display:inline-block; height:100%; vertical-align:middle; } .hover_bkgr_fricc > div { background-color: #fff; box-shadow: 10px 10px 60px #555; display: inline-block; height: auto; max-width: 551px; min-height: 100px; vertical-align: middle; width: 60%; position: relative; border-radius: 8px; padding: 15px 5%; } .popupCloseButton { background-color: #fff; border: 3px solid #999; border-radius: 50px; cursor: pointer; display: inline-block; font-family: arial; font-weight: bold; position: absolute; top: -20px; right: -20px; font-size: 25px; line-height: 30px; width: 30px; height: 30px; text-align: center; } .popupCloseButton:hover { background-color: #ccc; } .trigger_popup_fricc { cursor: pointer; font-size: 20px; margin: 20px; display: inline-block; font-weight: bold; } </style> </head> <body> <sript> $(window).load(function () { $(".trigger_popup_fricc").click(function(){ $('.hover_bkgr_fricc').show(); }); $('.hover_bkgr_fricc').click(function(){ $('.hover_bkgr_fricc').hide(); }); $('.popupCloseButton').click(function(){ $('.hover_bkgr_fricc').hide(); }); }); </script> <a class="trigger_popup_fricc">popup</a> <div class="hover_bkgr_fricc"> <span class="helper"></span> <div> <div class="popupCloseButton">X</div> <p>adding latert<br />blah!</p> </div> </div> </body> </html>
  12. latest version of mozilla ... Works in my browser when used here https://html-online.com/articles/simple-popup-box/ Using the same browser in localhost. Im guessing it has to do with XAMMP ?
  13. Nothing happens when i click on it.... Not sure why... Could it be XAMMP? Im running the latest version and do not have access to a live server to test. Thanks ///////////////////////////////////////////////////////////////////////////////////////////////////////////// <!DOCTYPE html> <html> <head> <title></title> <style> .hover_bkgr_fricc{ background:rgba(0,0,0,.4); cursor:pointer; display:none; height:100%; position:fixed; text-align:center; top:0; width:100%; z-index:10000; } .hover_bkgr_fricc .helper{ display:inline-block; height:100%; vertical-align:middle; } .hover_bkgr_fricc > div { background-color: #fff; box-shadow: 10px 10px 60px #555; display: inline-block; height: auto; max-width: 551px; min-height: 100px; vertical-align: middle; width: 60%; position: relative; border-radius: 8px; padding: 15px 5%; } .popupCloseButton { background-color: #fff; border: 3px solid #999; border-radius: 50px; cursor: pointer; display: inline-block; font-family: arial; font-weight: bold; position: absolute; top: -20px; right: -20px; font-size: 25px; line-height: 30px; width: 30px; height: 30px; text-align: center; } .popupCloseButton:hover { background-color: #ccc; } .trigger_popup_fricc { cursor: pointer; font-size: 20px; margin: 20px; display: inline-block; font-weight: bold; } </style> </head> <body> <script src="pop.js"></script> <a class="trigger_popup_fricc">popup</a> <div class="hover_bkgr_fricc"> <span class="helper"></span> <div> <div class="popupCloseButton">X</div> <p>adding latert<br />blah!</p> </div> </div> </body> </html> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// IN THE POP FILE SAVED IN THE SAME DIRECTORY $(window).load(function () { $(".trigger_popup_fricc").click(function(){ $('.hover_bkgr_fricc').show(); }); $('.hover_bkgr_fricc').click(function(){ $('.hover_bkgr_fricc').hide(); }); $('.popupCloseButton').click(function(){ $('.hover_bkgr_fricc').hide(); }); });
×
×
  • 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.