Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 11
  1. #1

    Problemi con Form Contatti

    Salve a tutti ragazzi. Non so se è il posto giusto cmq posto qui il mio problema.
    Praticamente ho comprato un form contatti su un importante sito di plugins e l'ho tranquillamente installato settando i parametri della documentazione in allegato (fatta benissimo e chiarissima). Il problema sorge quando cerco di utilizzare il form appena inserito e clicco su "send"......mi esce questo messaggio e non so proprio come venirne fuori:

    "The page cannot be displayed The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access.
    Please try the following:
    Contact the Web site administrator if you believe that this request should be allowed. Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.
    HTTP Error 405 - The HTTP verb used to access this page is not allowed.Internet Information Services (IIS)
    Technical Information (for support personnel)
    Go to Microsoft Product Support Services and perform a title search for the words HTTP and 405. Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Setting Application Mappings, Securing Your Site with Web Site Permissions, and About Custom Error Messages."

    Ho bisogno di una grossa mano...il sito è praticamente pronto e solamente il form contatti non funziona! grazie anticipatamente!
    Immagini allegate Immagini allegate

  2. #2
    Amministratore L'avatar di Vincent.Zeno
    Registrato dal
    May 2003
    residenza
    Emilia-Romagna (tortellini und cappelletti land!)
    Messaggi
    20,783
    facci vedere il form contatti (il codice)

  3. #3
    Questo è il file process.php

    Codice PHP:
    <?php 
    define
    ('QUFORM_DEBUG'true); 
    /** DO NOT CHANGE THESE 2 LINES **/
     
    define('QUFORM_ROOT'realpath(dirname(__FILE__))); require_once QUFORM_ROOT '/common.php';
     
    /** DO NOT CHANGE THESE 2 LINES **/ 

    /** FORM SETTINGS **/ /** 
    * Success message, displayed when the form is successfully submitted */ 
    $config['successMessage'] = 'Your message has been sent, thank you.'
    /** * Whether or not to send the notification email. You may wish to disable this if you are * saving the form data to the database for example. true or false */ 
    $config['email'] = true/** * Configure the recipients of the notification email message. For a single * recipient use the following format: * *
     $config['recipients'] = 'me@example.com'; * * You can add multiple email addresses by adding one on each line inside the * array, enclosed in quotes, separated by commas. E.g. * * $config['recipients'] = array( * 'recipient1@example.com', * 'recipient2@example.com' * ); */ 
    $config['recipients'] = 'puglia@protossoa.it'/** * Set the "From" address of the emails. You should set this to the contact * email address of your website. Some hosts require that the email * address is one that is associated with your hosting account. * * You can set this to be an email address string e.g. * * $config['from'] = 'company@example.com'; * * Or you can also include a name with your email address using an array e.g. * * $config['from'] = array('company@example.com' => 'Company'); * * Or you can set it to use a submitted email address. This example will get the * submitted address in the 'email' field. E.g. * * $config['from'] = '%email%'; */ $config['from'] = 'puglia@protossoa.it'/** * The subject of the notification email message. %name% will be replaced * with the form submitted value in the name field. */ $config['subject'] = 'Message from %name%'/** * Set the "Reply-To" email address of the notification email to * the email address submitted in the email field. */ $config['replyTo'] = '%email%'/** * The file containing the HTML body of the notification email. */ $config['emailHtml'] = '/emails/email-html.php'/** * The file containing the plain text body of the notification email */ $config['emailPlain'] = '/emails/email-plain.php'/** * Whether or not to show empty fields from the notification email. true or false */ $config['showEmptyFields'] = false/** * Whether or not to send an autoreply email. true or false */ $config['autoreply'] = false/** * Sets the autoreply recipient to the email address submitted to the email field * * If you want the email to show from their name submitted from the name field as well, you * can use the code: * * $config['autoreplyRecipient'] = array('%email%' => '%name%'); */ $config['autoreplyRecipient'] = '%email%'/** * The subject of the autoreply email */ $config['autoreplySubject'] = 'Thanks for your message, %name%'/** * Set the "From" address of the autoreply email. * See the comment at the $config['from'] setting for options. */ $config['autoreplyFrom'] = ''/** * The file containing the HTML body of the autoreply email */ $config['autoreplyHtml'] = '/emails/autoreply-html.php'/** * The file containing the plain text body of the autoreply email */ $config['autoreplyPlain'] = '/emails/autoreply-plain.php'/** * Redirect the user when the form is successfully submitted by entering a URL here. * By default, users are not redirected. * * $config['redirect'] = 'http://www.example.com/thanks.html'; */ $config['redirect'] = ''/** * Whether or not to save the form data to a database. true or false * * You can configure the database settings further down in this file. See the documentation * for help. */ $config['database'] = false/** * Whether or not to save uploaded files to the server. true or false */ $config['saveUploads'] = false/** * The path to save any uploaded files. This folder must be writeable by the * web server, you may need to set the folder permissions to 777 on Linux servers. */ $config['uploadPath'] = QUFORM_ROOT '/uploads'/** * Set this to the URL of the above folder to be sent links to uploaded * files in the notification email. E.g. * * $config['uploadUrl'] = 'http://www.example.com/quform/uploads'; */ $config['uploadUrl'] = ''/** * (Optional) Configure your SMTP settings, only 'host' is required. If your server * needs authentication, set your username and password. If these settings are left * blank the emails will be sent using the PHP mail() function. * * host - SMTP server (e.g. smtp.example.com) * port - SMTP port (e.g. 25) * username - SMTP username * password - SMTP password * encryption - SMTP encryption (e.g. ssl or tls) */ $config['smtp'] = array( 'host' => '''port' => '''username' => '''password' => '''encryption' => '' ); // Add the visitor IP to the email $config['extra']['IP address'] = Quform::getIPAddress(); /** END FORM SETTINGS **/ /** FORM ELEMENT CONFIGURATION **/ /** * Configure the name element * Filters: Trim * Validators: Required */ $name = new Quform_Element('name', 'Name'); $name->addFilter('trim'); $name->addValidator('required'); $form->addElement($name); /** * Configure the email element * Filters: Trim * Validators: Required, Email */ $email = new Quform_Element('email', 'Email address'); $email->addFilter('trim'); $email->addValidators(array('required', 'email')); $form->addElement($email); /** * Configure the phone element * Filters: Trim * Validators: (None) */ $phone = new Quform_Element('phone', 'Phone number'); $phone->addFilter('trim'); $form->addElement($phone); /** * Configure the subject element * Filters: Trim * Validators: (None) */ $subject = new Quform_Element('subject', 'Subject'); $subject->addFilter('trim'); $form->addElement($subject); /** * Configure the message element * Filters: Trim * Validators: Required */ $message = new Quform_Element('message', 'Message'); $message->addFilter('trim'); $message->addValidator('required'); $form->addElement($message); /** * Configure the CAPTCHA element * Filters: Trim * Validators: Required, Identical */ $captcha = new Quform_Element('type_the_word', 'Type the word'); $captcha->addFilter('trim'); $captcha->addValidator('required'); $captcha->addValidator('identical', array('token' => 'light')); $captcha->setIsHidden(true); $form->addElement($captcha); /** END FORM ELEMENT CONFIGURATION **/ function process() { global $form, $config; // Process the form if ($form->isValid($_POST)) { // Custom code section #1 - see documentation for examples // End custom code section #1 try { $attachments = array(); $elements = $form->getElements(); // Process uploaded files foreach ($elements as $element) { if ($element instanceof Quform_Element_File && array_key_exists($element->getName(), $_FILES) && is_array($_FILES[$element->getName()])) { $file = $_FILES[$element->getName()]; if (is_array($file['error'])) { // Process multiple upload field foreach ($file['error'] as $key => $error) { if ($error === UPLOAD_ERR_OK) { $fileData = array( 'path' => $file['tmp_name'][$key], 'filename' => Quform_Element_File::filterFilename($file['name'][$key]), 'type' => $file['type'][$key], 'size' => $file['size'][$key] ); if ($config['saveUploads'] && $element->getSave()) { $result = Quform_Element_File::saveUpload($config['uploadPath'], $config['uploadUrl'], $fileData, $element); if (is_array($result)) { $fileData = $result; } } if ($element->getAttach()) { $attachments[] = $fileData; } $element->addFile($fileData); } } } else { // Process single upload field if ($file['error'] === UPLOAD_ERR_OK) { $fileData = array( 'path' => $file['tmp_name'], 'filename' => Quform_Element_File::filterFilename($file['name']), 'type' => $file['type'], 'size' => $file['size'] ); if ($config['saveUploads'] && $element->getSave()) { $result = Quform_Element_File::saveUpload($config['uploadPath'], $config['uploadUrl'], $fileData, $element); if (is_array($result)) { $fileData = $result; } } if ($element->getAttach()) { $attachments[] = $fileData; } $element->addFile($fileData); } } } // element exists in $_FILES } // foreach element // Save to a MySQL database if ($config['database']) { // Connect to MySQL mysql_connect('localhost', 'username', 'password'); // Select the database mysql_select_db('database'); // Set the connection encoding if (strtolower(QUFORM_CHARSET) == 'utf-8') { mysql_query("SET NAMES utf8"); } // Build the query $query = "INSERT INTO table SET "; $query .= "`name` = '" . mysql_real_escape_string($form->getValue('name')) . "',"; $query .= "`email` = '" . mysql_real_escape_string($form->getValue('email')) . "',"; $query .= "`phone` = '" . mysql_real_escape_string($form->getValue('phone')) . "',"; $query .= "`subject` = '" . mysql_real_escape_string($form->getValue('subject')) . "',"; $query .= "`message` = '" . mysql_real_escape_string($form->getValue('message')) . "';"; // Careful! The last line ends in a semi-colon // Execute the query mysql_query($query); // Close the connection mysql_close(); } if ($config['email']) { // Get a new PHPMailer instance $mailer = Quform::newPHPMailer($config['smtp']); // Set the from information $from = $form->parseEmailRecipient($config['from']); if ($from['email']) { $mailer->From = $from['email']; $mailer->FromName = $from['name']; } // Set the Reply-To header of the email as the submitted email address from the form if (!empty($config['replyTo'])) { $replyTo = $form->parseEmailRecipient($config['replyTo']); if ($replyTo['email']) { $mailer->AddReplyTo($replyTo['email'], $replyTo['name']); } } // Set the subject $mailer->Subject = $form->replacePlaceholderValues($config['subject']); // Set the recipients foreach ((array) $config['recipients'] as $recipient) { $mailer->AddAddress($recipient); } // Set the message body HTML ob_start(); include QUFORM_ROOT . $config['emailHtml']; $mailer->MsgHTML(ob_get_clean()); // Add a plain text part for non-HTML email readers ob_start(); include QUFORM_ROOT . $config['emailPlain']; $mailer->AltBody = ob_get_clean(); // Add any attachments foreach ($attachments as $attachment) { $mailer->AddAttachment($attachment['path'], $attachment['filename'], 'base64', $attachment['type']); } // Send the notification message $mailer->Send(); } // Autoreply email if ($config['autoreply']) { $autoreplyRecipient = $form->parseEmailRecipient($config['autoreplyRecipient']); if ($autoreplyRecipient['email']) { // Create the autoreply message $mailer = Quform::newPHPMailer($config['smtp']); // Set the from address $autoreplyFrom = $form->parseEmailRecipient($config['autoreplyFrom']); if ($autoreplyFrom['email']) { $mailer->From = $autoreplyFrom['email']; $mailer->FromName = $autoreplyFrom['name']; } // Set the recipient $mailer->AddAddress($autoreplyRecipient['email'], $autoreplyRecipient['name']); // Set the subject $mailer->Subject = $form->replacePlaceholderValues($config['autoreplySubject']); // Set the message body HTML ob_start(); include QUFORM_ROOT . $config['autoreplyHtml']; $mailer->MsgHTML(ob_get_clean()); // Add a plain text part for non-HTML email readers ob_start(); include QUFORM_ROOT . $config['autoreplyPlain']; $mailer->AltBody = ob_get_clean(); // Send the autoreply $mailer->Send(); } } // Custom code section #2 - see documentation for examples // End custom code section #2 } catch (Exception $e) { if (QUFORM_DEBUG) { throw $e; } } } else { // Form data failed validation return false; } // Form processed successfully return true; } if (process()) { $result = array('type' => 'success'); if (strlen($config['redirect'])) { $result['redirect'] = $config['redirect']; } else { $result['message'] = $form->replacePlaceholderValues($config['successMessage']); } } else { $result = array('type' => 'error', 'error' => $form->getError(), 'elementErrors' => $form->getElementErrors()); } if (isset($_POST['quform_ajax']) && $_POST['quform_ajax'] == 1) { $response = '<textarea>' . Quform::jsonEncode($result) . '</textarea>'; } else { if (isset($result['type'], $result['redirect']) && $result['type'] == 'success' && strlen($result['redirect']) && !headers_sent()) { header('Location: ' . $result['redirect']); exit; } ob_start(); require_once 'nojs.php'; $response = ob_get_clean(); } echo $response;

  4. #4
    questo è l'html


    <div class="quform-outer">
    <form class="quform" action="quform/process.php" method="post" enctype="multipart/form-data">
    <div class="quform-wrapper">
    <!-- <h1>Quform - Ajax Contact Form</h1>
    <h2>Easy to install into any PHP / HTML web page</h2> -->
    <div class="quform-inner">
    <div class="quform-title">Richiesta Preventivo</div>
    <div class="quform-elements quform-cf">

    <div class="element-wrapper name-element-wrapper quform-cf">
    <label for="name">IMPRESA <span class="red">*</span></label>
    <div class="input-wrapper name-input-wrapper">
    <input class="name-element" id="name" type="text" name="name" />
    </div>
    </div>


    <div class="element-wrapper email-element-wrapper quform-cf">
    <label for="email">E-MAIL <span class="red">*</span></label>
    <div class="input-wrapper email-input-wrapper">
    <input class="email-element quform-tooltip" id="email" type="text" name="email" title="We will never send you spam" />
    </div>
    </div>


    <div class="element-wrapper phone-element-wrapper quform-cf">
    <label for="phone">TELEFONO</label>
    <div class="input-wrapper phone-input-wrapper">
    <input class="phone-element quform-tooltip" id="phone" type="text" name="phone" title="We will only use your phone number to contact you regarding your enquiry" />
    </div>
    </div>


    <div class="element-wrapper subject-element-wrapper quform-cf">
    <label for="subject">OGGETTO</label>
    <div class="input-wrapper subject-input-wrapper quform-cf">
    <select id="subject" name="subject">
    <option value="General enquiry">RICHIESTA PREVENTIVO</option>
    <option value="Sales enquiry">RICHIESTA INFORMAZIONI</option>
    <option value="Support enquiry">RICHIESTA CONSULENZA</option>
    <option value="Other">ALTRO</option>
    </select>
    </div>
    </div>


    <div class="element-wrapper message-element-wrapper quform-cf">
    <label for="message">MESSAGGIO<span class="red">*</span></label>
    <div class="input-wrapper message-input-wrapper quform-cf">
    <textarea class="message-element" id="message" name="message" rows="7" cols="45"></textarea>
    </div>
    </div>


    <div class="element-wrapper captcha-element-wrapper quform-cf">
    <label for="type_the_word">Copia la parola<span class="red">*</span></label>
    <div class="input-wrapper captcha-input-wrapper quform-cf">
    <div class="quform-captcha-img">[img]quform/images/captcha.png[/img]</div>
    <input id="type_the_word" class="captcha-element" type="text" name="type_the_word" />
    </div>
    </div>


    <div class="button-wrapper submit-button-wrapper quform-cf">
    <div class="quform-loading-wrap"><span class="loading">Prego attendere...</span></div>
    <div class="button-input-wrapper submit-button-input-wrapper">
    <input type="submit" class="quform-submit-button" value="Send" name="boom" />
    </div>
    </div>

    </div>
    </div>
    </div>
    </form>
    </div>

  5. #5
    Amministratore L'avatar di Vincent.Zeno
    Registrato dal
    May 2003
    residenza
    Emilia-Romagna (tortellini und cappelletti land!)
    Messaggi
    20,783
    ricorda di intentare sempre per bene il codice e di utilizzare il tag CODE per il codice che non sia php


    1) il tuo server supporta php?
    2) il file del form si trova allo stesso livello della cartella quform?

  6. #6
    Allora, il file process.php (che ti ho postato sopra) è all'interno della cartella quform, la quale a sua volta si trova nella directory principale. Mentre il codice html del form l'ho inserito in una normalissima pagina html creata apposta e che è anch'essa nella directory principale (come le varie pagine index.html, contatti.html, dove-siamo.html..ecc...)

    Per quanto riguarda il supporto del php non ti so dire.....dovrei telefonare al provider ISS e chiedere perchè non ho modo di entrare nel cpanel ma solo in ftp....

  7. #7
    Amministratore L'avatar di Vincent.Zeno
    Registrato dal
    May 2003
    residenza
    Emilia-Romagna (tortellini und cappelletti land!)
    Messaggi
    20,783
    Originariamente inviato da fradammacco
    Per quanto riguarda il supporto del php non ti so dire.....dovrei telefonare al provider ISS e chiedere perchè non ho modo di entrare nel cpanel ma solo in ftp....
    la caratteristica del servizio è la prima cosa che devi conoscere.
    basta che guardi l'offerta commerciale, di solito c'è scritto

  8. #8
    Purtroppo è un sito che ho rinnovato e ho solo gli accessi ftp....non ho potuto cambiare provider perchè praticamente è un vecchio pacchetto con il quale davano email, adsl e "anche" uno spazio web gratuito....so per certo che non hanno alcun database, questo è sicuro...perchè volevo installare joomla ma non ho potuto....

  9. #9
    Amministratore L'avatar di Vincent.Zeno
    Registrato dal
    May 2003
    residenza
    Emilia-Romagna (tortellini und cappelletti land!)
    Messaggi
    20,783
    Originariamente inviato da fradammacco
    volevo installare joomla ma non ho potuto....
    almeno una buona tra le tante.
    quindi che si fa?

  10. #10
    e quindi non so che fare....può essere dovuto al fatto che il provider non supporta il php o non abbia un database associato? o secondo te è un fatto di codice?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.