How to post form data directly to Email Id - php

I want to post the careers form directly on email using HTML5. To post the form directly on my email id and i used syntax
<form action:"mailto:web#domain.com" method="post" enc type="text/plain">
</form>
but it does not work properly. Please tell me how i links form directly with email id.

Try using
<form action="mailto:web#domain.com" method="post" enctype="text/plain">
instead of
<form action:"mailto:web#domain.com" method="post" enc type="text/plain">
:-)

like below:
<form action="mailto:myforms#mydomain.com" enctype="text/plain" onsubmit="location.href='thanks.html';" >
Refer: http://www.html-form-guide.com/email-form/email-form-mailto.html

Try
<form action="mailto:web#domain.com" method="post" enctype="text/plain">
</form>
You just wrote enctype wrong. Hope this helps :)

Related

PHP Formatting URL within a Form Action

I would like to add the ID of a User to the form action as a URL.
For Example view_member.php?id=2
Can somebody possible show me the correct way to format PHP code in the form action below where I can include the id as $recptid
$recptid = $_GET['id'];
I have tried
<form action="<?phpview_member.php?id=$recptid?>" method="post">
I would like to be able to add a link but my formatting is wrong
// insert php code as URL in the form action the a submit is pressed
<form action="<?php?>" method="post">
</form>
Thanks in advance for any help
try this,
<form action="<?php echo "view_member.php?id=".$recptid; ?>" method="post">
i hope it will be helpful.

How to post a form to self?

I have a page which is accessible via a url - something like this http://websitename/index.php?q=pagename. On this page, I have a form that I would like to submit to the same page so that I could do some post processing. I have tried the following things but couldn't get it to work -
<form name="formname" action="pagename.php" method="post">
<form name="formname" action="" method="post">
<form name="formname" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post">
In other words, I would like to submit the form to pagename.php file (where the form resides). The page (pagename.php) is not directly accessible. How do I get this done? I will greatly appreciate any help on this one. Thanks.
Try this:
In HTML5 you can just do <form> and its set to self.
<form action=<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?> method="post">
OR
<form name="formname" id="mainForm" method="post" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI'];?>">
OR
<form method="POST" action="<?=($_SERVER['PHP_SELF'])?>">
The point is your $_SERVER variable contains all the information you would require to generate that specific page's URL. If you have decided not to go with the HTML5 way, then one of these options should work. Otherwise you're missing something else not mentioned in your question.
i think this will solve your problem
<form name="formname" action="#" method="post">
Try
<form method="post">/*your stuff here*/</form>
and you should add a submit button with attribute "name=submit" so the form could be submitted also track if its have been posted with php then do your actions like below
if(isset($_POST["submit"])){ /* your code */}

Simple php contact form, but on submit want to keep the validate.check(this) and add window.open

I have a simple php contact form whereby i would like any error messages or thank you pages to open in a new window, whilst also keeping the validate.check bit.
Current code looks like:
<form name="contactform" method="post" action="contactformpost.php" onsubmit="return validate.check(this)">
Would it be right in coding it like this:
<form name="contactform" method="post" action="contactformpost.php" onsubmit="return validate.check(this); window.open('','my_form_target', 'width=300,height=200', true)">

CodeIgniter Form Action Url Variable

What would be the exact CodeIGniter format to the below form tag. Thanks
<form action="links/link1.php?view=one" method="post">
Will this work
echo form_open('links/link1.php?view=one');
That's right.
echo form_open('links/link1.php?view=one');
will create a form similar to this:
<form action="links/link1.php?view=one" method="post">
Hope this helps.

PHP Form without additional File

Is it possible to to have a PHP form without having a seperate file,
e.g. Normal Form
<form action="send.php" method="post">
But instead of calling send.php have the code held in send.php in the same file as the form?
Sure, just supply the action attribute with an empty action
<form action="" method="post">
or with a $PHP_SELF call.
<form action="<?php echo $PHP_SELF;?>" method="post">
Both will submit to the current page.

Categories