Computer problems,Computer help
*AX SOFT>>>Programming & Design

PHP programming help using forms?


When I run this on my browser I find out that after clicking submit the code I wrote would show up. Here's the program I wrote

At welcome.html:
<html>
<body>
<form action="welcome.php" method="get">
Name: <input type="text" name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>

At welcome.php:
<html>
<body>
Welcome <?php echo $_GET["name"]; ?>.

You are <?php echo $_GET["age"]; ?> years old!
</body>
</html>

so when I run this, welcome.html works right but after pressing submit, rather than a response the welcome.php code is returned
What is wrong with this program?

I have installed all the necessary software for php and have built and run previous php programs sucessfully.

that should work, if you are getting back the php then php is not configured properly, at least not where that file is located.

But here is a very simple test, save this in the same place as a .php file, see what it gives back. If it doesn't give you info on your php installation, it's not working.

<?php
phpinfo();
?>

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Uploading Website help!!!?

    That is a server error. If you can use a local FTP to upload instead of GoDaddy's, i would try that way. A lot easier to use something like SmartFTP and set it up to connect. GoDaddy shou...

  • Visual Basic- StartingHelp?

    sure you can do it that way.. but you will need to make sure you are getting the floor of the change/2000... or you can use a series of while loops.. while intchange >= 2000 { intchange-= ...

  • Unix command helps!!?

    date -v -1d "+%D" >yesterday.txt (better read the man page to figure out why/how this works) ls -a /bin >~/temp/bin.txt

    ...
  • How do I make a groupbox border appear and darker and black?

    Basically the border code has a lot of border styles and some are pretty neat if the border size is set correctly. Like the style "inset": border: 5px inset #000; A simple border: ...

  • Adobe Photoshop Ghost Rider text recreate poster???

    Yes, you can create it in photoshop alone. No need additional images. 1. Steel effect can be achieved by gradient fill in blending options. Or, if your PS do not have blending option, just add a...

  • Changing text in a Div Box?

    Since the div has a class assigned to it, you refer to the class with CSS: <div class="Div1">HOW WOULD I CHANGE THIS TEXT???</div> <style type="text/css"> ...

  • Need help with Java programming (involving arrays)?

    Just write one yourself. It's easy. // array1 is already defined double total = 0; for( int i=0; i < array1.length; i++){ total+=array[i]; } double avg = total/array1.length;

    ...
  • Trying to understand a piece of code in VBA [excel]?

    Sub Processor() ->Beginning of subroutine:Processor Dim ConstantCells As Range ->Define ConstantCells as a range of cells Dim FormulaCells As Range ->like above statement Dim cell As...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster