3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php require_once('config.php'); //Page Title $pagetitle='Forms - '.$sitename; //active menu item $active="forms"; if($_GET['form']){ $subactive="assessment-form"; } /* $description=' Whatever you want'; $metakeywords'keyword1,2,2 etc'; */ $styles='.fms { width:600px !important;opacity:1 !important; border:2px solid #ccc;}'; $form=$_GET['form']; if($form=='1'){ $pagetitle='Assessment Form - '.$sitename; $styles .='.h2 {margin-left: 10px;} select { width:100px; float:right;} .btn-submit {background:#ccc;} .sfield { margin-bottom:10px; border-bottom:1px solid #ddd;overflow: hidden;padding: 10px;}'; require_once('header.php'); ?> <h1>Assessment for Admission</h1> <?php if($_POST){ //send email $email = $_REQUEST['email'] ; $subject = 'Noble Care Assessment Entry' ; foreach($_POST as $name => $value) { $message1 .= $name; $message1 .=': '.$value.' | '; if(!$message1n){ $message1n = $value; } else { $message1n = $message1n+$value; } } $message = 'Patient Name: '.$_POST['pt-name'].' Email: '.$email.' Name: '.$_POST['sender-fullname'].' Score: '.$message1n; $message .='Score - alternative calculation: '.$message1n-68; $message .='Raw Values: '.$message1; mail("osamaejaz1@gmail.com,info@mynoblecare.com", $subject, $message, "From:" . $email); echo '<h2 class="h2">Thank You!</h2><p style="margin-left:20px;">Your Assessment form is sent. You will be replied soon.</p>'; } else { ?> <h2 class="h2">Please fill out the following form.</h2> <br/> <form style="overflow: hidden;padding: 50px;background: rgba(255,255,255,.4);border-radius: 20px;-moz-border-radius: 20px;-webkit-border-radius: 20px;border: 1px solid #ccc;" method="POST" action=""> <div style="text-align: center;margin-left: -145px;">Patient Name: <br/><input name="pt-name" style="position: relative;left: 80px;" type="text" class="input" placeholder="Patient's name" /><br/><br/></div> <div style="padding:20px;border-bottom:2px solid #ddd;overflow: hidden;padding-bottom: 0;padding-top: 0;"> <div style="float:left;">Fullname: <br/><input name="sender-fullname" style="position: relative;" type="text" class="input" placeholder="Your Fullname" /><br/><br/></div> <div style="float:right;">Your Email: <br/><input name="email" style="position: relative;" type="text" class="input" placeholder="Your Email" /><br/><br/></div> </div> <div class="sfield"> General Health Status: <select name="general-health-status"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Fair</option> <option value="3">Weak</option> <option value="4">Very Weak</option> </select> </div> <div class="sfield"> Physical Fitness: <select name="physical-fitness"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Good</option> <option value="3">Weak</option> <option value="4">Very Weak</option> </select> </div> <div class="sfield">Social behavior: <select name="social-behavior"> <option>Select:</option> <option value="1">Friendly</option> <option value="2">Indifferent</option> <option value="3">Agitated</option> <option value="4">Aggressive</option> </select> </div> <div class="sfield">Mobility &amp; Body Movements: <select name="movement"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Restricted</option> <option value="3">Move with Support</option> <option value="4">Total Bed Ridden</option> </select> </div> <div class="sfield"> Speech & Communication: <select name="speech-and-communication"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Poor</option> <option value="3">Least Understand</option> <option value="4">Cannot Speak</option> </select> </div> <div class="sfield"> Interpersonal Relations: <select name="interpersonal-relations"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Good</option> <option value="3">Poor</option> <option value="4">Very Poor</option> </select> </div> <div class="sfield"> Level of Understanding: <select name="understanding"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Fair</option> <option value="3">Poor</option> <option value="4">Weak</option> </select> </div> <div class="sfield"> Learning Ability and Memory: <select name="learning-and-memory"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Fair</option> <option value="3">Weak</option> <option value="4">Very Weak</option> </select> </div> <div class="sfield"> Vision (Eye Sight): <select name="vision-status"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Fair</option> <option value="3">Weak</option> <option value="4">Very Weak</option> </select> </div> <div class="sfield"> Hearing Level: <select name="hearing-status"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Fair</option> <option value="3">Weak</option> <option value="4">Very Weak</option> </select> </div> <div class="sfield"> Health Condition: <select name="health-condition"> <option>Select:</option> <option value="1">Good</option> <option value="2">Minor ill</option> <option value="3">Major illness</option> <option value="4">Terminal</option> </select> </div> <div class="sfield"> Wounds, Bed Sores etc: <select name="wounds-status"> <option>Select:</option> <option value="1">Nil</option> <option value="2">Small</option> <option value="3">Large</option> <option value="4">Many</option> </select> </div> <div class="sfield"> Feeding and Drinking: <select name="feeding-drinking-status"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Assisted</option> <option value="3">No Self-Feed</option> <option value="4">N G TUBE</option> </select> </div> <div class="sfield"> Urine: <select name="urine-status"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Frequent</option> <option value="3">Uncontrolled</option> <option value="4">Catheter</option> </select> </div> <div class="sfield"> Motion/Stool/Bowel: <select name="motion-status"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Frequent</option> <option value="3">Uncontrolled</option> <option value="4">Pampered</option> </select> </div> <div class="sfield"> Previous Admissions: <select name="previous-admission-status"> <option>Select:</option> <option value="1">Nil</option> <option value="2">Old Folks Home</option> <option value="3">Nursing Home</option> <option value="4">Hospital</option> </select> </div> <div class="sfield" style="margin-bottom:0;"> General Self Care: <select name="general-self-care"> <option>Select:</option> <option value="1">Normal</option> <option value="2">Fair</option> <option value="3">Weak</option> <option value="4">Nil</option> </select> </div> <div class="sfield" style="padding-top:0;"> <h2 style="margin-left:0;" class="h2">Any optional message:</h2> <textarea style="height:100px;width:550px;display:block;" type="text" name="optional-msg" placeholder="Optional message..." class="textarea"></textarea> </div> <input type="submit" value="Submit" style="margin-left: 200px;width:200px;" class="btn-submit" /> </form> <?php } } elseif(!$_GET['form']) { $pagetitle="Forms - ".$sitename; require_once('header.php'); echo '<h1>Forms</h1><p style="margin-left:20px;"><a href="/forms/assessment-form" title="Assessment Form"><img class="fms left" src="http://www.mynoblecare.com/thumber.php?img=images/stethoscope_assessment-form.png&h=200&w=300" alt="assessment form" /></a></p>'; } else { header("Location: /not-found"); } ?> <?php require_once('sidebar.php'); require_once('footer.php'); ?>
Output for 5.1.0 - 7.1.0
Warning: require_once(config.php): failed to open stream: No such file or directory in /in/SmXf6 on line 2 Fatal error: require_once(): Failed opening required 'config.php' (include_path='.:') in /in/SmXf6 on line 2
Process exited with code 255.
Output for 4.3.2 - 5.0.5
Warning: main(config.php): failed to open stream: No such file or directory in /in/SmXf6 on line 2 Fatal error: main(): Failed opening required 'config.php' (include_path='.:') in /in/SmXf6 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: main(config.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/SmXf6 on line 2 Fatal error: main() [http://www.php.net/function.main]: Failed opening required 'config.php' (include_path='.:') in /in/SmXf6 on line 2