Jump to content

afallingpanda

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by afallingpanda

  1. your all a bunch of retards, im out, go fuck ur mothers
  2. okay so ive just reported your post and i will see to blocking you on this site some how, reason being you have absolutely no knowledge in fixing this so you are just posting complete junk for god knows what reason, "Do something to solve this your self" = you absolute idiot, wtf you think i been doing for last 2 days. "instead of whining about what to do"= err this is a forum where people ask for help, if you dont like it then get out. and also, i showed you a picture of the query running and outputting the records, so again dont ask for code that is already pretty much had evidence shown to, It is not duplicate data because its the only data thats in there ( i delete them all one by one) . next time, dont pretend like you CAN solve problems when you clearly dont even know what your talking about. To all others: sorry about the above, his just really annoyed me, i would appreciate if you could help me out. thanks
  3. IVE SHOWN YOU CODE. Tell me what code you want to see and il show you.
  4. because i went into the database my self and saw that they were entered as ones, what information do you need, that i can tell you, all the field types are there. and they are all INT apart from "username" ,"system", and "reference" aka "verified" If you read my whole post and clicked on the link, you wouldnt of asked the question of how i know the ones are produce, just like previously where you didnt read my previous thread and thought i was using PDO and not PDOStatement
  5. still need help with this please
  6. obviously there are not any errors lol, otherwise i would of solved it. SO I CANT CHECK FOR ERRORS IN MY CODE!
  7. the ones im not using bound params for is game_id, mode_id, map_id
  8. a) what is a database table definition? b) no chance.
  9. hello guys, so i have an interface that inserts data into a mysql database with PDO. so i am binding params, however not everything in my query is binded, as some of them are just ints which i entered my self (see below): $query = $pdo->prepare('INSERT INTO leaderboards (rank, username, rounds, players, last_round_time, system, verified, game_id, mode_id, map_id) VALUES (?, ?, ?, ?, ?, ?, ?, 3, 1, 8)'); $query->bindValue(1, $rank); $query->bindValue(2, $username); $query->bindValue(3, $rounds); $query->bindValue(4, $players); $query->bindValue(5, $lastroundtime); $query->bindValue(6, $system); $query->bindValue(7, $reference); $query->execute(); Now as you can see the game_id,mode_id,and map_id are the ones which i set the value of in the query. here is the result in the table: http://gyazo.com/93facff162aa944043176c31119eb16b As you can see all the data is succesfully inserted depending on what the user types into the interface, but the last 3 columns are for some reason "1" and not the ones i put in the query? Why is this? please help? mabey some syntax fault?
  10. Hello guys, so let me give some information, i have a database which is storing some information, and im building a simple search feature which just searches for particular things in the database. however something is not working, here is my code and the results: if (isset($_POST['usernamesearch'], $_POST['gamesearch'], $_POST['modesearch'], $_POST['mapsearch'])){ $usernamesearch = $_POST['usernamesearch']; $gamesearch = $_POST['gamesearch']; $modesearch = $_POST['modesearch']; $mapsearch = $_POST['mapsearch']; class Leaderboarded{ public function fetch_all(){ global $pdo; global $usernamesearch; global $gamesearch; global $modesearch; global $mapsearch; $query = $pdo->prepare('SELECT * FROM leaderboards WHERE username="?" AND game_id="?" AND mode_id="?" and map_id="?"'); $query->bindValue(1, $usernamesearch); $query->bindValue(2, $gamesearch); $query->bindValue(3, $modesearch); $query->bindValue(4, $mapsearch); $query->execute(); return $query->fetchAll(); } } $leaderboarded = new Leaderboarded; $leaderboardeds = $leaderboarded->fetch_all(); <table cellpading=0 cellspacing=0 border=1> <tr> <th>playerID</th> <th>Username</th> <th>Rank</th> <th>System</th> <th>Wins</th> <th>Losses</th> <th>Kills</th> <th>Returns</th> <th>Verified</th> <th>Revives</th> <th>Downs</th> <th>Taints</th> <th>Rounds</th> <th>players</th> <th>LastRoundTime</th> <th>TotalTime</th> <th>mode_id</th> <th>map_id</th> <th>game_id</th> </tr> <?php foreach ($leaderboardeds as $leaderboarded){ ?> <tr> <td><?php echo $leaderboarded['player_id']; ?></td> <td><?php echo $leaderboarded['username']; ?></td> <td><?php echo $leaderboarded['rank']; ?></td> <td><?php echo $leaderboarded['system']; ?></td> <td><?php echo $leaderboarded['wins']; ?></td> <td><?php echo $leaderboarded['losses']; ?></td> <td><?php echo $leaderboarded['kills']; ?></td> <td><?php echo $leaderboarded['returns']; ?></td> <td><?php echo $leaderboarded['verified']; ?></td> <td><?php echo $leaderboarded['revives']; ?></td> <td><?php echo $leaderboarded['downs']; ?></td> <td><?php echo $leaderboarded['taints']; ?></td> <td><?php echo $leaderboarded['rounds']; ?></td> <td><?php echo $leaderboarded['players']; ?></td> <td><?php echo $leaderboarded['last_round_time']; ?></td> <td><?php echo $leaderboarded['total_time']; ?></td> <td><?php echo $leaderboarded['mode_id']; ?></td> <td><?php echo $leaderboarded['map_id']; ?></td> <td><?php echo $leaderboarded['game_id']; ?></td> </tr> <?php } ?> </table> </div><?php } } ?> Now.. this is what is outputted on the screen: http://gyazo.com/1cdd7548ee4b01c85dd4c4ca5dbdaf24 As you can see i think the problem is that the last part where the data is ment to be outputted, isnt working. but why? any help will be very appretiated, thanks
  11. right yes, but when i looked into wordpress it seems it makes me want to sign up to a new domain and what not just for a blogging site, im wanting just a script or something i can download onto my EXISTING sites and just to add it to one of my pages.
  12. hello guys, so im in need of some help today, basically in my website i am making a page called "news" in which staff members can make announcement/posts/blogs or whatever you want to refer to it as, i would give an example but pretty much i think people know what i mean. now the problem is i could build mabey a cms and just link it in through a database, but because im on a short time rate, i was wondering is there any sort of free addons i can install via my control panel (cpanel from hostgater) or any existing scripts that can do this. thanks so much
  13. UPDATE: Ive added this code to make the fade in happen: <script> $(document).ready(function(){ $(document).ready(function(){ $("#div1").fadeIn(5000); $("#div11").fadeIn(5000); $("#div12").fadeIn(5000); $("#div13").fadeIn(5000); $("#div2").fadeIn(7000); $("#div22").fadeIn(7000); $("#div23").fadeIn(7000); $("#div24").fadeIn(7000); $("#div3").fadeIn(9000); }); }); </script> and it fades in my images AND text in google chrome, but in internet explorer only my text fades in, my images wont fade in. HOW do i make it work on internet explorer too?
  14. so ive got some text on my site and i was wondering how i would make that text fade in when the page is loaded. i dont mind if its jquery or js thanks in advanced.
  15. So then what would i write in my htaccess file to block the user from browsing my directory?
  16. hello guys, i was wondering, i wanted to stop people from just typing in the folder root in the url and being able to see the directory browsing page, so instead of placing .htaccess on every folder, i decided to add a index.php to every folder which has a "header("location: ../index.php");". So basically if a user does go to the link of the folders, they get redirected back to the index page. Now my only question is, is this safe and secure as .htaccess? like no one can work their way around it and see the directory browsing somehow? Thanks in advanced.
  17. Hello master php coders, i have one question today. Basically im trying to build a site which has a profile feature you can login to your account and make posts on the site. The site is also going to have a tab called forums which is going to be just a forum software such as ipboard or xenforo, but my question is how would i be able to make it so you only have to login ONCE, so i login to my website account and dont have to relogin to xenforo ( so basically the accounts are ONE) . Or if this is not possible, what would be the closest thing i could do do make it behave like that. thanks for helping guys
  18. any help please
  19. That is without selecting ANyTHING or clicking anything, it simply does that when i load the page. and thats all the code for this. i will now paste the code for that entire page: <?php $safe_myuri = addslashes($myuri); $row_parent_folder_title = $row_object_title; $row_parent_url = $row_url; $myquery = sql_query("SELECT * FROM webmanage_objects AS a WHERE a.parentid='$row_objectid' AND a.is_visible='1' AND a.archived='0' AND a.url='$safe_myuri' LIMIT 0,1"); if (!sql_num_rows($myquery)) { require("source/404error.php"); exit(); } else { $myrow = sql_fetch_assoc($myquery); transfer_row($myrow); } // // Machines for sale view // print_header($row_object_title); print "<div class=\"heading\"><div class=\"b\"><h2><a href=\"/machines-for-sale/\" style=\"text-decoration: none; color: #1e2a5f;\">Machines for Sale</a> > <a href=\"/machines-for-sale/$row_parent_url/\" style=\"text-decoration: none; color: #1e2a5f;\">$row_parent_folder_title</a></h2></div></div>\n"; print "<div class=\"clear\"></div>\n"; start_parkes_rounded(); print "<div class=\"hotspot blue tlc machine\">\n"; print "<div class=\"item\">\n"; print "<h2>$row_object_title</h2>\n"; print "<p class=\"red fRight cRight\"><strong>Stock Ref: $row_object_tagline</strong></p>\n"; print "<div class=\"clear\"></div>\n"; print "<div class=\"images\"> <script type=\"text/javascript\"> //<![CDATA[ Sys.WebForms.PageRequestManager._initialize('ctl00$Content$Scr1', document.getElementById('aspnetForm')); Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00$Content$ImagesUP'], [], [], 90); //]]> </script>\n"; // // Images Container // $images = array(); $myquery = sql_query("SELECT * FROM webmanage_uploads WHERE filestore='image' AND objectid='$row_objectid' ORDER BY ordering, fileid"); while ($myrow = sql_fetch_assoc($myquery)) { $row_fileid = $myrow["fileid"]; if (is_file("$imagebase_location/$row_fileid"."_machine_large.jpg")) { $images[] = "/images/managed/$row_fileid"."_machine_large.jpg"; } } print "<div id=\"ctl00_Content_ImagesUP\">\n"; if (count($images)) { $myimage = $images[0]; print "<div class=\"main_image\">\n"; print " <img id=\"ctl00_Content_MainImage\" class=\"mainImage\" src=\"$myimage\" alt=\"$row_object_title\" style=\"border-width:0px;\" />\n"; print "</div>\n"; } print "<ul>\n"; $counter = 0; foreach($images as $myimage) { $counter++; if ($counter < 10) { $counter_text = "0$counter"; } else { $counter_text = "".$counter; } $myimage_small = str_replace("machine_large","machine_small",$myimage); if (($counter % 3) == 0) { $padding_right = "padding-right: 0px;"; } else { $padding_right = "padding-right: 15px;"; } print "<li id=\"ctl00_Content_RepMachineImages_ctl{$counter_text}_ImageItem\" style=\"$padding_right\"><a class=\"imagesListImage\" href='$myimage' target=\"_blank\" style=\"margin: 0px; float: left;\"><img id=\"ctl00_Content_RepMachineImages_ctl{$counter_text}_ListImage\" src=\"$myimage\" height=75 style=\"border-width: 0px; margin-left: auto; margin-right: auto;\" /></a></li>\n"; } print "</ul>\n"; print "</div>\n"; print "</div>\n"; print"<div style=\"position:absolute;bottom:20px;right:20px;\">"; print"<form method=\"post\" action=\"\">"; print"<input type=\"radio\" name=\"lang\" value=\"English\">English<br>"; print"<input type=\"radio\" name=\"lang\" value=\"German\">German"; print"<input type=\"submit\" value=\"Change\" />"; print"</form>"; print"</div>"; if(isset($_POST['lang'])) { $myRadio = $_POST['lang']; if ($myRadio == "English") { print"<h1>English</h1>"; } elseif ($myRadio == "German") { print"<h1>German</h1>"; } } printf('<pre>%s</pre>', print_r($_POST, true)); print "<div class=\"machine_details_right\"><div class=\"desc\">\n"; print "$row_object_content\n"; print "</div>\n"; print "<p class=\"buttons\">\n"; $safe_object_title = urlencode($row_object_title); print " <a id=\"ctl00_Content_EnquireBtn\" class=\"btn red-whi\" href=\"/index.php?page=contact&stock_ref=$row_object_tagline&desc=$safe_object_title\">Enquire about this machine</a>\n"; print " <a id=\"ctl00_Content_HlBackToListings\" class=\"btn grey\" href=\"./\">Back to listings</a>\n"; print "</p>\n"; print "<div class=\"clear\"></div>\n"; print "</div> <div class=\"clear\"></div> </div> <div class=\"clear\"></div> </div> <div class=\"clear\"></div>\n"; end_parkes_rounded(); print_footer(); ?>
  20. http://gyazo.com/24428ad07e1c606bb904c0658ae5b4b4 That is what the output is ( at the top its outputted). And by the way that is outputed as soon as the page loads, then when i choose and click submit it stays the same. THANKS SO FAR
  21. sorry? where did you get this from?? printf('<pre>%s</pre>', print_r($_POST, true));
  22. print"<div style=\"position:absolute;bottom:20px;right:20px;\">"; print"<form method=\"post\" action=\"\">"; print"<input type=\"radio\" name=\"lang\" value=\"English\">English<br>"; print"<input type=\"radio\" name=\"lang\" value=\"German\">German"; print"<input type=\"submit\" value=\"Change\" />"; print"</form>"; print"</div>"; if(isset($_POST['lang'])) { $myRadio = $_POST['lang']; if ($myRadio == "English") { print"<h1>English</h1>"; } elseif ($myRadio == "German") { print"<h1>German</h1>"; } } theres my code.. and heres what i am seeing: http://gyazo.com/d19dd3d405d367365c86ba19240b1713 as you can see the h1 is not appearing
  23. hello guys, ive made a script to basically execute two different things depending on which radio button is selected: print"<div style=\"position:absolute;bottom:20px;right:20px;\">"; print"<form method=\"post\" action=\"\">"; print"<input type=\"radio\" name=\"lang\" value=\"English\" >English<br>"; print"<input type=\"radio\" name=\"lang\" value=\"German\">German"; print"<input type=\"submit\" value=\"Change\" />"; print"</form>"; print"</div>"; $myRadio = intval($_POST['lang']); if ($myRadio == "English") { print"<h1>English</h1>"; }elseif ($myRadio == "German") { print"<h1>German</h1>"; } this doesnt work, firstly for some reason it just displays English straight away even though nothing is even ticked yet. and when i do change to "german" and click the button, it doesnt change... PLEASE help me guys, how would i make it work.
×
×
  • 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.