- This topic is empty.
March 12, 2014 at 3:20 pm #165574
Hey! I want this code to kick in after the person clicked “Skicka Meddelande”
This code :
$to = “[email protected]”;
$from = $_POST[“email”];
$subject = $_POST[“subject”];
$name = $_POST[“name”];
$message = $_POST[“message”];
if (mail ($to, $subject, $message ,”From: $name <$from>”))
echo nl2br(“<h2>Ditt meddelande har skickats!</h2>
echo “Det gick inte att skicka ditt meddelande”;
I dont want the code to break the pop up and and switch to another url.
Here is the code I have atm : http://jsfiddle.net/xkdNa/179/
Any questions just ask !
RegardsMarch 12, 2014 at 4:33 pm #165588
Isnt there any easier way.. like , if click this button hide this div and show another?
Check out my website : http://spidey.se/ It’s that “Registrera” button I want to fix.. :/March 13, 2014 at 7:39 am #165658
Sorry I didnt explain it so good, it’s not that kind of register thing you mean (through a database), its a contact form. When the person has written his information in the inputs , and then clicked “send message” All the stuff he wrote will come in a mail to my email.
As you can see in my code (link below) when you hit “send message” it takes me to another url and I dont want that. I want it like this, when you click “send message” it comes a litle message just under the button, “Your mail has been sended” or the inputs disappears and a bigger “Sended” text appears .March 13, 2014 at 11:00 am #165680__Participant
when you hit “send message” it takes me to another url and I dont want that.
You explained it just fine, and @shaneisme answered your question very clearly.
that’s part of what AJAX will help you with.
- The forum ‘Back End’ is closed to new topics and replies.