0

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.

<tr>
    <td>
    <br>
    <!--Display Add News Box-->
    <h3>Add News</h3>
    <table>
    <form action="admin/adminprocess.php" method="post>
        <tr><td>
        Headline:<br>
        <input type="text" name="headline" maxlength="50" value="<?php echo $form->value("headline"); ?>">
        </td>
        <td>
        Date:<br>
        <input type="text" name="date" maxlength="8" value="<?php echo $form->value("date"); ?>">
        </td></tr>
        <tr><td>
        Content:<br>
        <textarea type="text" rows="6" cols="50" name="text" maxlength="50" value="<?php echo $form->value("text"); ?>"></textarea><?php echo $form->error("text"); ?><br>
        </td></tr>
        <tr><td>
        <input type="hidden" name="subnews" value="1">
        <input type="submit" value="Submit News">
        </td></tr>
    </form>
    </table>
    </td>
    </tr>
    <tr>
    <td><hr></td>
    </tr>
3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by MidiMagic
0

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?

0

heh, bad typing on my part

<form action="admin/adminprocess.php" method="post>

should be:

<form action="admin/adminprocess.php" method="POST">
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.