User Profile

Collapse

Profile Sidebar

Collapse
anon538
anon538
Last Activity: Sep 6 '09, 12:23 AM
Joined: Sep 6 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • The code you have provided is without error, except for the random html floating in the middle of it, though I think that was just an accident when you posted it.
    However, I think you may have two issues:
    1. You switched from localhost to an actual server. Has your database information (contents, connection data) been preserved?
    2. You coded the giant if/else if block without an else case. If $_POST['rvt'] was never set, your...
    See more | Go to post

    Leave a comment:


  • anon538
    replied to Redirection page
    Yes, someone could just type the address and view the page. JS cookies will prevent most from being able to access the page, but recognize that this would be a completely insecure method, as JS and cookies are client side technologies. Any user with a bit of JS knowledge could delete, edit, or add a cookie that your website would interpret as valid. If the page's content is something that needs to be kept secure, you will need to recode it using...
    See more | Go to post

    Leave a comment:


  • anon538
    replied to Compiling a single file
    Thanks ThatThatGuy, for some reason that just didn't occur to me. I'll use that approach from now on.

    MrMancunian - I understand that would work, but it was kind of what I was trying to avoid. Creating an entire project for a single file seems like overkill.

    tlhintoq - It's the same thing I said above. A project seems like a bit much for a single program. I understand that it would be a great organization for larger...
    See more | Go to post

    Leave a comment:


  • anon538
    started a topic Compiling a single file

    Compiling a single file

    I have been interested in switching from Java to C# for a long time now. I typically write small, stand alone programs for contests. Each program is completely self contained. I am used to, in Java, creating a file, say pr21.java with a single class and main method, compiling it, and running it.
    Since I've switched to C#, I have been using MS Visual C# Express 2008 as my IDE. It has this weird obsession with encapsulating all of my programs...
    See more | Go to post

  • anon538
    replied to PHP Shell Command
    in PHP
    Fixed

    I appreciate the help, but I figured out the problem after playing around with it for a while. I was using the wrong command.
    Thanks anyway,
    anon
    See more | Go to post

    Leave a comment:


  • anon538
    replied to PHP Shell Command
    in PHP
    Unfortunately.. .

    I can't access the command line directly. I am using a shared server, and that is one of the restrictions that my host puts on me. I was just hoping that someone would see something syntactically wrong about my code before I have to go through tech support.
    See more | Go to post

    Leave a comment:


  • anon538
    started a topic PHP Shell Command
    in PHP

    PHP Shell Command

    I am attempting to compile and run a simple java file on my server, but I'm not getting any results. Here is what I'm trying to do:
    Code:
    <?php
    echo shell_exec("java/bin/javac Anon.java");
    ?>
    Java is installed in a folder named java.
    Anon.java is in the root directory along with this php file.
    When I run the code, nothing happens. No error messages, no compiled files, nothing....
    See more | Go to post

  • anon538
    started a topic Solving Java Mazes
    in Java

    Solving Java Mazes

    Hello. I'd like to start off by saying that this is not a homework problem of any sort. I am a high school student who frequents cs competitions, and I have never been able to solve problems concerning mazes. For instance, consider the following typical example:

    s1000
    01000
    01000
    01111
    00101
    e1111

    The s and e represent starting positions, while the 0's represent "walls"...
    See more | Go to post

  • anon538
    started a topic String to variable name
    in Java

    String to variable name

    Is it possible to reference a string to a variable name? For instance:
    Code:
    public class test
    {
     int somevariable = 1;
     public int getInt(String val)
     {
      //by some means, returns a value bases on String val
     }
    }
    How could I make this code work so that if I wrote getInt("somevar iable"), the method would return 1?

    Thanks in advance,
    anon
    See more | Go to post

  • anon538
    replied to PHP Automatic Processes
    in PHP
    Thanks, my hosting account does support that.
    See more | Go to post

    Leave a comment:


  • anon538
    started a topic PHP Automatic Processes
    in PHP

    PHP Automatic Processes

    Is there a way for PHP to automatically perform processes? For instance, on my website I have a photo of the day application. However, currently it works by checking if it is a new day, and then replacing the photo with another. The script checks every time a user visits the page, which seems like a waste of processing. What I would like to know is if there is a way that I can have the script automatically execute every 24 hours. Thanks in ...
    See more | Go to post

  • anon538
    replied to Is this secure code?
    in PHP
    Thank you both. I wasn't aware of the need for encrypting, but I guess I'll try it for extra security.
    See more | Go to post

    Leave a comment:


  • anon538
    started a topic Is this secure code?
    in PHP

    Is this secure code?

    I am making a simple password script. I have a login page that asks the user for a login and a password. It sends the two values to the following application via post (instead of get). Here is the application:
    Code:
    <?php
    $login = $_POST['login'];
    $pass = $_POST['password'];
    
    $tlogin = "Xavier";
    $tpass = "Anon537";
    $authorize=false;
    if($login==$tlogin&&$pass==$tpass)
    ...
    See more | Go to post

  • anon538
    replied to php.ini location
    in PHP
    Well, after weeks of being stumped, I grudgingly called tech support. They told me that my problem was that I was on a Windows OS. I changed to a Linux operating system, uploaded my own php.ini file into the root directory via FTP, and presto fopen() worked. Thanks to everyone else for their replies.
    See more | Go to post

    Leave a comment:


  • anon538
    replied to php.ini location
    in PHP
    I tried the ini_set() method. I tried
    Code:
    ini_set("allow_url_fopen","On");
    It didn't return an error message, but after a simple fopen() test, I found no change. I then tried to upload a php.ini file via FireFTP. I initially uploaded it in highest directory that I could find, which seemed to be called "/". It returned the error message Access is denied. I then stuck the php.ini file in...
    See more | Go to post

    Leave a comment:


  • anon538
    replied to Returning a value across classes
    in Java
    Thank you! I feel so stupid for not thinking of that.
    See more | Go to post

    Leave a comment:


  • anon538
    started a topic Returning a value across classes
    in Java

    Returning a value across classes

    I have a class named collect.java that looks like this:
    Code:
    public class collect {
    	public int returnX() {
    		int x=5;
    		return x;
    	}
    }
    I also have a main class-
    Code:
    public class testcollect {
        public static void main(String[] args) {
            collect collector = new collect();
            collector.returnX();
            System.out.println(x);
    ...
    See more | Go to post

  • anon538
    started a topic Lexicographic Applet
    in Java

    Lexicographic Applet

    I am trying to convert this simple java program into an applet. It imports 2 strings, and orders them lexicographical ly. I would like to have the applet have two input fields, and simply print out the appropriate lines of text. If someone could give me fully functional applet code (and no this isn't homework), I'd really appreciate it.


    Code:
    import java.util.Scanner;
    public class lexicographic {
        public static
    ...
    See more | Go to post

  • anon538
    started a topic php.ini location
    in PHP

    php.ini location

    I recently purchased a hosting account on a godaddy server. I haven't made any changes. I need to find the php.ini file. I am running on a windows platform. Thanks in advance.
    See more | Go to post

  • anon538
    replied to Java Equality
    in Java
    Thanks, it works perfectly.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...