php - Why the fields from the form do not get printed? -
When the data from the following form is submitted to HTML: PHP: (action.php) Errors when run You have to change it and is a name attribute that loads in the $ _POST variable action.php , then this second variables Prints the form's
date but returns an error for the first and third fields, why is it so?
& lt; form method = "post" action = ". / Action.php" & gt; & Lt; Span id = "type_tweet" & gt; Write your tweet & lt; / Span & gt; & Lt; Period & gt; & Lt; textarea rows = "4" cols = "80" id = "tweet_entered" & gt; & Lt; / Text field & gt; & Lt; / Span & gt; & Lt; Hour / & gt; & Lt; Span & gt; When to Tweet & lt; / Span & gt; & Lt; Span id = "date" & gt; & Lt ;! - Date - & gt; & Lt; Input type = "text" name = "selected date" id = "selected date" just click to read = "GetDate (this);" & Gt; & Lt; / Span & gt; & Lt; Span id = "at" & gt; @ & Lt; / Span & gt; & Lt; Span id = "time" & gt; & Lt ;! - time - & gt; & Lt; input type = "text" class = "timepicker" name = "selected time" id = "timepicker" /> & Lt; / Span & gt; & Lt; Period & gt; & Lt; Input type = "submit" value = "submit" id = "schedule_button" /> & Lt; / Span & gt; & Lt; / Form & gt;
& lt ;? Php echo $ _POST ["tweet_entered"]; Echo "
"; Copy $ _POST ["Selected Date"]; Echo "
"; Echo $ _POST ["timepicker"]; Echo "
"; ? & Gt; action.php :
Notice: Undefined index: tweet_entered in E: \ Installed_Apps \ xampp \ Htdocs \ twibuffer \ action.php on line 2 4/29/2014 Notice: Undefined Index: Timepicker E: \ Installed_Apps \ xampp \ htdocs \ twibuffer \ action.php on line 6 < / Div>
textarea rows = "4" cols = "80" id = "Tweet_entered" & gt; & Lt; / Textarea & gt;
& lt; Textarea rows = "4" cols = "80" id = "tweet_entered" name = "tweet_entered" & gt; & Lt; / Textarea & gt;
input type = "text" class = "timepark" name = "selected time" id = "timepicker" / & gt;
& lt; Input type = "text" class = "timepaper" name = "timepacker" id = "timepicker" /> ;
Comments
Post a Comment