1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kotykmax [81]
3 years ago
6

create 2 text field web form where 1 field allows the user to specify the text spring to search for and the other field allows t

he user to specify the replacement string. the page should also show a sentence of your choosing that the search and replace will be performed on.
Computers and Technology
1 answer:
mixas84 [53]3 years ago
6 0

Answer:

<?php

$error = '';

$string = "This is a sample string. Hello World";

if(isset($_POST["modify_str"])){

$show_form = false;

extract($_POST);

// check that user entered some value

if(empty($string_search)){

$error += 'Please fill out the string to be searched for <br>';

$show_form = true;

}

// check that user entered some value

if(empty($string_replace)){

$error += "Please fill out the string/word to be replaced for <br>";

$show_form = true;

}

// if user has entered some value, then replace it in the string using the str_replace function and print the string after modification

if (!$show_form){

$string = str_replace($string_search, $string_replace, $string);

echo "String after modification: <br>";

echo $string;

}

}

else

{

$show_form = true;

}

if($show_form)

{

?>

Please select any word to search for and replace for in the following string <br>

<?php echo $string; ?>

<br> <br>

<form action="" method="post">

<label for="string_search"> String to search for: </label>

<input type="text" name="string_search" id="string_search" required="required" /> <br> <br>

<label for="string_replace"> Replace with: </label>

<input type="text" name="string_replace" id="string_replace" required="required" /> <br> <br>

<input type="submit" id="modify_str" name="modify_str" value="Modify String"/>

</form>

<?php

}

?>

Explanation:

The program was written with php.

It is designed such that it can create 2 text field web form where 1 field allows the user to specify the text spring to search for and the other field allows the user to specify the replacement string.

See answer for the program code.

You might be interested in
Finish the program by choosing the correct terms.
juin [17]
What are the exact numbers
6 0
3 years ago
Read 2 more answers
What is the critical path?
Natali [406]

Answer:

Option C. The path from start to finish that passes through all the tasks that are critical to completing the project in the shortest amount of time

is the correct answer.

Explanation:

  • Critical path is the term used in Project management.
  • It can be known by determining the longest stretch for dependent activities and the time required for them to complete.
  • A method known as "critical path method" is used for Project modelling.
  • All types of projects including aerospace, software projects, engineering or plant maintenance need Critical method analysis for the modeling of project and estimation.

I hope it will help you!

3 0
3 years ago
In large organizations, there is a formal business function that includes developing an information policy, planning for data, o
Shkiper50 [21]

Answer:

Data administration.

Explanation:

Data management is a type of infrastructure service that avails businesses (companies) the ability to store and manage corporate data while providing capabilities for analyzing these data.

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Hence, a database management system (DBMS) is a system that enables an organization or business firm to centralize data, manage the data efficiently while providing authorized users a significant level of access to the stored data.

Data administration is a strategic process that is typically responsible for establishing information policy, data planning, data dictionary development, and monitoring data usage in the firm.

5 0
3 years ago
Hannah weighs 210 pounds using the English System of measurement. If we convert her weight to the Metric System, she would weigh
tatyana61 [14]

Answer:

Check the explanation

Explanation:

C++ PROGRAM

#include <iostream>

using namespace std;

int main()

{

float pounds;

float kilograms;

cout<<"Please enter the weight in pounds :";

cin>>pounds;

kilograms=pounds*0.454;

cout<<"The weight in Kilogram is:"<<kilograms<<"kilograms";

return 0;

}

Kindly check the attached image below for the code output.

3 0
3 years ago
How many slides are present in a blank presentation
Kobotan [32]
One, right? Because there's just the blank title slide that automatically pops up. 
8 0
3 years ago
Read 2 more answers
Other questions:
  • Marie can now edit her photos, send them in emails, print them on a printer, and use them as wallpaper on her computer. This is
    9·2 answers
  • You're trying to decide which disk technology to use on your new server. the server will be in heavy use around the clock every
    10·1 answer
  • Briefly describe the significance of the shannon limit for information capacity.
    5·1 answer
  • Why is it important to save a print copy of electronic sources?
    6·1 answer
  • When a formula contains the address of a cell, it is called a(n)
    9·1 answer
  • What exactly is 'epsilon' in Python?
    10·1 answer
  • What are the first two models, e.g. diagrams that affect the entire system, that are built during the CoreProcess to discover an
    5·1 answer
  • Even though the Certified Information Systems Security Professional (CISSP) certification is not geared toward the technical IT
    6·1 answer
  • # q7 - create function readFileFirstLast() to meet the conditions below
    10·1 answer
  • an early type of GUI is created, which includes windows, pop-ups, icons, and menus. What year did this happen? Please help!!! qu
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!