php - form is sending variables by get method -
i got form.
<form id="site-contact-form"> <div> <div class="wrapper"><span>Ձեր անունը:</span> <div class="bg"> <div> <input type="text" class="input" name="contactname" id="contactname" /> </div> </div> </div> <div class="wrapper"><span>Ձեր e-mail-ը:</span> <div class="bg"> <div> <input type="text" class="input" name="email" id="email" /> </div> </div> </div> <div class="textarea_box"><span>Տեկստ:</span> <div class="bg"> <div> <textarea cols="1" rows="1" name="message" id="message"></textarea> </div> </div> </div> <div style="clear:both;"></div> <button id="sub" name="submit">ուղարկել</button> </div> </form>
as see got no action on it, no method. when im clicking on button, refreshing page (like when have action) , adding url ?contactname=&email=&message=&submit= ... never met problem before, why sending variables? dont have php on page yet...
beacause default method , url same of page. use:
<form method="post" action="/reactor"> <!-- .... --> </form>
actually, action
property mandatory.
Comments
Post a Comment