943,972 Members | Top Members by Rank

Ad:
Apr 6th, 2007
0

Input box not showing

Expand Post »
Hey all, Im trying to put a submit news box on my admin page but for some reason my top box, Headline: "Textbox here", is not showing up on my page. Am I doing something wrong? Did I miss a tag somewhere?? Thanks in advance.

HTML and CSS Syntax (Toggle Plain Text)
  1. <tr>
  2. <td>
  3. <br>
  4. <!--Display Add News Box-->
  5. <h3>Add News</h3>
  6. <table>
  7. <form action="admin/adminprocess.php" method="post>
  8. <tr> <td>
  9. Headline:<br>
  10. <input type="text" name="headline" maxlength="50" value="<?php echo $form->value("headline"); ?>">
  11. </td>
  12. <td>
  13. Date:<br>
  14. <input type="text" name="date" maxlength="8" value="<?php echo $form-> value("date"); ?>">
  15. </td> </tr>
  16. <tr> <td>
  17. Content:<br>
  18. <textarea type="text" rows="6" cols="50" name="text" maxlength="50" value="<?php echo $form->value("text"); ?>"></textarea><?php echo $form->error("text"); ?><br>
  19. </td></tr>
  20. <tr><td>
  21. <input type="hidden" name="subnews" value="1">
  22. <input type="submit" value="Submit News">
  23. </td></tr>
  24. </form>
  25. </table>
  26. </td>
  27. </tr>
  28. <tr>
  29. <td><hr></td>
  30. </tr>
Similar Threads
Reputation Points: 10
Solved Threads: 3
Junior Poster
Barefootsanders is offline Offline
165 posts
since Oct 2006
Apr 6th, 2007
0

Re: Input box not showing

What does the code look like when you view-source in a browser ( i.e. after the PHP code has been executed ). Post the same code after PHP, and check to make sure those echos don't put invalid characters inside the value attribute.

Are you using an XHTML DTD, a HTML DTD, or no specified DTD? [ that code uses HTML tag closure rules, so you shouldn't use an XHTML DTD, a HTML DTD is preferable, but no DTD should work functionally ]

Try putting the form element outside the table element ( i.e. <form><table>..</table></form> rather than <table><form>..</form></table> ). Only certain things should go directly inside <table> elements ( tbody, tr etc )

EDIT: Oops; I didn't see the solved marker on this thread... How did you solve the problem in the end?
Last edited by MattEvans; Apr 6th, 2007 at 3:54 pm.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006
Apr 6th, 2007
0

Re: Input box not showing

heh, bad typing on my part

HTML and CSS Syntax (Toggle Plain Text)
  1. <form action="admin/adminprocess.php" method="post>

should be:
HTML and CSS Syntax (Toggle Plain Text)
  1. <form action="admin/adminprocess.php" method="POST">
Reputation Points: 10
Solved Threads: 3
Junior Poster
Barefootsanders is offline Offline
165 posts
since Oct 2006
Apr 9th, 2007
0

Re: Input box not showing

You have the table and form tags tangled.

The form tag must not be between table and its tr.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: getting layermovement in netscape
Next Thread in HTML and CSS Forum Timeline: How I Can, Solve font Problem ? On My website.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC