[Nfb-web] php help

Marvin Hunkin startrekcafe at gmail.com
Sat Dec 17 07:49:32 UTC 2011


Hi.
well sorry, forggot about that.
well if any one can help me with my smtp, and also using windows 7 
professional 32 bit, and using wamp server 2.2, and using mozilla 
thunderbird as my mail client.
also, how to format the message.
can any one help?
will paste my html form and the php code and the mozilla firefox browser 
window below.
Marvin.

<html>
<head>
<title>Student Details</title>
</head>
<body>
<h1>Parents And Citizens Student School Survey</h1>
<form action="Data.php" method="post">
<p>Firstname: <input type="text" name="firstname"></p>
<p>Lastname: <input type="text" name="lastname"></p>
<p>Date Of Birth: <input type="text" name="dateofbirth"></p>
<p>Current Year At School: <input type="text" name="currentyear"></p>
<p>Number Of Siblings: <input type="text" name="familynumber"></p>
<p>Home Work: <input type="text" name="homework"></p>
<p>Entertainment: <input type="text" name="entertainment"></p>
<p>Computer: <input type="text" name="computer"></p>
<p>Family: <input type="text" name="family"></p>
<p>Friends: <input type="text" name="friends"></p>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>

<?php
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$dateofbirth=$_POST['dateofbirth'];
$currentyear=$_POST['currentyear'];
$familynumber=$_POST['familynumber'];
$homework=$_POST['homework'];
$entertainment=$_POST['entertainment'];
$computer=$_POST['computer'];
$family=$_POST['family'];
$friends=$_POST['friends'];
$subject=$_POST['$subject'];
$message=$_POST['$message'];
echo "<h1>Student Details:</h1>";
echo "<p>Great! Thanks ".$firstname." for responding to our survey.</p>";
echo "<p>Name: ".$firstname." $lastname</p>";
echo "<p>Date Of Birth: $dateofbirth</p>";
echo "<p>Current School Year: $currentyear</p>";
echo "<p>Number Of Siblings: $familynumber</p>";
echo "<p> Subject: $subject = '$firstname, $lastname survey results'</p>";
echo "<p>Message: $message = '$firstname, $lastname, $dateofbirth, 
$currentyear, $familynumber, $homework, $entertainment, $computer, 
$family, $friends'</p>";
$to='startrekcafe at gmail.com';
$subject = "$firstname, $lastname";
mail($to, $subject, $message);
?>

http://localhost/SixthPHP/Data.php

table with 5 columns and 4 rows
( ! ) Notice: Undefined index: $subject in C:\wamp\www\SixthPHP\Data.php 
on line 12
Call Stack
#
Time
Memory
Function
Location
1
0.0006
379792
{main}( )
..\Data.php:0
table end

table with 5 columns and 4 rows
( ! ) Notice: Undefined index: $message in C:\wamp\www\SixthPHP\Data.php 
on line 13
Call Stack
#
Time
Memory
Function
Location
1
0.0006
379792
{main}( )
..\Data.php:0
table end

Student Details:

Great! Thanks Marvin for responding to our survey.

Name: Marvin Hunkin

Date Of Birth: 13/02/1965

Current School Year: 12

Number Of Siblings: 3

Subject: = 'Marvin, Hunkin survey results'

Message: = 'Marvin, Hunkin, 13/02/1965, 12, 3, 30, 88, 95, 33, 102'

table with 5 columns and 5 rows
( ! ) Warning: mail() [
function.mail]:
Failed to connect to mailserver at "localhost" port 25, verify your 
"SMTP" and "smtp_port" setting in php.ini or use ini_set() in 
C:\wamp\www\SixthPHP\Data.php
on line 24
Call Stack
#
Time
Memory
Function
Location
1
0.0006
379792
{main}( )
..\Data.php:0
2
0.0013
380832
mail
  ( )
..\Data.php:24
table end

ps: so how to fix the problems, maybe how to get the date for say 
Febuary 13, 1965, can any one help me out. maybe e-mail me off list via 
startrekcafe at gmail.com if not on topic.
--- In blindwebbers at yahoogroups.com, Parham Doustdar <parham90 at ...> wrote:
 >
 > Marvin,
 >
 > You cannot attach files to your emails when you're sending an email to
 > this list. But regardless of your code:
 >
 > 1. Setting up your SMTP is not a PHP issue, it depends on your operating
 > system.
 > 2. I expect you're using Windows. As far as I know, there is not an easy
 > solution about running an SMTP server on Windows. What I did was to find
 > someone who would let me play with the SMTP server running on his 
Linux box.
 >
 > But of course, if anyone has done this on Windows, I'd appreciate it if
 > they could step forward and help you.
 >
 > Good luck,
 > Parham
 >
 > On 12/16/2011 2:27 PM, Marvin Hunkin wrote:
 > >
 > > Hi.
 > > can some one help me to set up my smtp.
 > > also, not liking some of my variables.
 > > new to php and learning this.
 > > can any one help me to get the script working, and also to format it.
 > > i need to havea e-mail message in the form, and also need headings, or
 > > information or labels for each of the information.
 > > can any one help me?
 > > will atatch my code, a html file and my php script.
 > > new to learning php.
 > > Marvin.
 > >
 > > [Non-text portions of this message have been removed]
 > >
 > >
 >
 >
 > [Non-text portions of this message have been removed]
 >
hI




More information about the NFB-Web mailing list