Actually I copy this code from my bulk sms sending website. This php is use for send sms. I want create this code body bone. It means I want make front look to the help of html. Basically I know html but I don’t know how I instigate with php.
I wish if any send sms he can see “SMS SENT SUCCESSFULLY” Confirmation.
Body look like:
[MOBILE NUMBER]
[NAME]
[TEXTAREA]
[SEND: BUTTON]
OUTPUT IN MY SMS INBOX
Like;
[NAMR], [MOBILE NUMBER]
['TEXTAREA MSG]
Why I am not get message if anyone fill up this… PHP handler (mail_handler.php)
(Uses info from HTML form and sends the Email)
<?php
if(isset($_POST['submit'])){
$to = "email@example.com"; // this is your Email address
$from = $_POST['email']; // this is the sender's Email address
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$subject = "Form submission";
$subject2 = "Copy of your form submission";
$message = $first_name . " " . $last_name . " wrote the following:" . "\n\n" . $_POST['message'];
$message2 = "Here is a copy of your message " . $first_name . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to,$subject,$message,$headers);
mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
echo "Mail Sent. Thank you " . $first_name . ", we will contact you shortly.";
// You can also use header('Location: thank_you.php'); to redirect to another page.
// You cannot use header and echo together. It's one or the other.
}
?>
<?php
if(isset($_POST['submit'])){
$to = "info@example.com"; // this is your Email address
$from = $_POST['email']; // this is the sender's Email address
$Mobile = $_POST['Mobile'];
$Email = $_POST['Email'];
$subject = "WebSMS";
$subject2 = "Copy of your form submission";
$message = $Mobile . " " . $Email . " wrote the following:" . "\n\n" . $_POST['message'];
$message2 = "Here is a copy of your message " . $Mobile . "\n\n" . $_POST['message'];
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to,$subject,$message,$headers);
mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender
echo "Mail Sent. Thank you " . $Mobile. ", we will contact you shortly.";
// You can also use header('Location: thank_you.php'); to redirect to another page.
// You cannot use header and echo together. It's one or the other.
}
?>
Then it not work if you have power then make it correct and reply…
@TechnoBear you know you have knowledge to change this and make this correct but I have not… I am not any software developer and any engineer normally I am a student of math but I like to play with codes in free time…Not free time mainly max times…
I’ll be happy to help.
Start by putting your HTML into the validator and post back the first error message it gives that you don’t understand how to fix.
That’s because I’m trying to help you. If I correct your code, you won’t learn anything, and next time you have a similar problem you will have to ask for help again. If you learn how to find and correct your own mistakes, then you have learned a useful skill for the future.
So, as we’ve suggested many times, use the https://validator.w3.org to find problems and fix them. The only alternative that I know of is for you to go through your code and check manually that every attribute has both opening and closing quotations marks (that’s a hint) and that every opening tag has an appropriately-positioned closing tag (that’s another hint). If you use an HTML editor, the colour coding should show immediately when there is a problem, and you should be able to match tag pairs.
The other reason that I won’t fix your code is because you are insisting on using HTML <table> tags in a way which has not been appropriate for many years. This has also been explained to you. If you want to use outdated methods, then that’s your problem; I’m not writing bad code for you, just to save you the trouble of learning good coding practices.
Never use the mail() function. This function has strange behaviors at times and even a correctly written one can still fail at times. Use something like PHPMailer or swiftMailer.
I am sorry, but this is not a free coding service. This is a forum. A forum is there to help people with specific problems who have already done some of their own work.