Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please help me write a PHP code that does the following Provide three widgets on

ID: 3913750 • Letter: P

Question

Please help me write a PHP code that does the following

Provide three widgets on this "Sifter.php" as follows

[1] First Text Area is the input text where users will copy and paste the text. Make text Area big.

[2] Below the "input" text area, add a button called "Sift".

[4] Hitting the "Sift" button will drop all vowels in the input and shows only the base consonants in the output box.

If the input contains one line, then the output contains one line.
if the input contains multiple lines, then the output contains multiple lines.

Show me screenshots with it working please.

Explanation / Answer

If you have any doubts, please give me comment...

<?php

$output = "";

if(isset($_POST['input']) && isset($_POST['sift_btn'])){

$input = $_POST['input'];

for($i=0; i<strlen($input); $i++){

if(strtolower($input[$i])!='a' && strtolower($input[$i])!='e' && strtolower($input[$i])!='i' && strtolower($input[$i])!='o' && strtolower($input[$i])!='u')

$output .= $input[$i];

}

}

?>

<form action="" method="POST">

<div>

<b>Input</b>

<textarea name="input" rows=3 cols=100></textarea>

</div>

<div>

<input type="submit" name="sift_btn" value="Sift"/>

</div>

</form>

<div>

<h3>Output:</h3>

<div><?=nl2br($output);?></div>

</div>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote