Jump to content

Bloodmorphed

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Bloodmorphed's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm not wanting to do it that way though, But I do see your point and i can customize that, so thanks, I'll see how it goes.
  2. HTML code: <form method="post" action="viewpage.php?page_id=5"> Email: <input name="email" type="text"><br> Full Name: <input name="name" type="text"><br> Age: <input name="age" type="text"><br> Summoner Name: <input name="summon" type="text"><br> Do you have vent? <input name="vent" type="text"><br> Do you have a mic? <input name="mic" type="text"><br> How often can you be on? <input name="online" type="text"><br> What level are you? <input name="level" type="text"><br> Who do you like to play as? <input name="champs" type="text"> </form><br> Can you help donate to the clan for vent and the site?<br> <textarea name="name" rows="7" cols="25"></textarea><br> Before you say anything about the PHP not scripted to do all fields, I already know this I'm trying to figure out how to send multiple ones in one message: PHP Code: <?php if (isset($_POST['submit'])) { $to = "hidden for privacy"; $subject = "LoL Recruitment"; $email = $_REQUEST['email'] ; $message = ($_REQUEST['name'], $_REQUEST['age']) ; $headers = "From: $email"; $sent = mail($to, $subject, $message, $headers) ; if($sent) { print "Your mail was sent successfully"; } else { print "We encountered an error sending your mail"; } } ?> I'm willing to bet my $message = ($_REQUEST['name'], $_REQUEST['age']) ; if FAR wrong
  3. Ah works like a charm now, thanks i forgot all about isset
  4. okay thanks I'll try that and let ya'll know if it works, thanks agian
  5. It works like a charm but the only problem I get when the page loads it SENDS an email without info of course because it sends it without someone pushing the submit button. Hereis my HTM Land PHP code <form method="post" action="viewpage.php?page_id=5"> Email: <input name="email" type="text"><br> Message:<br> <textarea name="message" rows="15" cols="40"></textarea><br> <input type="submit"> </form> (note the action is in the page itself because thats where the php code is, now for the PHP code:) <?php $to = "hidden for privacy"; $subject = "LoL Recruitment"; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $headers = "From: $email"; $sent = mail($to, $subject, $message, $headers) ; if($sent) {print "Your mail was sent successfully"; } else {print "We encountered an error sending your mail"; } ?> For some reason I go to the page and it auto sends an email without waiting for me to "submit" the form... Is there any suggestions?? EDIT: I noticed its automatically doing the PHP script as soon as the page opens, because the HTML and PHP script is in the same "page" and not in different files, I understand this and I want it like this I dont want to have to create another file just for it to stop this bug. Theres got to be a way to pause the PHP script and activate it when the "Submit" button is pressed.
×
×
  • 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.