Jump to content

Using PHP to process HTML form


Cyberdave

Recommended Posts

Hi. I have been trying to get a form to work on a website using Perl, but it's wrecking my head. I have been looking into it and PHP seems to be an easier way to do it. This is the code of my form:

 

<form id="mailing-list" name="mailing-list" method="post" action="cgi-bin/FormMail.pl">
<input type="hidden" name="subject" value="Send me a Newsletter" />
<input type="hidden" name="redirect" value="http://www.site.ie/thank-you.html" />
<input type="hidden" name="recipient" value="[email protected]">
<input type="hidden" name="required" value="your-email" />
<input name="your-email" type="textfield" class="your-email" id="your-email" value="Join our Mailing List" />
<input type="submit" class="formbutton" name="submit" id="submit" value="Submit" />
</form>

 

Can anybody help me in getting it working with PHP? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/167778-using-php-to-process-html-form/
Share on other sites

Can anybody help me in getting it working with PHP? Thanks.

 

Perhaps you should take a look at some tutorials, and start elarning some php rather than just getting it written for you here.

 

If you don't know php, then you're not trying, if you're not trying I'm not helping!

( thrown together so you get the idea, the code wont work )

 

index.html

<form action"post.php"?
usernametextbox .name="username"
passwordtextbox.name="password"
</form>

post.php

<?php
$username = $_POST['username'];
$password = $_POST['password'];

echo $username $password;

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.