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...
User Profile
Collapse
-
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...Leave a comment:
-
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...Leave a comment:
-
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... -
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,
anonLeave a comment:
-
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.Leave a comment:
-
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:
Java is installed in a folder named java.Code:<?php echo shell_exec("java/bin/javac Anon.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.... -
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"... -
String to variable name
Is it possible to reference a string to a variable name? For instance:
How could I make this code work so that if I wrote getInt("somevar iable"), the method would return 1?Code:public class test { int somevariable = 1; public int getInt(String val) { //by some means, returns a value bases on String val } }
Thanks in advance,
anon -
-
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 ... -
Thank you both. I wasn't aware of the need for encrypting, but I guess I'll try it for extra security.Leave a comment:
-
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)
-
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.Leave a comment:
-
I tried the ini_set() method. I tried
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...Code:ini_set("allow_url_fopen","On");Leave a comment:
-
-
Returning a value across classes
I have a class named collect.java that looks like this:
I also have a main class-Code:public class collect { public int returnX() { int x=5; return x; } }
...Code:public class testcollect { public static void main(String[] args) { collect collector = new collect(); collector.returnX(); System.out.println(x); -
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 -
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. -
No activity results to display
Show More
Leave a comment: