Jump to content

"Sign up Page"


Buffas

Recommended Posts

Hi there...

Well I'm posting here because I'm compleatly lost... We have this small club where we need to make a "Sign Up Form" for a party... I has to contain text boxes (like name: Add: e-mal: ect...) and then some checkboxes (like lunch, dinner ect...) Finaly there has to be a submit button and when you click that you aree send to a confirmation page that sums up you input... Finaly, the data should then be send as a mail to me and to the mail address that was put on page one...

Does this makes any sence?? I would be happy for any responce to this, ex. a link to a page where i could read a toturial...

Thanks a lot...
- A
Link to comment
https://forums.phpfreaks.com/topic/30730-sign-up-page/
Share on other sites

Can't think of any tutorial, but here is a start for you - i'm sure you can work on it to understand it and make it what you want
[code]

<?php

$site_name = "whatever";
$site_email = "[email protected]";
$form_subject = "Form from $sitename";
$done = false;

if(isset($_POST['submit']) && !empty($_POST['message']))
{
  $message = strip_tags($_POST['message']);

  $headers = "From: $site_name <$site_email>\r\n";
  $headers .= "Reply-To: $site_name <$site_email>\r\n";
  $headers .= "Return-Path: $site_name <$site_email>\r\n";
  $headers .= "X-Mailer: PHP v".phpversion()."\r\n";

  $send_it = mail($site_email, $form_subject, $message, $headers);

  $done = true;
}


if($done == false)
{
echo <<<_HTML

<form method="post" action="{$_SERVER['PHP_SELF']}">
<input type="text" name="message" value="{$message}" />
<input type="submit" name="submit" value="Send it!" />
</form>

_HTML;
}

?>

[/code]
Link to comment
https://forums.phpfreaks.com/topic/30730-sign-up-page/#findComment-141632
Share on other sites

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.