-
Please Check my code (PHP)
Please check my code , when i click submit in html page
the browser just displayes the code as it is it does not executes them Please check
<?
if ($_POST["action"] == "send"){
if ($_POST["name"] and $_POST["email"] and $_POST["message"] ){
mail (
"laser@xyz.com,
"reply",
"
Name: ".$_POST['name']."
E-mail: ".$_POST['email']."
Message: ".$_POST['message']."
",
"From: ".$_POST['name']." <".$_POST['email'].">");
echo '<p align="center"><font color="#003366">Thanks !<br>Your message has been sent.<br> I got it.</font></p>';
}
else{
echo '<p align="center"><font color="#FF0000">Please fill in all data!<br>All fields are obligatory.</font></p><p><a href="contactEN.html">[back]</a>';
}
}
-
-
If it just displays the code, you may not have php enabled on your server. Also, you may want to try opening your php script using the full opening tag (just in case your server turned off the option for short open tags). The long tag looks like this:
Code:
<?php
//php code here
?>
Talk to your host and see if php is installed on your server. If it is, make a page that displays the php info.
Code:
<?php
phpinfo();
?>
If that doesn't work, then you know it is the server.
Hope this helps.
-
-
That "and" keyword in the if statement be &&.
- Mike
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks