- Impact
- 3
Ok, so I made what I thought what would work as a form...but it turns out, I don't know too much when it comes to PHP.
So...Here is my HTML text.
And here is the php for 'site.php'...
All I get is a blank email.
I tried some other ways that I thought would work as well, but now luck. Any help for this PHP beginner would be great.
-Sam
So...Here is my HTML text.
Code:
<form action="site.php" method="POST"> <table> <tr> <td>Name:</td> <td><input type="text" name="name"></td> </tr> <tr> <td>Email:</td> <td><input type="text" name="email"></td> </tr> <tr> <td>Web Address:</td> <td><input type="text" name="url"></td> </tr> <tr> <td>Website Name:</td> <td><input type="text" name="webname"></td> </tr> <tr> <td>City:</td> <td><input type="text" name="city"></td> </tr> <tr> <td>State:</td> <td><input type="text" name="state"></td> </tr> <tr> <td>If not in US, Country?</td> <td><input type="text" name="country"></td> </tr> <tr> <td><input type="submit" name="SubmitForm" value="Send"></td> </tr> </table> </form>
And here is the php for 'site.php'...
Code:
<?php $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $url = $_REQUEST['url'] ; $webname = $_REQUEST['webname'] ; $city = $_REQUEST['city'] ; $state = $_REQUEST['state'] ; $country = $_REQUEST['country'] ; $to = '[email protected]'; $subject = 'Site Submitted'; $Body = ""; $Body .= "Name: "; $Body .= $name; $Body .= "\n"; $Body .= "Email: "; $Body .= $email; $Body .= "\n"; $Body .= "City: "; $Body .= $city; $Body .= "\n"; $Body .= "State: "; $Body .= $state; $Body .= "\n"; $Body .= "Country: "; $Body .= $country; $Body .= "\n"; $Body .= "URL: "; $Body .= $url; $Body .= "\n"; $Body .= "Website Name: "; $Body .= $webname; $Body .= "\n"; mail( $to, $subject, $body, "From: $email" ); header( "Location: siteok.shtml" ); ?>
All I get is a blank email.
I tried some other ways that I thought would work as well, but now luck. Any help for this PHP beginner would be great.
-Sam







