Input box not showing

Thread Solved

Join Date: Oct 2006
Posts: 164
Reputation: Barefootsanders is an unknown quantity at this point 
Solved Threads: 3
Barefootsanders Barefootsanders is offline Offline
Junior Poster

Input box not showing

 
0
  #1
Apr 6th, 2007
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>
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Input box not showing

 
0
  #2
Apr 6th, 2007
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.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 164
Reputation: Barefootsanders is an unknown quantity at this point 
Solved Threads: 3
Barefootsanders Barefootsanders is offline Offline
Junior Poster

Re: Input box not showing

 
0
  #3
Apr 6th, 2007
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">
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: Input box not showing

 
0
  #4
Apr 9th, 2007
You have the table and form tags tangled.

The form tag must not be between table and its tr.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC