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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.