So I Basically copied the following code, execpt renaming columns names.
The form is folowing:
<table align="left" width="30%" border="0" >
<form action="company_edit_php.php" method="post">
<tr><td align="center" bgcolor="#ECE6E6">Location: <td align="center"> <input type="text" value="<?php echo $row['Location']?>"/><br></td></tr>
<tr><td align="center" bgcolor="#ECE6E6">User: <td align="center"> <input type="text" value="<?php echo $row['User']?>"/><br></td></tr>
<tr><td align="center" bgcolor="#ECE6E6">Telephone: <td align="center"> <input type="text" value="<?php echo $row['Telephone']?>"/><br></td></tr>
<tr><td align="center" bgcolor="#ECE6E6">Email: <td align="center"> <input type="text" value="<?php echo $row['Email']?>"/><br></td></tr>
<td> <input type="submit" value="Change" /></td></tr>
And PHP code:
<?php
$con = mysql_connect("localhost","username","password");
$id = isset($_GET['id']) ? (int)$_GET['id']: 1;
mysql_select_db("Database", $con);
if (isset($_POST['Location'])) {
echo $_POST['Location'];
} else {
echo 'empty';
}
$Location = $_POST['Location'];
Result of this code is Undefined index: Location and from if statement i get "empty". Why this same code work for another page? What should I do now?
Thank you for your efforts