Jump to content

Search the Community

Showing results for tags 'after submitting the form it'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. hey im having this problem and not sure how to fix it, been at it for a few hours now, and still nothing, ok so when you fill out the form "this form www.divinedesigns1.com/formtodata/promo.php" and after you hit the submit button the form doesnt clear the fields this is my code <?phpinclude_once ("MyConnect.php");$errorMessage = "";$fname = "";$lname = "";$company = "";$email = "";$mobile = "";if($_POST['firstname']){// Grab variables$fname = $_POST['firstname'];$lname = $_POST['lastname'];$company = $_POST['company'];$email = $_POST['email'];$mobile = $_POST['phone'];// Making sure variables are present else stop processif(!$fname || !$lname || !$company || !$email || !$mobile){ $errorMessage = 'The Form is incomplete, or you forgot a Field. Please Fill all Fields';}else{ // Run any filtering here $fname = strip_tags($fname); $fname = stripslashes($fname); $lname = strip_tags($lname); $lname = stripslashes($lname); $company = strip_tags($company); $company = stripslashes($company); $email = strip_tags($email); $email = stripslashes($email); $mobile = strip_tags($mobile); $mobile = stripslashes($mobile); $to = 'aismith@smithai.ai'; $from = '$fname' . '$lname'; $subject = 'Fill2Win Promo'; // Email Message Bot $message = " $fname $lname $company $email $mobile "; // Configure some headers $header = 'MIME-Version:1.0' . "rn"; $header .= 'Content-type:textrn'; $header .= 'From: $fromrn'; // Inserting data $query = "INSERT INTO form (first_name, last_name, email, phone, company_name)" . "VALUE('$fname', '$lname', '$company', '$email', '$mobile')" or die('problem querying');} // lock this condition} // lock if POST a condition?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Promo</title></head><body><form id="form1" name="form1" method="post" action="promo.php"><div id="effect"><?php echo $errorMessage; ?></div><br /><br />First Name: <br /><input name="firstname" type="text" id="firstname" size="32" maxlength="28" value="<?php echo $fname; ?>" /><br />Last Name: <br /><input name="lastname" type="text" id="lastname" size="32" maxlength="28" value="<?php echo $lname; ?>" /><br />Company Name: <br /><input name="company" type="text" id="company" size="32" maxlength="28" value="<?php echo $company; ?>" /><br />Email: <br /><input name="email" type="email" id="email" size="32" maxlength="28" value="<?php echo $email; ?>" /><br />Mobile: <br /><input name="phone" type="number" id="phone" size="32" maxlength="28" value="<?php echo $mobile; ?>" /><br /><input name="submit" type="submit" id="submit" value="submit" /></form></body></html> am i making a error? or have a misspelled word?
×
×
  • Create New...