nothing is happening after clicking submit button

+1 MAYANK JINDAL · April 29, 2015
here is my code  . please help me
<?php

if(isset($_post['user_input']) && !empty($_post['user_input'])){
echo 'works ';
}


?>


<hr>
<form action = 'series2.php' mehod = 'post'>
<textarea name = 'user_input' rows = '7' cols = '20'></textarea>  <br><br>
<input type = 'submit'  value = 'Submit' >
</form>

Post a Reply

Replies

Oldest  Newest  Rating
0 Hidden Tesla · April 29, 2015
This problem is not because of a missing 't' in method. Because if spelling of method is wrong than it should consider the default value of method that is POST...

Anyways it is because the case of POST variable in if statement the POST should be in capital....

It should be $_POST['user_input'] rather than $_post['user_input']

change your if statement  to: 


if(isset($_POST['user_input']) && !empty($_POST['user_input'])){
echo "works";
}
0 Hidden Tesla · April 29, 2015
@Mohammad Well another testing says that missing "t" is also making issue in submitting form.. :P
0 MAYANK JINDAL · April 29, 2015
Mohammad   thankyou very much
0 Mohamad Mirohamadi · April 29, 2015
lol,  I just figure that you missed one "t"  for method in form tag :D  .
that little naughty missed t makes form to submit in get method
0 Mohamad Mirohamadi · April 29, 2015
Maybe its because of extra space in your HTML tag's attributes , like : <form action = 'series2.php'>
  • 1

PHP

107,039 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators