Jump to content

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>';

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.