Jump to content

Simple - I dont think so


richardterris

Recommended Posts

Hi all,

 

Been a while since I worked with PHP, and since im now getting more involved in MySQL, I thought I should go back to basics, and learn how to code PHP properly.

 

I've started off with a real basic example of an HTML form "<html>

<body>

 

<FORM ACTION="welcome.php" METHOD=GET>

First Name: <INPUT TYPE=TEXT NAME="firstname"><BR>

Last Name: <INPUT TYPE=TEXT NAME="lastname">

<INPUT TYPE=SUBMIT VALUE="GO">

</FORM>

 

</body>

</html" called index.php and <?php

  echo "Welcome to our Web site,

$firstname $lastname!" ;

 

?>" called welcome.php

 

I know this code isnt valid, and is generally pretty messy, but since its just some exercises im not too concerned.... As far as i know this code is sound, in that it should take the 2 names, and pass them along with the url ?

 

When i enter the names and click "go", im getting the output "welcome to our website,"

 

I know that its an apache server, and that PHP Myadmin is installed - I recently connected to MySQL Db through it, but i cant help but get the feeling that some setting somewhere isnt right, because i think this code, sloppy as it is, should work.

 

Am i going mad? can anyone help?

 

Thanks,

 

RjT

Link to comment
https://forums.phpfreaks.com/topic/142885-simple-i-dont-think-so/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.