sry for my amateur question. I wrote this code for get text from input and add in to database:
<html xmlns="http://www.w3.org/1999/xhtml" lang="fa">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Title</title>
</head>
<body>
<form action="" method="POST">
<label for="name" id="app_name_label" >name</label>
<input type="text" name="name" id="name_textfield">
<input type="submit" name"Submit" value="send" >
</form>
<?php
if(isset($_POST['Submit']))
{
include_once("config.php");
$con = mysql_connect($db_host,$db_user,$db_pass)
or die(mysql_error());
$selected=mysql_select_db($db_name, $con)
or die(mysql_error());
if($selected){
$name = $_REQUEST['name'];
$ins = "INSERT INTO infos (app_name ) VALUES ('$name')";
$saved=mysql_query($ins );
if($saved)
{
echo "Saved!!";
}
else
{
echo "Don't Saved!!";
}
}
mysql_close($con);
}
?>
</body>
</html>
My database doesn't have any problem
But when i run it, nothing write to my database! :( what should i do?
I think problem is in isset($_POST['Submit'])
.