+ 1
How would i get the details of the form sent to my email or saved n printed?
Forms
5 ответов
+ 2
You need to learn PHP, take the PHP course and complete it. You'll learn in the final lesson how to do that.
+ 2
Well in a nutshell, you create a PHP script that would collect data that you sent to it but you specify in the script which data.
PHP: Please give me only a name and a surname
HTML: Okey dokey
In the form you specify which php script you want to use and how you want to send this data. Your data that you want to send should also have the correct names.
HTML: Hey PHP, I have the following data; name, surname, phone number, address.
PHP: I said I only want a name and surname, I'm not taking the rest.
HTML: Okey dokey
The PHP then stores that data it gets from the form in variables and from there on you can tell the script what you want it to do with it.
Typically it looks like this in the end.
Example (HTML/PHP):
//HTML
<form action="thePhpFile.php" method="POST"/>
<input type="text" name="name" />
<input type="text" name="surname" />
<input type="text" name="phone" />
<input type="textarea" name="address" />
<input type="submit" value="send"/>
</form>
//PHP
<?
$fullname=$_POST['name'];
$lastname=$_POST['surname'];
mail("info@gmail.com",$fullname." ".$lastname, "Hello, just testing");
?>
//In the example above, the PHP will only collect the name and surname from the form and mail it to info@gmail.com with a message and the names as the subject.
0
You need to learn PHP, take the PHP course and complete it. You'll learn in the final lesson how to do that.
i have but i didnt really get that part
0
Thanks Gavin....i get it now