html - php code is not working? -


I'm learning fresher and PHP from the YouTube tutorial. But the same PHP code in the tutorial is working without any errors, while on my system this is showing something that is shown in the picture. Please help !!

  & lt ;? Php if (& quot; $ _ post ['user_input'] ') ($ _ post [' user_input ']) & amp; below ($ _post [' user_input ']) {$ string = $ _POST [' user_input ']; Echo $ string; }? & Gt; & Lt; Hour & gt; & Lt; Form action = "index.php" method = "post" & gt; & Lt; Text field name = "user_input" rows = "10" column = "30" & gt; & Lt ;? Php echo $ user_input; ? & Gt; & Lt; / Text field & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Input type = "submit" value = "submit" /> & Lt; / Form & gt;  

Production:

Enter image details here

After

you never defined $ user_input when you called it for here : & lt ;? Php $ user_input; ? & Gt;

I believe you want this as your code for:.

  & lt; Php if (isset ($ _ post ['user_input']) & Amp;; below ($ _ POST ['user_input'])) {$ string = $ _POST ['user_input']; Echo $ string; }? & Gt; & Lt; Hour & gt; & Lt; Form action = "index.php" method = "post" & gt; & Lt; Text field name = "user_input" rows = "10" column = "30" & gt; & Lt ;? Php if (isset ($ string)) echo $ string; ? & Gt; & Lt; / Text field & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Input type = "submit" value = "submit" /> & Lt; / Form & gt;  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -