register.php problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Locked
barnes529
Forum Newbie
Posts: 17
Joined: Thu Apr 19, 2007 4:18 am

register.php problem

Post by barnes529 »

Code: Select all

<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("user",$con);
  $username = mysql_real_escape_string($_POST['username']);
  $password = mysql_real_escape_string($_POST['password']);
  $email = mysql_real_escape_string($_POST['email']);
  $add = mysql_real_escape_string($_POST['address']);
  $contry=mysql_real_escape_string($_POST['country']);
  $area=mysql_real_escape_string($_POST['area']);
  $pin=mysql_real_escape_string($_POST['pin']);
  $countrycode=mysql_real_escape_string($_POST['countrycode']);
  $phoneno=mysql_real_escape_string($_POST['phoneno']);
  $file=mysql_real_escape_string($_POST['file']);
  $qry="INSERT INTO user1 (username,password,email,address,country,area,pincode,countrycode,phoneno,file) VALUES ('$username','$password','$email','$add','$contry','$area','$pin','$countrycode','$phoneno','$file')";
  mysql_query($qry,$con);
  mysql_close($con);
  ?>
i am getting following errors:

Notice: Undefined index: password in c:\easyphp1-8\www\register.php on line 11

Notice: Undefined index: area in c:\easyphp1-8\www\register.php on line 15

Notice: Undefined index: file in c:\easyphp1-8\www\register.php on line 19
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Do NOT double post again.

Topic locked.
Locked