facebook - PHP $POST If statement -


okay, issue having have simple textarea should sent entered page, should 'thanks' when submitted, , should prompt entry if nothing entered, however, when enter nothing still says 'thanks'

im sure simple enough. here code index.php

<form method="post" action="translate.php"> <name="status" cols="50" rows="5"> what's on mind? </textarea><br> <input type="submit" value="translate status" /> 

and translate.php

<?php  $status = $_post['status']; if($status == ""){ echo "please enter status."; } else { echo "thanks"; }  ?> 

i have tried using above code in index.php got error 'status' variable.

while asking, how go having popup error on main page rather redirecting translate.php

1.you forgot write textarea.

<textarea name="status" cols="50" rows="5"> what's on mind? </textarea><br> 

2.textarea have what's on mind? default. should check..

if(($status == "") || ($status == "what's on mind?")) 

3.try echo $status see containing?


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -