User Profile

Collapse

Profile Sidebar

Collapse
sake
sake
Last Activity: Feb 28 '08, 10:22 PM
Joined: Jan 6 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sake
    replied to Changing frame location
    in PHP
    Thanks alot for you help :) I had no idea you could mix the two languages like that. Works like a charm
    See more | Go to post

    Leave a comment:


  • sake
    replied to Changing frame location
    in PHP
    Kinda stuck here :(
    Any suggestions?
    See more | Go to post

    Leave a comment:


  • sake
    replied to Changing frame location
    in PHP
    Well its pretty simple. So far its just
    [php]
    if($myVar==$tar get){
    header("Locatio n: http://my.server.com") ;
    }
    [/php]
    But this code is running in a frame, so the redirection only applies to that frame's source, instead of the browser itself.

    Hope that makes sense...
    See more | Go to post

    Leave a comment:


  • sake
    replied to Changing frame location
    in PHP
    Ok, but this is conditional based on some PHP variable. How do i get it only to issue that command when that PHP if statement passes?...
    See more | Go to post

    Leave a comment:


  • sake
    started a topic Changing frame location
    in PHP

    Changing frame location

    I have a script running in a frame. This script needs to be able to redirect the browser to an entirely different location. However, with the header("locatio n: ") method, only that frame's source is changed. How would I redirect the browser away from those frames?
    See more | Go to post

  • sake
    replied to Disbaling Leaving the Page
    in PHP
    well its more or less a puzzle type of thing, so you have to win the puzzle before continuing anywhere. I already have the code to check whether or not they've won, and i guess i could just check for that on each page.
    See more | Go to post

    Leave a comment:


  • sake
    started a topic Disbaling Leaving the Page
    in PHP

    Disbaling Leaving the Page

    I don't mean disabling leaving the site entirely, forcing the user to remain at my god forsaken mess for the rest of eternity. But instead just disabling going to any other part of my site (until certain requirements are met). Is there any way to do this securely without putting a check for the requirements at the beginning of each page?

    -Sake
    See more | Go to post

  • sake
    replied to Forced refresh
    in PHP
    Ok thanks :P It wasn't so hard in javascript :)
    See more | Go to post

    Leave a comment:


  • sake
    started a topic Forced refresh
    in PHP

    Forced refresh

    I feel like I'm asking a lot of questions lately, so first, just let me thank all of you who have been helping me. It's saved me a world of time.

    Anyway, I have a layout of two frames. On the side there is the links frame (named "leftFrame" , and then there is the content page (named "mainFrame" ).

    I need a way to force refresh my leftFrame in the mainFrame. So, my php code is currently running in the...
    See more | Go to post

  • sake
    replied to Retrieving multiple rows
    in PHP
    [php]
    $query = mysql_query("SE LECT 'Id' FROM mobs WHERE location='$loca tion'");
    $aMobs = mysql_fetch_arr ay($query,MYSQL _NUM);//available mobs
    $randMob = rand()%(mysql_n um_rows($query)-1);
    $lastMob = $aMobs[randMob];
    [/php]
    So pretty much i'm trying to get all Id's where their location = $location. Then i want to randomly select an Id from the aMobs array. Any ideas?
    See more | Go to post

    Leave a comment:


  • sake
    started a topic Retrieving multiple rows
    in PHP

    Retrieving multiple rows

    Hey Everyone,
    Here's the code:
    [php]
    $query = mysql_query("SE LECT 'column' FROM table WHERE location='$loca tion'");
    $queryA = mysql_fetch_arr ay($query,MYSQL _NUM);
    [/php]
    MYSQL_NUM_ROWS claims that $query returns 2 rows. However, for some I am not able to access $queryA. I imagine some thing's wrong with my fetch array function. But I'm kind of at a loss of ideas here.

    Thanks alot...
    See more | Go to post

  • sake
    started a topic Deleting Cookies
    in PHP

    Deleting Cookies

    Hey Everyone:
    I dunno if it's just really late and i cant see the blatantly obvious error right in front of me, or there's something im doing thats completely out of my knowledge. Anyway, i ask you, is there anything wrong with this block of code:
    [php]
    if(isset($_COOK IE['lastMob'])){
    $lastMob = $_COOKIE['lastMob'];
    print "Cookie was set to: ".$_COOKIE['lastMob']."<br />";
    ...
    See more | Go to post

  • sake
    replied to Floating point restriction
    in PHP
    Thanks alot for the help, the round() function works great. :-)
    See more | Go to post

    Leave a comment:


  • sake
    started a topic Floating point restriction
    in PHP

    Floating point restriction

    Hey Everyone,
    Just wondering how I would restrict the amount of digits displayed when printing decimal floating point numbers. Not so it wouldnt calculate that many digits, just so it wouldnt display all of them.Hope that makes sense...

    Thanks in advance,
    Sake
    See more | Go to post

  • sake
    started a topic Ball Collision
    in C

    Ball Collision

    Dear All,
    I'm working on a 3d breakout game in C++, and I'm having a little trouble with the collision. It will detect that the ball has hit the paddle just fine, but after that, how do I determine where the ball should go? I've just been mirroring the direction
    Code:
    Ball.Velocity().x *= -1;
    But this makes for very uninteresting gameplay. Any help would be very greatly appreciated.
    See more | Go to post

  • sake
    replied to Switching Pics with the Date
    in PHP
    Thanks, that sounds really ingenious actually :)

    Just one other question though: How can I match dates from PHP and the server? I made the DATE column of type date, but Im not sure how to get the current date in the same format in PHP. I should use the date() function right?
    See more | Go to post

    Leave a comment:


  • sake
    started a topic Switching Pics with the Date
    in PHP

    Switching Pics with the Date

    I'm doing a little project for a site, and I needed to rotate a picture every day. I think I have most of the code planned out in my head, but I'm sorta stuck on how to tell when its a new day. Should I just store a date in my database, and if it doesn't match the current date, switch the picture? If I did that, how would I go about doing it? Is there a more efficient/easier way?

    Thanks Alot,
    Sake
    See more | Go to post

  • sake
    started a topic Optional method arguments
    in C

    Optional method arguments

    Hey,

    If you don't want to read all this, just look at the bottom part :-P

    I'm currently making a Tic Tac Toe game, just for fun, and ran across an interesting subject(for me). I have a method in class Player that can be used for two uses. It can check for a win and check for a possible win. Once it finds a possible win, it puts the X and Y coords of that possible win into a variable, located in the class. But what...
    See more | Go to post

  • sake
    started a topic Variable Truncation
    in C

    Variable Truncation

    Hi,

    How do I truncate a variable to a certain size? For instance, the integer "12345" truncated to "123", so that it has only three numbers. Or the string "Hello World" to just "Hello" so it has just five characters. I'm using C++.

    Thanks,
    Sake
    See more | Go to post

  • sake
    replied to C++ Lists
    in C
    Works great. Thanks alot :-)
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...