Jump to content

Search the Community

Showing results for tags '500 error'.



More search options

  • 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 (Dreamweaver, Zend, 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. I have been working on a custom form for our office to use, and I am rounding the final corner (checkboxes!) and am stuck. I have finally gotten the code to actually function the way I want, but am greeted with a 500 error instead of the confirmation page. Maybe I'm just tired and missing something... HTML: <form name="htmlform" method="post" action="html_form_send.php"> <p><center><font size="18">Tucker Arensberg IT Equipment Request Form</font></center></p> <center><b><font color="red">Please Fill Out Entire Form, IT Department Is Not Responsible For Incomplete Information On Requests.</font></b></center><br> <table width="450px"> </tr> <tr> <td valign="top"> <label for="first_name"><b>First Name:</b></label> </td> <td valign="top"> <input type="text" name="first_name" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top""> <label for="last_name"><b>Last Name:</b></label> </td> <td valign="top"> <input type="text" name="last_name" maxlength="50" size="30"> </td> </tr> <tr> <td valign="top"> <label for="email"><b>Email Address:</b><br> </label> </td> <td valign="top"> <input type="text" name="email" maxlength="80" size="30"> <br><b><font color="red">FULL EMAIL MUST BE ENTERED OR FORM WILL NOT BE SUBMITTED</font></b><br> </td> </tr> <tr> <td valign="top"> <label for="daterequest"><b>Pickup Date:</b><br> (mm/dd/yyyy)<br> <br> </label> </td> <td valign="top"> <input type="text" name="daterequest" maxlength="10" size="10"> </td> </tr> <tr> <td valign="top"> <label for="datereturn"><b>Estimated Return Date:</b><br> (mm/dd/yyyy)<br> <br> </label> </td> <td valign="top"> <input type="text" name="datereturn" maxlength="10" size="10"> </td> </tr> <tr> <td valign="top""> <b><label class="radio" for="usage">Usage:</label></b> </td> <td valign="top"> <input class="radio" type="radio" name="usage" value="internal" checked /> <span>Internal (On-Site)</span><br> <input class="radio" type="radio" name="usage" value="external" /> <span>External (Off-Site)</span><br><br> </td> <tr> <td valign="top"> <label for="equipment"><b>Equipment Needed:</b><br> (Any items not checked will not be included)</label> </td> <td valign="top"> <input type="checkbox" name="equipment" value="Laptop" /> Laptop<br /> <input type="checkbox" name="equipment" value="Carrying Case" /> Carrying Case<br /> <input type="checkbox" name="equipment" value="Mouse" /> Mouse<br /> <input type="checkbox" name="equipment" value="Hotspot" /> HotSpot/MiFi/Portable WiFi Device<br /> <input type="checkbox" name="equipment" value="usb" /> USB Thumb Drive<br /> <input type="checkbox" name="equipment" value="Vodka" /> Vodka<br /> <br> <br> </td> </tr> <tr> <td valign="top"> <b>Laptop Features Required:</b><br> (Any items not checked cannot be guaranteed on laptop) </td> <td valign="top"> <input type="checkbox" name="features[]" value="cd" /> CD Drive<br /> <input type="checkbox" name="features[]" value="dvd" /> DVD Drive<br /> <input type="checkbox" name="features[]" value="vpn" /> VPN Connection<br /> <input type="checkbox" name="features[]" value="netilla" /> Netilla<br /> <input type="checkbox" name="features[]" value="media" /> Media Playback (video files)<br> (Please include extension/format of video/audio files in COMMENTS section.)<br /> <input type="checkbox" name="features[]" value="vmware" /> VMWare<br /> <br> <br> </td> </tr> <tr> <td valign="top"> <label for="comments"><b>Additional Comments:</b></label> </td> <td valign="top"> <textarea name="comments" maxlength="1000" cols="25" rows="6"></textarea> </td> </tr> <br> <br> <tr> <td colspan="2" style="text-align:center"> <input type="submit" value="Submit"> </td> </tr> </table> </form> <br> <br> <center><img src='logo.jpg'> <br> Copyright 2015 Tucker Arensberg IT Department</center> PSP: <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "blank@blank.com"; $email_subject = "New Equipment Checkout Request"; $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email']; // required $daterequest = $_POST['daterequest']; // not required $datereturn = $_POST['datereturn']; $usage = $_POST['usage']; $features .= implode(', ', $_POST['features']); $comments = $_POST['comments']; // required $comments = $_POST['comments']; // required $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$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 .= "Date Requested: ".clean_string($daterequest)."\n"; $email_message .= "Estimated Return Date: ".clean_string($datereturn)."\n"; $email_message .= "Usage: ".clean_string($usage)."\n"; $email_message .= "Features Requested: ".clean_string($features)."\n"; // $email_message .= "Estimated Return Date: ".clean_string($datereturn)."\n"; // $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = 'From: '."requests@tuckerlaw.com"."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacting us. We will be in touch with you very soon. <?php } ?> Of note, when I comment out the assignment and email-print for the "$features" variable, it runs without emailing the checkboxes, and gives the proper "confirmation" page. Thanks!
×
×
  • 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.