PHP expert |
|
heb met behulp mensen hierop sima, dit in elkaar geknusteld, maar heb een probleem waar ik niet uit kom
heb nu 1 lap code, maar ik wil dat op pagina1 het formulier word getoond en kijke of alles goed is, en dan als het goed is, hij naar pagina2 (desnoods alles op pagina1 (maar pas laten zien nadat deel van pagina1 goed is)) en op pagina2 moet hij dan alle gegevens die je hebt ingevuld laten zien, en onder een button met
Sent Mail
<?php
$admin = 'ultimatum22@hotmail.com';
$adminname = 'Ultimatum';
$subject = 'Request form';
$spam = (60*60*24);
if(isset($_COOKIE['Request'])) {
$show = true; echo 'You can request a template once a day';
}
if(!isset($show)){
?>
<form method="post">
name:<br />
<input type="text" name="name"><br />
Email:<br />
<input type="text" name="mail"><br />
Email [confirm]:<br />
<input type="text" name="cmail"><br />
..::Colors: (min 1 hexcode, max 6 hexcodes)::..<br />
<input type="text" name="hexcolor1" maxlength="6">
<input type="text" name="hexcolor2" maxlength="6"><br /><br />
<input type="text" name="hexcolor3" maxlength="6">
<input type="text" name="hexcolor4" maxlength="6"><br /><br />
<input type="text" name="hexcolor5" maxlength="6">
<input type="text" name="hexcolor6" maxlength="6"><br /><br />
..:Size::..<br />
Width:<br />
<input type="text" name="width" size="10" maxlength="10" value="width"> <input type="text" name="ex_width" size="10" maxlength="15" value="px or %"><br />
Height:<br />
<input type="text" name="height" size="10" maxlength="10" value="height"> <input type="text" name="ex_height" size="10" maxlength="15" value="px or %"><br />
Template-Align:<br />
<input type="radio" name="layout" value="left">Left<br />
<input type="radio" name="layout" value="center">Center<br />
<input type="radio" name="layout" value="right">Right<br /><br />
..::Text::..<br />
Text-Align:<br />
<input type="radio" name="text" value="left">Left<br />
<input type="radio" name="text" value="center">Center<br />
<input type="radio" name="text" value="right">Right<br />
Text-color [hexcode]:<br />
<input type="text" name="textcolor" maxlength="6"><br /><br />
..::Coding in HTML or CSS::..<br />
<input type="radio" name="code" value="HTML">HTML<br />
<input type="radio" name="code" value="CSS">CSS<br /><br />
Extra:<br />
<textarea name="extra" cols="40" rows="5">Fill this in if you want someting that is not in the form</textarea><br />
<input type="submit" name="submit" value="Submit"><br />
</form>
<br />
<?php
if (isset($_POST['submit'])) {
if (empty($name)) {
echo "You haven't fill in a name";
}elseif (empty($mail)) {
echo "You have to fill in an email address";
}elseif (empty($cmail)) {
echo "You have to confirm your email address";
}elseif (!preg_match("/^[A-Za-z0-9._\-]+\@[A-Za-z0-9._\-]+\.[A-Za-z]{2,4}$/", "$mail")) {
echo "Fill in a valid email address";
}elseif ($mail != $cmail) {
echo "The addresses you enterd are not the same";
}elseif (empty($hexcolor1)) {
echo "Fill at least 1 hexcolor in";
}elseif (empty($width)) {
echo "You have to fill in a width for the layout";
}elseif (empty($ex_width)) {
echo "You have to fill in or you want your width in px or %";
}elseif (empty($height)) {
echo "You have to fill in a height for the layout";
}elseif (empty($ex_height)) {
echo "You have to fill in or you want your height in px or %";
}elseif(empty($layout)) {
echo "You have to choose the placement of the layout";
}elseif(empty($text)) {
echo "You have to choose the placement of the text";
}elseif (empty($textcolor)) {
echo "You have to fill in the color you text must be";
}elseif (empty($code)){
echo "You have to choose between CSS and HTML";
}else{
$headers = "From: ".$subject." <".$adminname.">\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1";
$message = "Naam: ".$name." \n";
$message .= "E-mail: ".$mail." \n";
$message .= "Hexcolors: #".$hexcolor1.",#".$hexcolor2.",#".$hexcolor3.",#".$hexcolor4.",#".$hexcolor5.",#".$hexcolor6." \n ";
$message .= "Width: ".$width." ".$ex_width." \n";
$message .= "Height: ".$height." ".$ex_height." \n";
$message .= "Layoutalign: ".$layout." \n";
$message .= "Textalign: ".$text." \n";
$message .= "Textcolor: ".$textcolor." \n";
$message .= "Coding: ".$code." \n";
$message .= "Extra comments: ".$extra." \n";
$message .= " \n ";
$message .= "Date: ".date("d-m-Y H:i:s")." \n";
$message .= "------------------------------------------------------- \n ";
mail($admin,$subject,$message,$headers);
setcookie('Request',1,time()+($spam));
echo "The email has been sent!";
echo "You will be redirecting...";
header("Refresh: 2; url=?page=request");
$show = true;
}
}
}
?>
<?php $admin = 'ultimatum22@hotmail.com'; $adminname = 'Ultimatum'; $subject = 'Request form'; $spam = (60*60*24); if(isset($_COOKIE['Request'])) { $show = true; echo 'You can request a template once a day'; } ?> <form method="post"> name:<br /> <input type="text" name="name"><br /> Email:<br /> <input type="text" name="mail"><br /> Email [confirm]:<br /> <input type="text" name="cmail"><br /> ..::Colors: (min 1 hexcode, max 6 hexcodes)::..<br /> <input type="text" name="hexcolor1" maxlength="6"> <input type="text" name="hexcolor2" maxlength="6"><br /><br /> <input type="text" name="hexcolor3" maxlength="6"> <input type="text" name="hexcolor4" maxlength="6"><br /><br /> <input type="text" name="hexcolor5" maxlength="6"> <input type="text" name="hexcolor6" maxlength="6"><br /><br /> ..:Size::..<br /> Width:<br /> <input type="text" name="width" size="10" maxlength="10" value="width"> <input type="text" name="ex_width" size="10" maxlength="15" value="px or %"><br /> Height:<br /> <input type="text" name="height" size="10" maxlength="10" value="height"> <input type="text" name="ex_height" size="10" maxlength="15" value="px or %"><br /> Template-Align:<br /> <input type="radio" name="layout" value="left">Left<br /> <input type="radio" name="layout" value="center">Center<br /> <input type="radio" name="layout" value="right">Right<br /><br /> ..::Text::..<br /> Text-Align:<br /> <input type="radio" name="text" value="left">Left<br /> <input type="radio" name="text" value="center">Center<br /> <input type="radio" name="text" value="right">Right<br /> Text-color [hexcode]:<br /> <input type="text" name="textcolor" maxlength="6"><br /><br /> ..::Coding in HTML or CSS::..<br /> <input type="radio" name="code" value="HTML">HTML<br /> <input type="radio" name="code" value="CSS">CSS<br /><br /> Extra:<br /> <textarea name="extra" cols="40" rows="5">Fill this in if you want someting that is not in the form</textarea><br /> <input type="submit" name="submit" value="Submit"><br /> </form> <br /> <?php if (isset($_POST['submit'])) { echo "You haven't fill in a name"; echo "You have to fill in an email address"; }elseif (empty($cmail)) { echo "You have to confirm your email address"; }elseif (!preg_match("/^[A-Za-z0-9._\-]+\@[A-Za-z0-9._\-]+\.[A-Za-z]{2,4}$/", "$mail")) { echo "Fill in a valid email address"; }elseif ($mail != $cmail) { echo "The addresses you enterd are not the same"; }elseif (empty($hexcolor1)) { echo "Fill at least 1 hexcolor in"; }elseif (empty($width)) { echo "You have to fill in a width for the layout"; }elseif (empty($ex_width)) { echo "You have to fill in or you want your width in px or %"; }elseif (empty($height)) { echo "You have to fill in a height for the layout"; }elseif (empty($ex_height)) { echo "You have to fill in or you want your height in px or %"; }elseif(empty($layout)) { echo "You have to choose the placement of the layout"; echo "You have to choose the placement of the text"; }elseif (empty($textcolor)) { echo "You have to fill in the color you text must be"; echo "You have to choose between CSS and HTML"; }else{ $headers = "From: ".$subject." <".$adminname.">\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1"; $message = "Naam: ".$name." \n"; $message .= "E-mail: ".$mail." \n"; $message .= "Hexcolors: #".$hexcolor1.",#".$hexcolor2.",#".$hexcolor3.",#".$hexcolor4.",#".$hexcolor5.",#".$hexcolor6." \n "; $message .= "Width: ".$width." ".$ex_width." \n"; $message .= "Height: ".$height." ".$ex_height." \n"; $message .= "Layoutalign: ".$layout." \n"; $message .= "Textalign: ".$text." \n"; $message .= "Textcolor: ".$textcolor." \n"; $message .= "Coding: ".$code." \n"; $message .= "Extra comments: ".$extra." \n"; $message .= " \n "; $message .= "Date: ".date("d-m-Y H:i:s")." \n"; $message .= "------------------------------------------------------- \n "; mail($admin,$subject,$message,$headers); echo "The email has been sent!"; echo "You will be redirecting..."; header("Refresh: 2; url=?page=request"); $show = true; } } } ?>
stuur me nou niet naar samenwerkingstopic oid want ik kom er niet uit en er zitten heir vast wel php addicted freakz die het binnen een paar minute kunnen doen waar ik 2 uur over doe
|