Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Please Help Me!!!

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Please Help Me!!!

    require($_SERVER['DOCUMENT_ROOT'].'/connect.php');
    if($_SESSION['username']){ 
     echo '<html>
    <br>
    <br>
    <br>
    <p><a href="http://minecraft.abyssal-legion.com/serverstatus/index.php?action=view&amp;id=185"><img src="Titans_files/statimg.png" alt="statimg.php?id=185&amp;theme=1"></a></p>
    <h2>Minecraft Alpha</h2> 
      <applet code="net.minecraft.Launcher" archive="MinecraftLauncher.jar?v=10" codebase="/game/" width="854" height="480">
        <param name="separate_jvm" value="true">    
        <param name="java_arguments" value="-Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false -Xms512M -Xmx512M">
        <param name="username" value="Titans">
        <param name="latestVersion" value="1284140847000">    
        <param name="downloadTicket" value="84db16aa292e588d5edb8e5564a72644">
        <param name="sessionId" value="7354043183612678087">
     </applet>
     <br>
     </html>';
    } else{
    echo 'You must login or sign up. [ <a href="/login.php">Login</a> | <a href="/register.php">Register</a> ]';
    }

    I need to get the <param name="username" value="Titans"> so it works with my php login script, please help me, I did everything I possibly could.

    Thanks,
    Titans.

  2. #2
    Member DavidFongs's Avatar
    Join Date
    Oct 2010
    Location
    Minneapolis, MN
    Posts
    107
    Thanks
    1
    Thanked 45 Times in 41 Posts

    Default Re: Please Help Me!!!

    Can you explain your problem a little bit more? Where is the error occurring, and how is it related to java?

  3. #3
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Please Help Me!!!

    Quote Originally Posted by Titans View Post
    require($_SERVER['DOCUMENT_ROOT'].'/connect.php');
    if($_SESSION['username']){ 
     echo '<html>
    <br>
    <br>
    <br>
    <p><a href="http://minecraft.abyssal-legion.com/serverstatus/index.php?action=view&amp;id=185"><img src="Titans_files/statimg.png" alt="statimg.php?id=185&amp;theme=1"></a></p>
    <h2>Minecraft Alpha</h2> 
      <applet code="net.minecraft.Launcher" archive="MinecraftLauncher.jar?v=10" codebase="/game/" width="854" height="480">
        <param name="separate_jvm" value="true">    
        <param name="java_arguments" value="-Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false -Xms512M -Xmx512M">
        <param name="username" value="Titans">
        <param name="latestVersion" value="1284140847000">    
        <param name="downloadTicket" value="84db16aa292e588d5edb8e5564a72644">
        <param name="sessionId" value="7354043183612678087">
     </applet>
     <br>
     </html>';
    } else{
    echo 'You must login or sign up. [ <a href="/login.php">Login</a> | <a href="/register.php">Register</a> ]';
    }

    I need to get the <param name="username" value="Titans"> so it works with my php login script, please help me, I did everything I possibly could.

    Thanks,
    Titans.
    Is that javascript by any chance? I don't know anything about javascript. This forum is mainly for the java programming language. While there may be some here who can answer your question, a lot probably can't.

    Wait, are you using php script? I found this website:

    PHP Login script tutorial

    php and javascript are beyond my knowledge. I think this website may help. It's the best I can do. Sorry.
    Last edited by javapenguin; November 11th, 2010 at 05:49 PM.

  4. #4
    Junior Member
    Join Date
    Nov 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please Help Me!!!

    The problem I am having is that I don't know how to get my one line that I mentioned above, to work with my php I already have a login script but, this is javascript for a game that is written in java, so this code you see is what I am trying to do. When you login in and the username value="titans" titans is what your name is in game, so what I am trying to do is make it so that when you register to my site you will have that username instead of titans. If you understand what I mean now.

  5. #5
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Please Help Me!!!

    No clue what to do, but it seems that the user is most likely entering the user name. If you could save it and store it, then username would be equal to that name.



    Sorry, I have no clue about scripting languages.

  6. #6
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Please Help Me!!!

    This is a php problem and not a java problem. Echo out the username where it should go
    <param name="username" value="<?php  echo $myusername;  ?>">