Jump to content

[SOLVED] Newbie Question!


warydig

Recommended Posts

when i create a form, all of the elements are treates as text boxes! below is my form:

 

<FORM METHOD=\"POST\" ACTION=\"$SERVER[php_SELF]\">

 

<P><strong>Your Name:</strong><br>

<INPUT type=\"text\" NAME =\"sender_name\" </P>

 

<P><strong>Your E-Mail Address:</strong><br>

<INPUT type=\"text\" NAME =\"sender_email\" SIZE=30></P>

 

<P><strong>Your Message:</strong><br>

<TEXTAREA NAME=\"message\" COLS=30 ROWS=5 WRAP=virtual></TEXTAREA></P>

 

<INPUT type=\"hidden\" name=\"op\" value=\"ds\">

 

<P><INPUT type=\"submit\" NAME=\"submit\" VALUE=\"Send Your Message\"></P>

 

</FORM>";

 

the hidden field and the submit button come out as text boxes like the other text boxes! why is this??

Link to comment
https://forums.phpfreaks.com/topic/86646-solved-newbie-question/
Share on other sites

Try:

echo '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">

<p><strong>Your name:</strong>

<input type="text" name ="sender_name" </p>

<p><strong>Your E-Mail Address:</strong>

<input type="text" name ="sender_email" size="30"></p>

<p><strong>Your Message:</strong>

<textarea name="message" cols="30" rows="5" wrap="virtual"></textarea></p>

<input type="hidden" name="op" value="ds">

<p><input type="submit" name="submit" value="Send Your Message"></p>

</form>';

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.