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
pogonyaev
1 year ago
8

the php function that is executed is a connection to a database cannot be made is the____ function. die | isset| end | connect.

Computers and Technology
1 answer:
Pepsi [2]1 year ago
4 0

The PHP function that is executed is a connection to a database that cannot be made is the die() function.

An error is an undesirable programming outcome. The mistake is a subset of the error. Error management is a vital component of any website or programme.

Error handling is a mechanism for identifying errors that a programme makes and taking appropriate corrective action. This can be done by utilising die() method.

When a programming problem occurs, the software will halt further code execution and display the appropriate error message to the user. The die() function displays a message and terminates the running of the programme.

The connect() function in PHP is one that is used to establish a connection to a database.

The end() method in PHP is used to locate the final element of the specified array. The end() function updates an array's internal pointer to refer to the final element and returns that element's value.

The isset() function examines whether a variable is set, which implies that it has to be declared and is not NULL. If the variable is present and not NULL, this function will return true; otherwise, it will return false.

To learn more about PHP click here:

brainly.com/question/29740624

#SPJ4

You might be interested in
Is a network traffic management device used to connect different network segments together?
son4ous [18]
No, network traffic management software is only concerned with the health of the Network.
7 0
3 years ago
What is internet?<br>what is online?​
slavikrds [6]

Answer:

internet: The Internet is a vast network that connects computers all over the world. Through the Internet, people can share information and communicate from anywhere with an Internet connection.

online: controlled by or connected to a computer., while connected to a computer or under computer control.

3 0
3 years ago
How is knowing how to use word or docs importamt?
ollegr [7]
For 90% of users, the word processing capabilities of Google Docs is more than enough. But for some, Microsoft Word's advanced features will be important. ... You also get far more powerful templates, which could speed up your work, depending on what you use Word for.
3 0
2 years ago
What is the most commonly used tab in the Filter dialog box?
aleksandrvk [35]

The answer is Messages

3 0
3 years ago
Read 2 more answers
Write a program that simulates flipping a coin repeatedly and continues until three consecutive heads. are tossed. At that point
quester [9]

Answer and Explanation:

#include <iostream>

#include <string>

#include <time.h>

#include <vector>

using namespace std;

//Takes user info

int user_info(string *name,char *gender){

   char G;

   cout<<"What is your name?: ";

   getline(cin, *name);

   cout<<"What is your gender(m/f):";

   cin>>G;

   cout<<endl;

   *gender = tolower(G);

   return 0;

}

//Toss coin(part 2)

bool coin_toss(double seed){

   double r;

   r = (double)seed/(double)RAND_MAX;

   //cout<<r;

   if (r<0.5) return true;

   return false;

}

//check results

float toss_result(vector<char> v,int *h){

   int num_heads=0;

   int num_toss = v.size();

   *h = 0;

   for(int i=0;i<num_toss;i++){

       if(v[i]=='h'){num_heads++;(*h)++;}

   }

   return (float)num_heads/(float)num_toss;

}

void show_result(int total_num,int head_num,float ratio){

   cout<<"it took you "<<total_num<<" tosses to get 3 heads in a row"<<endl;

   cout<<"on average you flipped heads "<<(ratio*100)<<"% of the time"<<endl;

}

int main()

{

   string name;

   char gender;

   string K; //Mr or Mrs

 

   cout<<"Welcome to coin toss! Get 3 heads in row to win!"<<endl;

 

   //part 1

   user_info(&name,&gender);

 

   if(gender == 'f') K = "Mrs.";

   else K = "Mr.";

 

   cout<<"Try to get 3 heads in a row. Good luck "<<K<<name<<"!"<<endl;

   char dummy = getchar();

 

   //part 2

   int num_toss;

   vector<char> toss_results;//store toss results

   bool result;//result of toss

   srand(time(0));

   while(true){

       //cout<<rand()<<endl;

       result = coin_toss(rand());

       cout<<"Press <enter> to flip"<<endl;

       while (1)

       {

           if ('\n' == getchar())

           break;

       }

     

 

     

       if(result) {toss_results.push_back('h');cout<<"HEAD"<<endl;}

       else {toss_results.push_back('t');cout<<"TAIL"<<endl;}

     

       num_toss = toss_results.size();

     

       if(num_toss>=3){

           if ((toss_results[num_toss-1] == 'h')&&(toss_results[num_toss-2] == 'h')&&(toss_results[num_toss-3] == 'h')){

               break;

           }

       }

   }

 

   //part 3

   float ratio_head;

   int num_of_heads;

   ratio_head = toss_result(toss_results,&num_of_heads);

 

   //part 4

 

   show_result(toss_results.size(),num_of_heads,ratio_head);

 

   return 0;

}

8 0
3 years ago
Other questions:
  • Approximately what percent of U.S. businesses have some form of remote work program? (from Chapter 1)
    14·1 answer
  • Safety interlock module operates by monitoring the voltage from the
    7·1 answer
  • Letm1, m2,···mnbe distinct numbers on the number line, in the increasing order. Your goalis to color all of them blue. You have
    9·1 answer
  • Write the steps for displaying multiple subtotal functions in excel.
    10·1 answer
  • Read the scenario below. Explain why this is not fair use of copyright materials. What should you do instead of using the entire
    10·1 answer
  • If there are 1 to 30 rows the program should: Calculate and display the average of all of values read into the array Calculate a
    6·1 answer
  • A system administrator is selecting an operating system for use by the company’s research and development team. The team require
    15·1 answer
  • Compiler is an example of​
    5·1 answer
  • A physical host machine has four quad-core CPUs, 16GB of RAM, 1TB of hard drive space, and two 1Gbps NICs. If we need to create
    8·1 answer
  • Bluetooth is the popular name for the 802. 15 wireless networking standard, which is useful for creating small __________.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!