I have this code and I have two problem the one is this line:
Notice: Undefined index: elm1 in C:\xampp\htdocs\art-legend\12\edit\index.php on line 65
line 65 in my local is in this page this line ( $editor = $_POST['elm1'];)
and the other error: when I submitted the code go to no page (Object not found!) and this is the form code in the same page:
<form method="post" action="<? echo $PHP_SELF; ?>">
<div>
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
....
</textarea>
</div>
<br />
<input type="submit" value="gooooo" name="submit" />
</form>
<?
$localhost = "localhost";
$user = "root";
$password ="adminpass";
$db = "im";
$connect = mysqli_connect($localhost,$user,$password,$db);
$editor = $_POST['elm1'];
$sql = "insert into images(name) values('$editor')";
$query = mysqli_query($connect,$sql);
$sql2 = "select images.name from images";
$query2 = mysqli_query($connect,$sql2);
while ($row = mysqli_fetch_array($query2,MYSQLI_ASSOC)){
echo $row['name'];
}
?>
the line in this code
$editor = $_POST['elm1'];