NOTICE: undefined index

I am trying to follow a tutorial (login-registration page) that was published by PHP Academy. But on the first run of the registration.php page (using Firefox 6) I get notices that I have undefined indexes every where I have tried to establish a variable. My code matches his (tit for tit). What gives?? Point me in the right direction please. Latest XAMPP server that is running PHP 5.3.5. Tony

Here is the code:

[code]<?php

echo “

Register

”;

// form data
$submit = $_POST[‘submit’];
$fullname = $_POST[‘fullname’];
$username = $_POST[‘username’];
$password = $_POST[‘password’];
$repeatpassword = $_POST[‘repeatpassword’];

if ($submit) {

echo “$username/$password/$repeatpassword/$fullname”;

}

?>

<table>
	<tr>
		<td>Your full name: </td>
		<td>
			<input type='text' name='fullname' />
		</td>
	</tr>
	<tr>
		<td>Your Username: </td>
		<td>
			<input type='text' name='username' />
		</td>
	</tr>
	<tr>
		<td>Your password: </td>
		<td>
			<input type='password' name='password' />
		</td>
	</tr>
	<tr>
		<td>Retype password: </td>
		<td>
			<input type='password' name='repeatpassword' />
		</td>
	</tr>
</table>

<p>
	<input type='submit' name='submit' value='submit' />
</p>
[/code]

Who knows why, sometimes people will use other quotes than " and ’ symbols. Are you sure they are the right ones?
If a tutorial doesn’t work, check the quotes first and make sure they are the right ones.

Sponsor our Newsletter | Privacy Policy | Terms of Service