Help with some coding please

A

Anonymous

Guest
i have two php pages that i need help with. the first is the index page and the other is an emialer for. i hope someone can help me.

Code:
<html>
<head>
<title>Php trials</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
echo "hello world";

print "hello world";

$message= "hello world";
echo "$message";

$message= "great";
echo "I Feel $message today!";

echo "I have \$53,000 dollars in my bank account.";

include 'header.tpl';
?>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>
<?php 
include 'nav.tpl';
?>
</td>
<td>
<?php include body.tpl ?>
</td>
</tr>
</table>
<?php 
include 'footer.tpl'; 
?>
<?php
if ($_GET['v'] == '') {
include 'home.tpl';
}
if ($_GET['v'] == '1') {
include 'games.tpl';
}
if ($_GET['v'] == '2') {
include 'toons.tp'l;
}
if ($_GET['v'] == '3') {
include 'jokes.tpl';
}
?>


</body>
</html>
and the othewr which is the form is
Code:
<html>
<?php
$sendTo = "asmgomaa@hotmail.com"; // your email
$subject = "My Site Reply"; // subject you want
displayed
$header = "From: $name <$email>\r\n"; //
shows from asdasd and email says sadasd@dasdas.com

$email = $_POST['email']; // defines ['email'] in the
name tag of the input tags in HTML
$msg = $_POST['msg']; // same here for msg
?>

now for your html code, right outside those php tags,
put in this...

<for method="post" action="<?php echo
$_SERVER['PHP_SELF']; ?>"> 
<input name="email">
<input name="msg">
<input type="submit">
</form>
</html>
 
...and?

I mean, are you getting errors? What errors? Is your output incorrect? We can't help you unless you tell us what you're trying to do and what problem you're having.
 
Please paste the exact error in its entirety and the code that it refers to.
 
for the index file it is
Parse error: parse error, unexpected T_STRING in /home/asgsoft/public_html/php/index.php on line 50
while the form it is
Parse error: parse error, unexpected T_VARIABLE in /home/asgsoft/public_html/php/form.php on line 6 i hope that help you
 
in the first code...this is wrong...

include 'toons.tp'l;

this should be right...

include 'toons.tp';

second one, your lines that are supposed to be commented go down a line and if you want to comment on mulitple lines you use /* at the beginning and */ at the end...using // will only comment one line
 
is is corrct now?
<html>
<?php
$sendTo = "asmgomaa@hotmail.com"; // your email
$subject = "My Site Reply"; // subject you want displayed
$header = "From: $name <$email>\r\n"; /* shows from asdasd and email says sadasd@dasdas.com */

$email = $_POST['email']; /* defines ['email'] in the
name tag of the input tags in HTML */
$msg = $_POST['msg']; // same here for msg
?>

now for your html code, right outside those php tags,
put in this...

<for method="post" action="<?php echo
$_SERVER['PHP_SELF']; ?>">
<input name="email">
<input name="msg">
<input type="submit">
</form>
</html>
 
Back
Top