PDA

View Full Version : Going Crazy for 3 days now



secretalain
02-23-2006, 04:14 PM
PLEASE help me, the pages don't work together and i don't know what i'm doing wrong...
when i fill my name in and click on the submit button i directly go to the errorpage, what am i doing wrong?
i've read all the forums (navaldisign, bird , guyhurrry, pablo) and im getting crazy .
here are al the page's codes (PHP,HTML-form,ERROR_PAGE,CONFERMATION PAGE)please help me, thank you


PHP:

<?php
// Receiving variables
@$Naam = addslashes($_POST['naam']);
@$Adres = addslashes($_POST['adres']);
@$Postcode = addslashes($_POST['postcode']);
@$Woonplaats = addslashes($_POST['woonplaats']);
@$Geboortedatum = addslashes($_POST['geboortedatum']);
@$Geboorteplaats = addslashes($_POST['geboorteplaats']);
@$Telefoonnummer = addslashes($_POST['telefoonnummer']);
// Validation
if (strlen($naam) == 0 )
{
header("Location: error_naam.html");
exit;
}
if (strlen($Adres) == 0 )
{
header("Location: error_adres.html");
exit;
}
if (strlen($Postcode) == 0 )
{
header("Location: error_postcode.html");
exit;
}
if (strlen($Woonplaats) == 0 )
{
header("Location: error_woonplaats.html");
exit;
}
if (strlen($Geboortedatum) == 0 )
{
header("Location: error_geboortedatum.html");
exit;
}
if (strlen($Geboorteplaats) == 0 )
{
header("Location: error_geboorteplaats.html");
exit;
}
if (strlen($Telefoonnummer) == 0 )
{
header("Location: error_telefoonnummer.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $Email\n"
. "Reply-To: $Email\n";
$pfw_subject = "aanmelden";
$pfw_email_to = "secretalain********.com";
$pfw_message =
. "naam: $naam\n"
. "Adres: $Adres\n"
. "postcode: $postcode\n"
. "woonplaats: $woonplaats\n"
. "geboortedatum: $geboortedatum\n"
. "geboorteplaats: $geboorteplaats\n"
. "telefoonnummer: $telefoonnummer\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: bevestiging.html");
?>

HTML (the red words are the reguired fields):

<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="Generator" CONTENT="Created by BlueVoda">
<META NAME="Keywords" CONTENT=>
<META NAME="Description" CONTENT=>
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000">
<DIV style="position:absolute; left:418px; top:67px; width:150px; height:19px; z-index:24" align="left" valign="top">
<FONT style="FONT-SIZE:14pt" color="#000000" face="Arial"><B>Aanmelden</B></FONT>
</DIV>
<DIV style="position:absolute; left:197px; top:53px; width:522px; height:627px; z-index:25" align="left" valign="top">
<FORM name=aanmelden method=POST action="aanmelden.php">
<INPUT type="text" style="position:absolute;left:196px;top:78px;width:304px; z-index:0" size="38" name="naam " value="">
<INPUT type="text" style="position:absolute;left:196px;top:114px;width:304px ;z-index:1" size="38" name="adres " value="">
<INPUT type="text" style="position:absolute;left:196px;top:151px;width:144px ;z-index:2" size="18" name="postcode " value="">
<INPUT type="text" style="position:absolute;left:196px;top:187px;width:304px ;z-index:3" size="38" name="woonplaats " value="">
<INPUT type="text" style="position:absolute;left:196px;top:222px;width:200px ;z-index:4" size="25" name="geboortedatum " value="">
<INPUT type="text" style="position:absolute;left:195px;top:257px;width:304px ;z-index:5" size="38" name="geboorteplaats " value="">
<INPUT type="text" style="position:absolute;left:195px;top:294px;width:200px ;z-index:6" size="25" name="telefoonnummer " value="">
<INPUT type="text" style="position:absolute;left:195px;top:330px;width:200px ;z-index:7" size="25" name="mobielnummer " value="">
<INPUT type="text" style="position:absolute;left:195px;top:365px;width:304px ;z-index:8" size="38" name="e-mail " value="">
<select name="keuze" size="1" style="position:absolute;left:193px;top:400px;width:146px ;font-family:MS Shell Dlg;z-index:9">
<option></option>
<option>A</option>
<option>B</option>
<option>C</option>
<option>D</option>
<option>E</option>
</select>
<TEXTAREA name="bijzonderheden " style="position:absolute;left:195px;top:438px;width:303px ;height:89px;z-index:10" rows=5 cols=35></TEXTAREA>
<INPUT type="submit" name="Aanmelden " value="Aanmelden" style="position:absolute;left:195px;top:545px;z-index:11">
<DIV style="position:absolute; left:11px; top:79px; width:150px; height:19px; z-index:12" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Naam: </FONT><FONT style="FONT-SIZE:12pt" color="#FF0000" face="Arial">*</B></FONT>
</DIV>
<DIV style="position:absolute; left:11px; top:114px; width:150px; height:19px; z-index:13" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Adres: </FONT><FONT style="FONT-SIZE:12pt" color="#FF0000" face="Arial">*</B></FONT>
</DIV>
<DIV style="position:absolute; left:11px; top:150px; width:150px; height:19px; z-index:14" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Postcode: </FONT><FONT style="FONT-SIZE:12pt" color="#FF0000" face="Arial">*</B></FONT>
</DIV>
<DIV style="position:absolute; left:10px; top:186px; width:150px; height:19px; z-index:15" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Woonplaats: </FONT><FONT style="FONT-SIZE:12pt" color="#FF0000" face="Arial">*</B></FONT>
</DIV>
<DIV style="position:absolute; left:10px; top:222px; width:150px; height:19px; z-index:16" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Geboortedatum: </FONT><FONT style="FONT-SIZE:12pt" color="#FF0000" face="Arial">*</B></FONT>
</DIV>
<DIV style="position:absolute; left:10px; top:258px; width:150px; height:19px; z-index:17" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Geboorteplaats: </FONT><FONT style="FONT-SIZE:12pt" color="#FF0000" face="Arial">*</B></FONT>
</DIV>
<DIV style="position:absolute; left:11px; top:294px; width:150px; height:19px; z-index:18" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Telefoonnummer: </FONT><FONT style="FONT-SIZE:12pt" color="#FF0000" face="Arial">*</B></FONT>
</DIV>
<DIV style="position:absolute; left:11px; top:330px; width:150px; height:19px; z-index:19" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Mobiel:</B></FONT>
</DIV>
<DIV style="position:absolute; left:11px; top:366px; width:150px; height:19px; z-index:20" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>E-Mail:</B></FONT>
</DIV>
<DIV style="position:absolute; left:13px; top:402px; width:150px; height:19px; z-index:21" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Keuze : </B></FONT>
</DIV>
<DIV style="position:absolute; left:12px; top:440px; width:150px; height:19px; z-index:22" align="left" valign="top">
<FONT style="FONT-SIZE:12pt" color="#000000" face="Arial"><B>Bijzonderheden:</B></FONT>
</DIV>
<DIV style="position:absolute; left:199px; top:578px; width:178px; height:16px; z-index:23" align="left" valign="top">
<FONT style="FONT-SIZE:10pt" color="#FF0000" face="Arial">* Verplicht om in te vullen!</FONT>
</DIV>
</FORM>
</DIV>
</BODY>
</HTML>

ERROR PAGE:

<HTML>
<HEAD><meta http-equiv="imagetoolbar" content="no">
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>Niet alle velden ingevuld!</TITLE>
<META name=>
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000">
<DIV style="position:absolute;left:264px;top:98px;width:299px; height:22px;z-index:0" align="center">
<FONT style="FONT-SIZE:14pt" color="#000000" face="Arial"><B>Vul aub u naam in</B></FONT>
</DIV>
<IMG src="no-way.jpg" alt="" align="top" border="0" width="173" height="172" style="position:absolute;left:328px;top:162px;width:173px ;height:172px;z-index:1">
<BUTTON type="button" onClick="history.go(-1)" name="Terug" style="position:absolute;left:327px;top:396px;width:175px ;height:23px;z-index:2"><P><FONT style="FONT-SIZE:10pt" color="#000000" face="Arial"><B>Terug</B></FONT></P></BUTTON>
</BODY>
</HTML>

CONFITMATION PAGE

<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="Generator" CONTENT="Created by BlueVoda">
<META NAME="Keywords" CONTENT=">
<META NAME="Description" CONTENT=">
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000">
<DIV style="position:absolute; left:418px; top:67px; width:150px; height:19px; z-index:0" align="left" valign="top">
<FONT style="FONT-SIZE:14pt" color="#000000" face="Arial"><B>Aanmelden</B></FONT>
</DIV>
<DIV style="position:absolute; left:292px; top:271px; width:425px; height:58px; z-index:1" align="left" valign="top">
<FONT style="FONT-SIZE:18pt" color="#000000" face="Arial"><B>BEDANKT VOOR ALLE REACTIE'S !!!</B></FONT>
</DIV>
</BODY>
</HTML>

how is it possibele that when i fill in the form, i directly go to the error page ???
please reply.....

navaldesign
02-23-2006, 05:56 PM
Please upload the URLs. I'd like to have a direct look at it. BUT FIRST change the email address with your Vodahost account email, otherwise you will receive no mail. Then, the script cheks ALL required fileds. If you just type in your name and not the rest, it will get you to the error page. then, do you only have 1 error page? because the script, as you have modified it, requires separate erro pages for every field. And you haven't put the email "grabbing" in the beggining of the script. I'll have a detailed look later and let you know

navaldesign
02-23-2006, 08:10 PM
Mobielnummer, e-mail, keuze, and bijzonderheden, are 4 fields not captured by the script because you have not inserted the relevant code. Then, you have configured the script to provide different error pages for every error, but you have only made a single error page (at least this is what you're saying here. Also, as you say, you only type in the name. If the other required fields are emty, the script must and will take you to the error page. But the whole problem is because you define the variable naam with uppercase capital letter (@$ Naam )
whilst in the script validation part you use lowercase capital letters : $naam so the script considers $Naam null and takes you to the error page.

Change also your email address as instructed above, and add the 4 lines necessary for the other 4 fields.

navaldesign
02-23-2006, 08:39 PM
Please also note that for the same reason you will receive a mail WITHOUT the values submitted: you have used lowercase first letters in the mail body creation part, whilst the variables, defined in the very first lines of the script, are with lowercase first letter.

secretalain
02-24-2006, 01:22 AM
hello naveldesign thank you for youre reply's!
i have 7 error pages error_naam.html> error_adres.html> etc.
how must the other 4 fields be written in the script???
beacause the other 4 fields arent required, the code is different am i right ?? so what is that code ??

NAVELDESIGN:
And you haven't put the email "grabbing" in the beggining of the script

what do you mean ?
new script >>>

PHP

<?php
// Receiving variables
@$Naam = addslashes($_POST['Naam']);
@$Adres = addslashes($_POST['Adres']);
@$Postcode = addslashes($_POST['Postcode']);
@$Woonplaats = addslashes($_POST['Woonplaats']);
@$Geboortedatum = addslashes($_POST['Geboortedatum']);
@$Geboorteplaats = addslashes($_POST['Geboorteplaats']);
@$Telefoonnummer = addslashes($_POST['Telefoonnummer']);
// Validation
if (strlen($Naam) == 0 )
{
header("Location: error_naam.html");
exit;
}
if (strlen($Adres) == 0 )
{
header("Location: error_adres.html");
exit;
}
if (strlen($Postcode) == 0 )
{
header("Location: error_postcode.html");
exit;
}
if (strlen($Woonplaats) == 0 )
{
header("Location: error_woonplaats.html");
exit;
}
if (strlen($Geboortedatum) == 0 )
{
header("Location: error_geboortedatum.html");
exit;
}
if (strlen($Geboorteplaats) == 0 )
{
header("Location: error_geboorteplaats.html");
exit;
}
if (strlen($Telefoonnummer) == 0 )
{
header("Location: error_telefoonnummer.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $Email\n"
. "Reply-To: $Email\n";
$pfw_subject = "aanmelden";
$pfw_email_to = "info@rijschool.nl";
$pfw_message =
. "Naam: $Naam\n"
. "Adres: $Adres\n"
. "Postcode: $Postcode\n"
. "Woonplaats: $Woonplaats\n"
. "Geboortedatum: $Geboortedatum\n"
. "Geboorteplaats: $Geboorteplaats\n"
. "Telefoonnummer: $Telefoonnummer\n";
*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: bevestiging.html");
?>

is this better ?where must i correct things?
for me its verry diffecult because the translation, so i hope you won't mind helping me.

Watdaflip
02-24-2006, 03:23 AM
Navals saying you didn't get the return address from the form. In $pfw_header the "from" and "reply_to" is $Email, but you didn't grab that variable. At the top add $Email = $_POST['e-mail'];

navaldesign
02-24-2006, 06:55 AM
Watdaflip explained that. But you are missing also the other three fields


<?php
// Receiving variables
@$Naam = addslashes($_POST['Naam']);
@$Adres = addslashes($_POST['Adres']);
@$Postcode = addslashes($_POST['Postcode']);
@$Woonplaats = addslashes($_POST['Woonplaats']);
@$Geboortedatum = addslashes($_POST['Geboortedatum']);
@$Geboorteplaats = addslashes($_POST['Geboorteplaats']);
@$Telefoonnummer = addslashes($_POST['Telefoonnummer']);
@$Mobielnummer = addslashes($_POST['Mobielnummer']);
@$Email = addslashes($_POST['Email']);
@$Keuze = addslashes($_POST['Keuze']);
@$Bijzonderheden = addslashes($_POST['Bijzonderheden']);

// Validation
if (strlen($Naam) == 0 )
{
header("Location: error_naam.html");
exit;
}
if (strlen($Adres) == 0 )
{
header("Location: error_adres.html");
exit;
}
if (strlen($Postcode) == 0 )
{
header("Location: error_postcode.html");
exit;
}
if (strlen($Woonplaats) == 0 )
{
header("Location: error_woonplaats.html");
exit;
}
if (strlen($Geboortedatum) == 0 )
{
header("Location: error_geboortedatum.html");
exit;
}
if (strlen($Geboorteplaats) == 0 )
{
header("Location: error_geboorteplaats.html");
exit;
}
if (strlen($Telefoonnummer) == 0 )
{
header("Location: error_telefoonnummer.html");
exit;
}
// It is strongly reccomended that you set E-mail as required field.
if (strlen($Email) == 0 )
{
header("Location: error_email.html");
exit;



//Sending Email to form owner
$pfw_header = "From: $Email\n"
. "Reply-To: $Email\n";
$pfw_subject = "aanmelden";
$pfw_email_to = "info@rijschool.nl";
$pfw_message = "Naam: $Naam\n"
. "Adres: $Adres\n"
. "Postcode: $Postcode\n"
. "Woonplaats: $Woonplaats\n"
. "Geboortedatum: $Geboortedatum\n"
. "Geboorteplaats: $Geboorteplaats\n"
. "Telefoonnummer: $Telefoonnummer\n"
. "Mobielnummer: $ Mobielnummer\n"
. "Keuze : $ Keuze\n"
. "Bijzonderheden : $Bijzonderheden\n";


*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: bevestiging.html");
?>


Then you must change all the field names in your form accordingly, that is using uppercase first letter, just as it is in the script. The names of the fields must be excactly the same as in the script. For the Email take the - out, simply use "Email"

secretalain
02-24-2006, 01:46 PM
my URL for the form : http://www.rijschooldelta.nl/aanmelden.html
the URL for the error pages : http://www.rijschooldelta.nl/error_naam.html
http://www.rijschooldelta.nl/error_adres.html
http://www.rijschooldelta.nl/error_postcode.html ETC.

i haven't putt in the email as required. maybey the next step butt first i want to fill in these required fields.thank you so far!

my PHP file at the moment :

<?php
// Receiving variables
@$Naam = addslashes($_POST['Naam']);
@$Adres = addslashes($_POST['Adres']);
@$Postcode = addslashes($_POST['Postcode']);
@$Woonplaats = addslashes($_POST['Woonplaats']);
@$Geboortedatum = addslashes($_POST['Geboortedatum']);
@$Geboorteplaats = addslashes($_POST['Geboorteplaats']);
@$Telefoonnummer = addslashes($_POST['Telefoonnummer']);
@$Mobielnummer = addslashes($_POST['Mobielnummer']);
@$Email = addslashes($_POST['Email']);
@$Keuze = addslashes($_POST['Keuze']);
@$Bijzonderheden = addslashes($_POST['Bijzonderheden']);
// Validation
if (strlen($Naam) == 0 )
{
header("Location: error_naam.html");
exit;
}
if (strlen($Adres) == 0 )
{
header("Location: error_adres.html");
exit;
}
if (strlen($Postcode) == 0 )
{
header("Location: error_postcode.html");
exit;
}
if (strlen($Woonplaats) == 0 )
{
header("Location: error_woonplaats.html");
exit;
}
if (strlen($Geboortedatum) == 0 )
{
header("Location: error_geboortedatum.html");
exit;
}
if (strlen($Geboorteplaats) == 0 )
{
header("Location: error_geboorteplaats.html");
exit;
}
if (strlen($Telefoonnummer) == 0 )
{
header("Location: error_telefoonnummer.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: $Email\n"
. "Reply-To: $Email\n";
$pfw_subject = "aanmelden";
$pfw_email_to = info@rijschooldelta.nl;
$pfw_message =
. "Naam: $Naam\n"
. "Adres: $Adres\n"
. "Postcode: $Postcode\n"
. "Woonplaats: $Woonplaats\n"
. "Geboortedatum: $Geboortedatum\n"
. "Geboorteplaats: $Geboorteplaats\n"
. "Telefoonnummer: $Telefoonnummer\n"
. "Mobielnummer: $ Mobielnummer\n"
. "Keuze : $ Keuze\n"
. "Bijzonderheden : $Bijzonderheden\n";

*****($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: bevestiging.html");
?>

it still doesnt work... everytime when i fill in the form it gives me the error_naam page. when i made the form i gave de max. lenghts of the tabs 0 (unlimited)... maybe t got something to do with that???
i'm really stuck on this please help...

navaldesign
02-24-2006, 03:12 PM
The names of your fields in the form, have a blank space after them, take them off and try it again. (f.e. "Naam_" whilst in the script you have "Naam" without space. Also you have changed the "Kauze" in "Keuze opleiding " , if you do changes in the form filed names, you must also change the script. Please note that the text that appears before each field, is a neutral element, so the text can be "Keuze opleiding " but the field itself must be simply "Kauze", as it is in the script.

secretalain
02-24-2006, 04:25 PM
i made the changes in the form. the .php file is same as above, butt still it doesn't. you can check it out if you want

http://www.rijschooldelta.nl/aanmelden.html

just fill something in it still gives the error_naam.html

thanks fo the help i really apreciate it!!!

navaldesign
02-24-2006, 04:28 PM
i made the changes in the form. the .php file is same as above, butt still it doesn't. you can check it out if you want

http://www.rijschooldelta.nl/aanmelden.html

just fill something in it still gives the error_naam.html

thanks fo the help i really apreciate it!!!

Ok, wait 30 minutes, i'll give you the script as it must be. Just upload it on the server and you're done.

navaldesign
02-24-2006, 04:30 PM
i made the changes in the form. the .php file is same as above, butt still it doesn't. you can check it out if you want

http://www.rijschooldelta.nl/aanmelden.html

just fill something in it still gives the error_naam.html

thanks fo the help i really apreciate it!!!

BUT you haven't done the corrections i told you about. Please do so and then test the form

navaldesign
02-24-2006, 04:51 PM
BUT you haven't done the corrections i told you about. Please do so and then test the form

Tere are also two more errors:

$pfw_email_to = "info@rijschooldelta.nl"; Missed the " and "

Then

$pfw_message =
. "Naam: $Naam\n"

delete the .

make it

$pfw_message = "Naam: $Naam\n"


Test your form at http://www.navaldesign.info/Tips/aanmelden.html

secretalain
02-27-2006, 12:05 AM
navaldesign thank you for youre help butt still it doesnt work...i copied youre .php file , removed the spaces just now its only "Naam" ( http://www.rijschooldelta.nl/aanmelden.html ) butt still it does not work... at youre site it works i dont now how butt it does... nice work :)!

navaldesign
02-27-2006, 12:17 AM
navaldesign thank you for youre help butt still it doesnt work...i copied youre .php file , removed the spaces just now its only "Naam" ( http://www.rijschooldelta.nl/aanmelden.html ) butt still it does not work... at youre site it works i dont now how butt it does... nice work :)!

Did you receive the mails when testing the form on my site ?

secretalain
02-27-2006, 12:42 AM
yes... from youre site it workes

navaldesign
02-27-2006, 12:50 AM
yes... from youre site it workes

Ok did you receive the email that i sent you with the attached php file?

secretalain
02-27-2006, 12:53 AM
yes and i copied it to notepad and saved it as aanmelden.php
i made the corrections on the form page and still get the error_naam.html message when i fill something in. even if i fill in the whole form...

navaldesign
02-27-2006, 01:02 AM
I'll email you the form page. Open it, if the images do not show, please double click on them to edit them and give again the path to the folder where the images are. I'll send you also the php file. Just upload it as it is to your server, don't put it in notepad. Give me three minutes .

navaldesign
02-27-2006, 01:08 AM
Sorry, can't do anything right now. the files are on my site, and the server 3 where i'm on, is down for the moment. I't will have to wait till morning when i get at office, I have the files in my computer there

secretalain
02-27-2006, 01:21 AM
that doesn't matter thank you either way!
ill check my mail tomorrow. here its 2.20am so iam turning in.
thank you navaldesign!

navaldesign
02-27-2006, 01:28 AM
that doesn't matter thank you either way!
ill check my mail tomorrow. here its 2.20am so iam turning in.
thank you navaldesign!

Same hour here. Goodnight

secretalain
02-27-2006, 02:12 PM
i see youre from italy :) i thought america...

secretalain
02-27-2006, 09:25 PM
have you sent the mail already because i havent received anything?
if you havent just take youre time!

navaldesign
02-27-2006, 09:36 PM
have you sent the mail already because i havent received anything?
if you havent just take youre time!

This morning i forgot, then from 13:30 to 19:30 that i came home, my italian ISP server was down. Now i'm at home but i think i can rebuild your page again so i won't make you wait till tomorrow. Please pass me again your email (i only have it in my office)

secretalain
02-27-2006, 11:56 PM
?????????????????????? (secretalain********.com)

navaldesign
02-28-2006, 12:02 AM
I already sent it to you on your info@... address. Please don't put email addresses on the net.

secretalain
02-28-2006, 12:56 AM
ok thank you ( and for the tip). i will check it tomorrow on work!
btw can you send it to both adresses please, if its not to much work...