i have just started php and html and i am creating a small game for personal use. Anyways, i wrote a script were you simply enter data to create an account and then you submit it:
<?php include 'header.php';
?>
<br>
<br>
<br>
<table border="1" align="center" cellpadding='25'>
<tr>
<td align='middle'>
<form method='POST' action='insertuser.php' align= 'right'>
Username: <input type='username' name='username'> <br>
Password: <input type='password' name='password'> <br>
Confirm Password: <input type='Password'> <br>
Email: <input type='username'> <br>
<input type='submit' name='submit' align = 'center'>
</td>
</tr>
</table>
<
<table align='right'>
<tr>
<td>
<image src='stillneedimage(square).jpg'>
</td>
</tr>
</table>
<table align='left'>
<tr>
<td>
<image src='stillneedimage(square).jpg'>
</td>
</tr>
</table>
</body>
</html>
then i created a database withh phpmyadmin and inside it i have a table called members. there are currently 4 tables inside the database, id, username, password, and rank. finally i created another script that inserts data the user entered into the database:
<?php
include_once "mysqlconnecter.php";
$username1 = $_POST ['username'];
$password1 = $_POST ['password'];
mysql_query("INSERT INTO members Values ('','$username1','$password1','' ") or
die('could not insert member, please try again');
?>
its not done but its job is to insert data into the database. when i run the script it gives me this error:
Notice: Undefined index: username in E:\PortableApps\xampp-
portable\htdocs\xampp\insertuser.php on line 4
Notice: Undefined index: password in E:\PortableApps\xampp-
portable\htdocs\xampp\insertuser.php on line 5
could not insert member, please try again
What am i possibly doing wrong?