PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
Go Back  Xtreme Visual Basic Talk > > > PHP Emailform doesn't seem to work, do i miss something?


Reply
 
Thread Tools Display Modes
  #1  
Old 01-19-2013, 04:34 PM
planetwise's Avatar
planetwise planetwise is offline
Regular
 
Join Date: Jun 2004
Location: Groningen, Netherlands
Posts: 75
Unhappy PHP Emailform doesn't seem to work, do i miss something?


I need a little help here.

I'm a poor programmer, but trying..

I've made a standard PHP emailform that i want to covert to an Android app later on. But for now i'm trying to get this to work.

The idea is a form that is basicly a checklist that i can fill out en sent it to myself, with the option to use it for collegues who then wants to sent it to themselves. Therefore i use a select list to get the right E-mail adres.

There are two problems that i can't seem to fix.

First, i dont reseve any mail... (yes, i put in the right emailadres in the select list)

Second, when submitted, the browser (IE) shows a empte page with the adres quickpost.php en not an ECHO in the qs.html page.

I'm sure i'm doing something wrong here, as i said, i am a poor programmer.

If anyone can point me in the right direction, i would be greatfull.

Below the code, files included in Quickscan.zip

Thanx,
John


HTML page (gs.html)
Code:
<form name="form1" method="post" action="quickpost.php">
<table style="width: 100%;" border="0">
	<tr>
		<td style="background-color: #fd9d01;" colspan="2">
			<h3>Quickscan 2013</h3>
		</td>
	</tr>
		<td>
			Naam klant <input type="text" ID="CUS" value="" size="20" />
		</TD>
		<td>	
			Adres <input type="text" ID="ADR" value="" size="20" />
		</td>
	</tr>
	<tr>
		<td>
			Telefoon <input type="text" ID="TEL" value="" size="20" />
		</TD>
		<td>	
			Plaats <input type="text" ID="CIT" value="" size="20" />
		</td>
	</tr>
	<tr>
		<td style="background-color: #fe0a00;" colspan="2">
			<em>Blusmiddelen</em>
		</td>
	</tr>
	<tr>
		<td width="50%">
			<input type="checkbox" name="blussers[]" value="dekking" />Projectering
		</td>
		<td width="50%">
			Aantal B&nbsp;
			<input type="button" value="-" OnClick="minusone('AB')" />
			<input type="text" ID="AB" value="0" size="3" />
			<input type="button" value="+" OnClick="plusone('AB')" />
		</td>
	</tr>
	<tr>
		<td>
			<input type="checkbox" name="blussers[]" value="plaatsing" />Montage
		</td>
		<td>
			Aantal H&nbsp;
			<input type="button" value="-" OnClick="minusone('AH')" />
			<input type="text" ID="AH" value=0 size="3" />
			<input type="button" value="+" OnClick="plusone('AH')" />
		</td>
	</tr>
	<tr>
		<td>
			<input type="checkbox" name="blussers[]" value="pictogram" />Pictogrammen
		</td>
		<td>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td>
			<input type="checkbox" name="blussers[]" value="bereikbaar" />Bereikbaarheid
		</td>
		<td>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td>	
			Onderhoudspartij blussers
		</td>
		<td>
			<input type="text" name="OHB" size="20" />
		</td>
	</tr>
	<tr>
		<td>
			Onderhoudsdatum B
		</td>
		<td>
			<Select NAME="OMB" ID="OMB" />
				<option value=""></option>
				<option value="1">Januari</option>
				<option value="2">Februari</option>
				<option value="3">Maart</option>
				<option value="4">April</option>
				<option value="5">Mei</option>
				<option value="6">Juni</option>
				<option value="7">Juli</option>
				<option value="8">Augustus</option>
				<option value="9">September</option>
				<option value="10">Oktober</option>
				<option value="11">November</option>
				<option value="12">December</option>
			</select>
			<Select NAME="OYB" ID="OYB" />
				<option value=""></option>
				<option value="1">2013</option>
				<option value="2">2012</option>
				<option value="3">2011</option>
				<option value="4">2010</option>
			</select>

		</td>
	</tr>
	<tr>
		<td>
			Onderhoudspartij haspels
		</td>
		<td>
			<input type="text" name="OHH" size="20" />
		</td>
	</tr>
	<tr>
		<td>
			Onderhoudsdatum H
		</td>
		<td>
			<Select NAME="OMH" ID="OMH" />
				<option value=""></option>				
				<option value=""></option>
				<option value="1">Januari</option>
				<option value="2">Februari</option>
				<option value="3">Maart</option>
				<option value="4">April</option>
				<option value="5">Mei</option>
				<option value="6">Juni</option>
				<option value="7">Juli</option>
				<option value="8">Augustus</option>
				<option value="9">September</option>
				<option value="10">Oktober</option>
				<option value="11">November</option>
				<option value="12">December</option>
			</select>
			<Select NAME="OYH" ID="OYH" />
				<option value=""></option>				
				<option value="1">2013</option>
				<option value="2">2012</option>
				<option value="3">2011</option>
				<option value="4">2010</option>
			</select>
		</td>
	</tr>
</table>
<!-- more of the same here several times -->
<p>
	<select NAME="AM" ID="AM" />
				<option value=""></option>
				<option value="adres1@myemailadres.nl">Person 1</option>
				<option value="adres2@myemailadres.nl">Person 2</option>
				<option value="adres3@myemailadres.nl">Person 3</option>
				<option value="adres4@myemailadres.nl">Person 4</option>	
	</select><br>	
	<input type="submit" name="submit" id="submit" value="Verzenden">
	<input type="reset" name="reset" id="reset" value="Leeg maken">
</p>

</form>
Javascript (myjs.js)
Code:
function minusone(MC){
	MyNumA = document.getElementById(MC).value;
		MyNumB = (MyNumA * 1) - 1;
	document.getElementById(MC).value = MyNumB;
}

function plusone(MC){
	MyNumA = document.getElementById(MC).value;
		MyNumB = (MyNumA * 1) + 1;
	document.getElementById(MC).value = MyNumB;
}
PHP (quickpost.php)

Code:
<?php   
if (!empty($_POST))
{
$tijd = time();   
$datum = strftime('%d/%m/%y %H:%M', $tijd); 
$aan = ($_POST['AM']);  
$Klant = ($_POST['CUS']);   
$Adres = ($_POST['ADR']); 
$Plaats = ($_POST['CIT']);   
$Telefoon = ($_POST['TEL']);   
foreach($_POST['blussers'] as $bvalue) { 
$BH .= "Checked: $bvalue\n"; 
} 
$AantalB = ($_POST[‘AB’]);
$LeverB = ($_POST[‘OHB’]);
$MaandB = ($_POST[‘OMB’]);
$JaarB = ($_POST[‘OYB’]); 
$AantalH = ($_POST[‘AH’]);
$LeverH = ($_POST[‘OHH’]);
$MaandH = ($_POST[‘OMH’]);
$JaarH = ($_POST[‘OYH’]); 
foreach($_POST['blusleiding'] as $lvalue) { 
$DBL .= "Checked: $lvalue\n"; 
} 
$AantalDBL = ($_POST[‘ADBL’]);
$AantalASP = ($_POST[‘AASP’]);
$LeverDBL = ($_POST[‘OHD’]);
$MaandDBL = ($_POST[‘OMD’]);
$JaarDBL = ($_POST[‘OYD’]); 
foreach($_POST['noodverlichting'] as $nvalue) { 
$NV .= "Checked: $nvalue\n"; 
} 
$AantalP = ($_POST[‘ANP’]);
$AantalNP = ($_POST[‘ANNP’]);
$LeverNV = ($_POST[‘OHN’]);
$MaandNV = ($_POST[‘OMN’]);
$JaarNV = ($_POST[‘OYN’]); 
foreach($_POST['ehbo'] as $evalue) { 
$VB .= "Checked: $evalue\n"; 
} 
$AantalV = ($_POST[‘AVBD’]);
$LeverV = ($_POST[‘OHV’]);
$MaandV = ($_POST[‘OMV’]);
$JaarV = ($_POST[‘OYV’]); 

$Bericht = “Quickscan van: $Klant:\n 
Adres: $Adres\n 
Plaat: $Plaats\n 
Telefoon: $telefoon\n
\n
$Datum\n
\n
Blusmiddelen\n
$BH\n
Aantal blussers: $AantalB\n
Leverancier: $LeverB\n
Onderhoud: $MaandB $JaarB\n
Aantal haspels: $AantalH\n
Leverancier: $LeverH\n
Onderhoud: $MaandH $JaarH\n
\n
$DBL\n
$blusleiding\n
Aantal DBL: $AantalDBL\n
Aantal ASP: $AantalASP\n
Leverancier: $LeverDBL\n
Onderhoud: $MaandDBL $JaarDBL\n
\n
Noodverlichting\n
$NV\n
Aantal NV P: $AantalP\n
Aantal NVNP: $AantalNP\n
Leverancier: $LeverNV\n
Onderhoud: $MaandNV $JaarNV\n
\n
Verbanddozen\n
$VB\n
Aantal VBD: $AantalV\n
Leverancier: $LeverV\n
Onderhoud: $MaandV $JaarV“;   

mail($aan, $klant, $Bericht); 
ECHO "Quickscan is verstuurd."

}
?>
Attached Files
File Type: zip Quickscan.zip (2.6 KB, 0 views)
__________________
Don't declare my string in public, it isn't integer.

Last edited by planetwise; 01-19-2013 at 05:22 PM.
Reply With Quote
  #2  
Old 07-01-2013, 06:24 AM
starmanMike starmanMike is offline
Junior Contributor
 
Join Date: Oct 2005
Location: near Norwich, UK
Posts: 247
Default

Beste vriend,
Are you running this script on your PC's web server? Because sometimes you need to change the SMTP setting in the php.ini file for your local machine to send emails.
Veel succes,
StarmanMike
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something? PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
 
PHP Emailform doesn't seem to work, do i miss something?
PHP Emailform doesn't seem to work, do i miss something?
 
-->