Well in java, when you ask user for information to be stored in a variable, the code is much like this:
public class ProgramName
{
public static void main(String[] args)
{
int fname, lname; //Variables. fname is First Name & lname is Last Name
System.out.println("Enter your first name"); //asking user for their first name
fname=Keyboard.readInt(); //getting information for their first name
System.out.println("Enter your last name"); //asking user for their last name
lname=Keyboard.readInt(); //getting informatino for their last name
System.out.println("Your name is" + fname + lname); //outputting their first and last name
}
}
----------------
In school, we have a file called Keyboard.java which we downloaded that allows user to enter as much information they desire and it gets stored within the variables I had specified.
Well I'm kinda looking for this same concept. In php, how would I make it where users type information and that information is stored within Variables or Strings so later on, I can display them or something. I really need to know this. I kinda understand PHP better thanks to this Java programming because they are much releated.
Edited by TheVault, 26 October 2006 - 03:08 PM.