Autor Zpráva
gabael
Profil
Zdravím všetkých,

na webe som našiel hotový kontaktný formulár s odosielaním fotiek.
Funguje perfektne. Email dojde úplne v pohode Chyba je, že po vyplnení a odoslaní formuláru ma nepresmeruje na stránku s poďakovaním.
Prosím poraďte mi kde môže byť chyba. Vopred ďakujem za všetky odpovede. Formulár som nahral SEM, ak by to bolo potrebné pre pomoc.

prikladám PHP kód z formuláru:

<?PHP
*/
require_once("./include/fgcontactform.php");

$formproc = new FGContactForm();

//1. Add your email address here.
//You can add more than one receipients.
$formproc->AddRecipient('gabor.jenei@gmail.com'); //<<---Put your email address here


$formproc->SetFormRandomKey('HG9hPBpn9Bn26yg');

$formproc->AddFileUploadField('photo','jpg,jpeg,gif,png,bmp',2024);

if(isset($_POST['submitted']))
{
   if($formproc->ProcessForm())
   {
        $formproc->RedirectToURL("thank-you.php");
   }
}

?>
      <form id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' enctype="multipart/form-data" accept-charset='UTF-8'>
        
  <fieldset >
<legend>Kontaktný formulár

<input type='hidden' name='submitted' id='submitted' value='1'/>
<input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
<input type='text'  class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />

</legend><div class='short_explanation'>* povinné polia</div>

<div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div>
<div class='container'>
    <label for='name' >Meno a Priezvisko*: </label>
    <br/>
    <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
    <span id='contactus_name_errorloc' class='error'></span>
</div>
<div class='container'>
    <label for='email' >E-mail*:</label>
    <br/>
    <input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email') ?>' maxlength="50" /><br/>
    <span id='contactus_email_errorloc' class='error'></span>
</div>
<div class='container'>
    <label for='message' >Správa:</label>
    <br/>
    <span id='contactus_message_errorloc' class='error'></span>
    <textarea rows="10" cols="50" name='message' id='message'><?php echo $formproc->SafeDisplay('message') ?></textarea>
</div>
<div class='container'>
    <label for='photo' >Vaša fotka:</label>
    <br/>
    <input type="file" name='photo' id='photo' /><br/>
    <span id='contactus_photo_errorloc' class='error'></span>
</div>


<div class='container'>
    <input type='submit' name='Submit' value='POSLAŤ' />
</div>

</fieldset>
</form>
<!-- client-side Form Validations:
Uses the excellent form validation script from JavaScript-coder.com-->

<script type='text/javascript'>
// <![CDATA[

    var frmvalidator  = new Validator("contactus");
    frmvalidator.EnableOnPageErrorDisplay();
    frmvalidator.EnableMsgsTogether();
    frmvalidator.addValidation("name","req","Please provide your name");

    frmvalidator.addValidation("email","req","Please provide your email address");

    frmvalidator.addValidation("email","email","Please provide a valid email address");

    frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)");

    frmvalidator.addValidation("photo","file_extn=jpg;jpeg;gif;png;bmp","Upload images only. Supported file types are: jpg,gif,png,bmp");
// ]]>
</script>
Keeehi
Profil
A takto?
if(isset($_POST['submitted']))
{
   if($formproc->ProcessForm())
   {
        header('Location: http://www.example.com/tahnk-you.php');
   }
}
gabael
Profil
Keeehi:

Urobilo to zaujímavý úkaz! správu odošle v pohode. Ale miesto toho aby sa presmeroval na stránku "ďakujem", len refreshne kontaktný formulár.

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: