<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<!-- Microsoft Indic Language Input Tool embed code -->
<form method="post">
<input name="abc" type="text"></input><br/>
<input type="submit"/>
</form>
      <?php
 echo $_post['abc'];
  ?>
</body>
</html>

I have written this page and save it as index.php
but its not giving right result. can anybody help me, what is the problem

Recommended Answers

hi Dear,
in form tag action is missing so put

<form method="POST" action="index.php">

hope it works for you

Jump to Post

All 4 Replies

hi Dear,
in form tag action is missing so put

<form method="POST" action="index.php">

hope it works for you

Instead of
echo $_post;
in line 14 try
echo $_POST;

Hi,

In PHP, the variable $_post considered as a normal array value where you have to use $_POST (Capital letters) for getting post values.
$_POST Syntax Clarification

Hi,

In PHP, the variable $_post considered as a normal array value where you have to use $_POST (Capital letters) for getting post values.
$_POST Syntax Clarification

thank ist working

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.