Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

php script for newbie

Jul 26, 2013 6:18AM PDT

i downloaded a web template and this is the code for the contact us form..

<div id="contact" class="clear" ><br=""> <h2>Contact Us</h2>
<div class="fl_left">
<form method="post" action="#">
<label for="fullname">Name:</label>
<input type="text" name="fullname" id="fullname" value="">
<label for="validemail">Email:</label>
<input type="text" name="validemail" id="validemail" value="">
<label for="message">Message:</label>
<textarea name="message" id="message" cols="45" rows="10"></textarea>
<button type="submit" value="submit"><span>Submit</button>

</div>

except when i press submit it doesnt do anything, im not really very good at coding, but from what ive seen the "action" needs to be a php script, which the template doesnt have, if someone can post a script that will work, that would be great, ive tried for ages messing about editing scripts and it just wont work, thanks in advance, and any help will be appreciated.. if it make any difference the template is from os templates

Discussion is locked

- Collapse -
Answer
Must have action page
Aug 31, 2013 9:19PM PDT

For form tag you must have define action page.

You should add like this
<form method="post" action="actionpage.php">

then create actionpage.php to retrive submit value from contact us page.

- Collapse -
Answer
Search online for a free
Sep 26, 2013 1:36AM PDT

contact form processor. It's basically just a script to handle the mail submission, which is what you're looking for. Tectite is just one example of many. I used that several years ago.

~Sovereign

- Collapse -
Answer
phpmailer
Sep 27, 2013 10:15AM PDT

you can use phpmailer library.