Jump to content

Search the Community

Showing results for tags 'indent notepad++ display get'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

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


Age


Donation Link

Found 1 result

  1. My code isn't working and I have put it into notepad++ and using a php error checker. I want to put the code on here for help but know that you like it presented in a certain way to make life easier for all concerend. How do I indent the code properly on here? Ideally I don't want the form submitted unless certain fields are filled in. A pop up box which says please fill in your ...... . <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "xxxxx@xxxxxxx"; $email_subject = "Your email subject line"; function died($error) { { // Does this field have a value? if (empty($_REQUEST[$fieldName])) { echo 'Please go back and fill out ' . $fieldName . "<br>\n"; // validation expected data exists if(empty($_POST['first_name']) || empty($_POST['last_name']) || empty($_POST['email']) || empty($_POST['telephone']) || !isset($_POST['comments'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } if ((!first_name) || (!second_name)) { $errorMsg = 'Please make sure you have filled in the required fields:<br /><br />'; if (!$first_name) { $errorMsg = 'Please fill in your First Name<br />'; } if (!$seond_name) { $errorMsg = 'Please fill in your Second Name<br />'; } if (!$mobile_number) { $errorMsg = 'Please fill in your contact number<br />'; } if (!$email) { $errorMsg = 'Please fill in your email address<br />'; } } //strip lashes $first_name = stripslashes($name); $second_name = stripslashes($second_name); $phone = stripslashes($phone); $email = stripslashes($email); //clean string $email_message .= "First Name: ".clean_string($first_name)."\n"; $email_message .= "Last Name: ".clean_string($last_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Telephone: ".clean_string($telephone)."\n"; $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.