I am currently working on a project where the site is static and the server does not have php installed or anyother dynamic server side language. I've noticed companies like uservoice that somehow get data from a static website to their servers. How can I create a contact form on my static 'no php server' web site and get that contact form data to another server that has php enabled and then send that data with the phpmail function to the specified email address?
Asked
Active
Viewed 1,907 times
3 Answers
6
simply set the action attribute for your form to point to the other server:
<form method="post" action="http://example.com/process.php">
<input type="text" name="my_textfield" />
<input type="submit" value="send!" />
</form>

knittl
- 246,190
- 53
- 318
- 364
-
Thanks, simple answer, really appreciate it. – Michael Sablatura Apr 21 '11 at 11:15
0
Use the form action to send to the capture server:
<form action="http://myphpserver.com/contact.php">

Jared Farrish
- 48,585
- 17
- 95
- 104
-
your action attribute names a relative path, you are missing the protocol there (e.g. `http://`) – knittl Apr 21 '11 at 10:28
-
Thanks knittl. I kept looking at it thinking I was missing something. Must be early (here). :) – Jared Farrish Apr 21 '11 at 10:30
0
You can use a service like usebasin.com to submit your form to. In other words, setup your form as you usually would, and just point it to your usebasin.com account form like so:
<form action="https://usebasin.com/f/{endpoint-id}" method="POST">
<label for="email-address">Email Address</label>
<input type="email" id="email" name="email" required>
<button type="submit">Submit</button>
</form>
Here are some docs as well: https://usebasin.com/docs

Tom Fast
- 1,138
- 9
- 15