Jump to content

Toy

Members
  • Posts

    98
  • Joined

  • Last visited

Everything posted by Toy

  1. sorry for bad explanation and unrelevant code, Imma try to simplify I have a bunch of instances filtered by checkboxes, an instance can have several "categories" or well, checkboxes... and I just wanna narrow it down using jquery what I do for every checkbox press is hide the ones who does not fit in to the category, but if I then would uncheck the box, it wouldnt take in regard what has already been censored out and this is kind of where I dont really know how to think
  2. sorry, I know function filter(title,status) { $('.listdiv').each(function(){ if($(this).children("img").hasClass(name)) { } else{ if(status == 0) { $(this).css("display", "none"); } else { $(this).css("display", ""); } } }) } basicly I want to do it so that it takes regard of what boxes are already limiting when it unchecks(displays the instances)
  3. hello, im kind of stuck because I can't think clearly,using jquery right now its like, click a checkbox to limit the submissions to that category, and if a submissions lies within multiple categories you can click several check boxes to further nail down the results, but at the moment im just doing like, button calls function to hide all instances not under that category, uncheck the button to show them again, works great but if you would say have a submission that lies beyond 3 categories you could press three boxes and you would find it, but if you now would uncheck one box it'd just show all of the submissions not under that category even if they have been filtered before... it seems like im over complicating it, basicly I just need the thought process for filtering like this
  4. Toy

    create to png?

    it's ok, I solved it, .png didn't base of same quality meter as .jpg&gif and I had to do it slightly different
  5. Toy

    create to png?

    Anyone? I've googled for a while but I can't seem to find out why the png image creating is so different from jpg and gif, did a phpinfo and everything is enabled :/
  6. hi, I'm currently trying to resize and create pictures and .jpg/jpeg & .gif works perfectly but .png just creates an empty 0bit image, why?! $ = imagecreatefrompng(); imagecopyresampled(); imagepng(); I'm doing something like that and it - as said - works great with .jpg and gif but at png it just fucks up. :/
  7. Toy

    beginner to flash

    so I've always loved flash but due to the lack off decent tutorials in the as3 game community I'm kind of slow in the learning process. I'm currently stuck at some kind of character selection screen, there should be multiple choices of characters and when one of these is clicked it'd pass the data onto another frame or event or such, hmm, if you don't want to I don't really need code written for me or anything, I mostly just want to know the logic behind how to do it. also if you would recommend any good game tutorials feel free
  8. Toy

    HELLO GUYS :)

    sorry, I'm not that familiar with all edges off php, anyways thank you all:) much appreciated EDIT: why can't I mark it as solved? :S
  9. Toy

    HELLO GUYS :)

    <?php include("include/connect.php"); if (isset($_GET['value'])) { echo $_GET['value']; // still works and outputs the value fine if (isset($_POST['submit'])) { // here the value of "value" dissapears! mysql_query('insert into test (one, two) values("'.$_GET['value'].'", "normal text")'); } } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <input type="submit" name="submit"> </form> .php?value=hamburger will now output a lovely onetwo (BLANK FIELD)normal text
  10. Toy

    HELLO GUYS :)

    I'm pretty certain I'm not doing anything wrong, other values such as the session information was successfully inserted, only the GET data that just left a blank... :/ If you still want I can post my code if that would be to any help.
  11. I'm trying to $_GET a value and then input it into my database but this obviously doesn't work, I have no idea why. As soon as I run a "if (isset($_POST['submit']" action the value of the $_GET dissapears completly, I have no idea why, I've tried both XAMPP and WAMP with Apache and MySQL but it doesn't seem to work. Is this simply just not possible or am I doing something wrong...Help me!!!
  12. @sasa, I'd rather not as it would look totally wrong @swharrell, actually I'm not trying to do it on user input Look, there's simply four buttons, when I press button one, div 1 is going to appear, if I then click button three, div 3 is going to appear but div 1 should still be visible, get my drift? Is there any alternative to issets or whatever, because I'd love to not have to use checkboxes
  13. wouldn't that just show all of the boxes :S?
  14. oh, that's sad does anyone know any other ways of doing this if not using issets? it would be helpfull:) edit:oh, I didn't read your post properly, you mean like using text links or things like that?okay,thanks! would still need some help on how!
  15. hey! I have a site where I want to use multiple issets at the same time, like if I have four buttons and four issets: if(isset($_POST['one'])) { echo '<div class="example_box">one</div>'; } if(isset($_POST['two'])) { echo '<div class="example_box">two</div>'; } if(isset($_POST['three'])) { echo '<div class="example_box">three</div>'; } if(isset($_POST['four'])) { echo '<div class="example_box">four</div>'; } but for some reason it seems like only one isset can be activate at a time, is there any way to work this out or something :s? I've tried some variants of elseif stuff and such, but yeah, I'm pretty new at this stuff
  16. Toy

    Invitation!

    If we talk about the "insert" problem I had a close bracket in my real code, I accidently removed it when I deleted other unnecessary code. But it inserts everything else fine (username, password etc.) it's just the invite thing that gets blank after inserting. It seems like after "if (isset($_POST['submit']) ) {" $invite stops working, why is this :S?
  17. Toy

    Invitation!

    I'm really, really confused right now, sorry! I might have written a little unclear or whatever, but what I need help with is: Staying on the page without being redirected to /someplace if I get a validation error "you need to fill out all forms". Submitting the invite code to my database along with the rest of the user information.
  18. Toy

    Invitation!

    Oh! I don't have a problem with checking if the codes are valid or not, sorry but I removed bits of unrelevant code what I really need help with is my two problems I explained badly :s
  19. Hey! I'm really stuck on my for fun project... What it's supposed to do is quite obvious, grab an invitation code, check if it's created in the database: If it is it'll let you continue, if not it'll redirect you somewhere else, and it works great but I have two problems. The first problem I have is how to stay on the page if it reloads (like if I get the error "you need to fill out all forms" it'll reload) but when it reloads, the saved invitation code that I grabbed previously will be gone and it'll redirect to someplace, which... I don't want to happen! I tried using sessions to save your code but a user can just open the page several times and it'll create multiple sessions and he can therefore register multiple accounts when only one is meant to be registered or something, I'm kind of confused on this stage. Secondly I want to save the code used to register with in a table but this wont work, IDK why but it just won't. <?php include("connect.php"); $invite = $_GET['code']; $validate_invite = mysql_query("SELECT XX FROM XX WHERE invite = '$invite'"); $rows = mysql_num_rows($validate_invite); if($rows>0) { } else { header('Location: /someplace'); } ?> <?php include("include/header.php"); ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="register"> email <input type="text" name="email"> username <input type="text" name="username"> password <input type="text" name="password"> <input type="submit" name="submit" value="register"> </form> <?php if (isset($_POST['submit']) ) { $email = mysql_real_escape_string($_POST['email']); $username = mysql_real_escape_string($_POST['username']); $password = $_POST['password']; if (!$email || !$username || !$password) { echo 'you need to fill out all forms'; exit (); } $register_query = 'insert into XX (username, password, email, invite) values("'.$username.'", "'.md5($password).'", "'.$email.'", "'.$invite.'"'; mysql_query($register_query); } ?> If someone would care to help me out I would be very happy, I know I explained it kind of complicated and confusing but you get the point, hopefully. I love you phpfreaks:)
  20. Hey! I have a drop down field for my "register" form, but this is clearly easy to edit, I just used tamperdata for firefox and yeah...pretty easy, is there any way that you could prevent tampering with the values when submitting this form!?
  21. Toy

    why? :S

    I'm trying to load a PHP action with a button, I have a "if isset post..." you know what I mean, and it works great, but it wont echo the output, only insert it in the database...wtf am I doing wrong? :S example: if (isset($_POST['submit'])) { $xx = 'lol'; echo ''.$xx.', yo dawg!'; mysql_query("INSERT INTO xx (xx, xx) VALUES ('$xx', '$user[username]')"); }
  22. Toy

    stuck!!!

    Thank you so much! you're awesome
  23. Toy

    stuck!!!

    oh my god, thanks!!! the only issue I have left now is to display the username when logged in, I've tried various methods of fetching from query but nothing seems to happens :S if you or someone could help me with that I'd be forever grateful
×
×
  • 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.