PHP

120K

Solutions

33K

Contributors

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

Share tech news, updates, or what's on your mind.

Sign up to Post

<?php 
        $query6 = $conn->prepare("SELECT sup_contact, radnew FROM support WHERE sup_contact = 'Bill' AND radnew='New Ticket' ");
        $query6->execute();
        $results6 = $query6->get_result();
     $row_cnt6 = $results6->num_rows;
        ?>

Open in new window

The above code works but I need to be able to use the code to return a row count for radnew='In Progress', radnew='Closed' and radnew='No Category' as some sort of loop rather than writing it out 3 more times for the other variables


Also, is it possible to use this:
$variablename = $_GET['variable1'].$_GET['variable2'].etc
As a string
0
Build an E-Commerce Site with Angular 5
LVL 12
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

I would like to build a website that has content (videos, pictures, .zip files) and the ability to download the content for only the people who sign up and pay a monthly and or yearly cost. What skills would I need to know to achieve this? For example, when signing up to Expert-Exchange, you need to create a account, what tools are behind that? Database? I don't know the correct "tech" names.
0
hi all

I have an issue with my rewrite in a .htaccess file that I'm unsure how to fix.

I want to be able to pass parameters as a query variable when someone uses the url for example www.mysite.com/user/reset/asdfg12345 to be re-written as www.mysite.com/user/reset/?rp=asdfg12345

My code below works but only for the very last rule so in this case RewriteRule ^user/verify/([^/\.]+)/?$      user/verify/?uvc=$1 [L] , the rule or rules above it never work, If I change the order again the last one only ever works.

Sure it's a simple error but something I'm not sure about.

Thanks in advance all, Neil


RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$  

# allows reset URL like /user/reset/5d34f4e59c155566913f782a2e2557dc,234j5hj23k452hk
RewriteRule ^user/reset/([^/\.]+)/?$	user/reset/?rp=$1 [L] 

# allows verification URL like /user/verify/5d34f4e59c155566913f782a2e2557dc
RewriteRule ^user/verify/([^/\.]+)/?$	user/verify/?uvc=$1 [L]

ErrorDocument 404 404.php 

############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

## rewrite everything else to index.php
RewriteRule .* index.php [L]

Open in new window

0
I have this Javascript which is invoked when a submit button is pressed.

The form statement is <form method="post" name="st" action="save_sess_cust.php" onSubmit="return chk_vals();">

The javascript code is as follows (ac = "go");

if (ac == "go") {
			alert("go to ac = go");
			alert("group = " + group);
			if (group == "sand") {
				if (document.st.voltage.value == "") {
					alert("Voltage required.");
					return false;
				}	
				document.st.action = "opts_ref21.php?voltage=" + document.st.voltage.value;
				return true;
			}
			alert("cltype = " + cltype);	
			if (cltype == "F") {
				document.st.action = "options.php?fr=cust";
				return true;
			}
			alert("ssmed = " + ssmed);
			if (ssmed == "") {
				if (document.st.voltage.value == "") {
					alert("Voltage required.");
					return false;
				}	
			}	
			document.st.action = "options.php?fr=cust&ssmed=" + ssmed;
			return true;
		}	

Open in new window


This javascript is a part of chk_vals() function.

The last alert it displays is cltype = S. Since cltype is NOT F, how can it skip the last alert?

Furthermore, it seems to me that in exiting this Javascript, it MUST go to options.php. I put a small bit of code in options.php None of that code is executed, I cannot see how it goes to another php program.

I'm stumped. Can someone help?

Thanks
0
I have a simple web application (on a remotely hosted server) which has my pizza menu on and I can place orders, etc.

The webpage is built on php/mysql and using some javascript to provide quicker data for my customers (example further below)

Now the issue I'm faced with is I have to type phone numbers to find customers.

How can I go about getting the client side modem to detect the caller ID number and pass it to the webpage?

I appreciate that php can't help me here but I mention that to help understand the position I am in.

I have searched the internet for help to my problem but am left scratching my head, TAPI should help somewhere but as I am not familiar with C++ I'm left unsure where to start.

I've been suggested looking at nodejs but I'm finding that a lot easier said than done.

<script>
function autocomplete(inp, arr) {
  /*the autocomplete function takes two arguments,
  the text field element and an array of possible autocompleted values:*/
  var currentFocus;
      /*execute a function when someone writes in the text field:*/
  inp.addEventListener("input", function(e) {
      var a, b, i, val = this.value;
      /*close any already open lists of autocompleted values*/
      closeAllLists();
      if (!val) { return false;}
      currentFocus = -1;
      /*create a DIV element that will contain the items (values):*/
      a = document.createElement("DIV");
      a.setAttribute("id", this.id + "autocomplete-list");
      

Open in new window

0
Dear Experts,
I use PHP, I need to get a token from a link using below information.
I did that with GET method with below code but I need to do that with POST method
How can I do that? Thank you

Method : POST
Authorization  Type : oauth2
Grant Type : password
Content-Type : application/x-www-form-urlencoded
RequestUrl :xxxxxxxxxxx
URL: https://www.api-url-here.com/auth-function-here


Service Input Parameters:

username as string
password as string
client_Id as string

Service Return Parameters:

access_token as string
token_type as string
expires_in as string

thank you in advance.



//Initialize cURL.
$ch = curl_init();
 
//Set the URL that you want to GET by using the CURLOPT_URL option.
curl_setopt($ch, CURLOPT_URL, 'https://www.api-url-here.com/auth-function-here?grant_type=password&username=MickeyMouse&password=letmein&client_id=00001');

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
 
//Set CURLOPT_RETURNTRANSFER so that the content is returned as a variable.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 
//Set CURLOPT_FOLLOWLOCATION to true to follow redirects.
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
 
//Execute the request.
$return = curl_exec($ch);
 
//Close the cURL handle.
curl_close($ch);
 
//Print the data out onto the page.
$data = json_decode($return);

var_dump ($data);

Open in new window

0
I have this code in a program at the VERY top:
ini_set('session.cache_limiter','public');
	session_cache_limiter(false);
	session_start();
	echo "quick = " . $_SESSION['quick'] . "<br>";
	echo "Session[sssmed] = " . $_SESSION['sssmed'] . "<br>";
	if ($_SESSION['quick'] && $_SESSION['sssmed'] == "sep") {
		header("Location: opts_ref20.php");
	}

Open in new window


When that program runs, there is NOTHING echoed. See attached file.
no_echos.JPG
0
The following code is supposed to determine how long it has been since a password reset request was submitted. If the request has expired, disallow.

        } else if(!empty($request->get('key'))) {
          $dbAccessor = new DbAccessor();
          $new_password = $request->get('new_password');
          $rawkey = $dbAccessor->unobfuscate_id($request->get('key'));
          $keyparts = explode(":", $rawkey);
          $contact_id = $keyparts[0];
          $expiration = $keyparts[1];

          if(time() > $expiration) {
             $redirect = "/account/reset_my_password?error=key_expired";

Open in new window


I know it works, because I changed the > to a < in the if(time() > $expiration), and I could not reset my password.

I'm a complete newb at this, taking over for a staff member who moved away. He was our main back end web dev, and Im scrambling to fill his shoes as much as I can.

I was tasked with this because somebody ran across a link that was sent out to a real customer months ago to reset their password. We clicked the link, and it took us to the password reset page, as if it was perfectly fine to reset our password after all those months. The link should have expired.

BUT

This may have been designed so that the user doesn't get a message that it has expired, it just doesnt do what it says (like my test in reversing the <>). That would be perfectly acceptable... not graceful, but at least the password could not be reset via that link 3 months later.

So... obviously I need to figure out the value of this: $keyparts[1]; to see what time value is being specified (if any). How do I see that? Here is the unobfuscate_id function:


Open in new window

0
 <?php
            
            $query = $conn->prepare("SELECT sup_id, sup_ticketnumber, sup_company, sup_contact, sup_email, sup_phone, sup_rep, sup_comments, sup_addcom1, sup_addcom2, sup_addcom3, sup_editcom1, sup_editcom2, sup_editcom3, sup_todo, sup_timefrom,  sup_timeto,  sup_date,  radnew, radinprogress, radclosed, radnocategory, chkemail, chkphone, chksms, chkproject FROM support ORDER BY sup_date asc");
            
            $query->execute();
            $results = $query->get_result();
            ?>
I need to echo out the sum of the sup_id column
Help please

Open in new window

0
I'm working with a client who's experiencing a great deal of angst because of some functions on her page suddenly not working because of, what I believe to be, an update to the PHP version her sight is using.

I've already repaired a scenario where the site was using mysql as opposed to mysqli, but I'm looking at something now that I'm not familiar with and i'm hoping someone can give me some insight knowing that the server has recently been updated.

Here's the code that's throwing the error:

for ($k=1;$k<=50;$k++)
    {
      global $$SitelokCustom[$k];
      $cu[$k]=$$SitelokCustom[$k];
    }  

...and here's the error:

Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home1/nomasint/public_html/_vibralogix/vibralinklokipn/linklokipn.php on line 3318

I've never seen two $ signs before, but apparently that was working at one point. I started by eliminating that, but it didn't have any affect.

Any ideas?
0
Learn SQL Server Core 2016
LVL 12
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Dear Experts,
I use PHP, I need to get a token from a link using below information.
How can I do that? Thank you

Method : GET
Authorization  Type : oauth2
Grant Type : password
Content-Type : application/x-www-form-urlencoded
RequestUrl :xxxxxxxxxxx


Service Input Parameters:

username as string
password as string
client_Id as string

Service Return Parameters:

access_token as string
token_type as string
expires_in as string

thank you in advance.
0
Hello,  I am having problems with a WordPress plugin call WP-Job Manager, particularly trying to create a custom template for single jobs.

I have customized the default template by copying "content-job_listing.php"  from the plugin directory to  /themes/enfold/job_manager/content-job_listing.php. This works great, and is my template for all jobs. See code below.

<?php
/**
 * Single job listing.
 *
 * This template can be overridden by copying it to yourtheme/job_manager/content-single-job_listing.php.
 *
 * @see         https://wpjobmanager.com/document/template-overrides/
 * @author      Automattic
 * @package     WP Job Manager
 * @category    Template
 * @since       1.0.0
 * @version     1.28.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

?>
<div class="single_job_listing">
	
	<h2><?php the_title(); ?></h2>
		
	<div class="hide_above_mobile">
		<?php display_job_phonenumber_data(); ?>
	</div>
	
	<?php if ( $apply = get_the_job_application_method() ) :
		if ( $apply->type === 'url' ) {
	    	$application_href = $apply->url;
		} elseif ( $apply->type === 'email' ) {
	    	$application_href = sprintf( 'mailto:%1$s%2$s', $apply->email, '?subject=' . rawurlencode( $apply->subject )  );
		}
	?>
	
	<div class="application">
		<a class="application_button button" href="<?php echo $application_href; ?>" target="_blank"><?php _e( 'Apply for job', 'wp-job-manager' ); ?></a>
	</div>

	<?php endif; ?>

	<?php the_content() ?>
	<?php 

Open in new window

0
I am working with DialogFlow and attempting to set up a JSON object in PHP for use with DialogFlow fulfillment. The process is explained on this page.
https://dialogflow.com/docs/reference/api-v2/rest/Shared.Types/WebhookResponse

My php script looks like this:

$myObj->fulfillmentText = "This is my test message";
$myObj->fulfillmentMessages = json_encode(array("text" => "text response")); 
$myJSON = json_encode($myObj);
echo $myJSON;
exit;

Open in new window


If I send only the first parameter, "fulfillmentText" it works fine because that is sent as a string.
But the second parameter, "fulfillmentMessages" is supposed to be sent as an object, but I'm not doing something right.  I get back this message from DialogFlow.


Fulfillment Text
{
  "fulfillmentText": "Searchby Choice is searchby|theme :: email| :: ",
  "fulfillmentMessages": "{\"text\":\"text response\"}"
}

Fullfillment Response (the error code)
Webhook call failed. Error: Failed to parse webhook JSON response: Expect an array but found: "{\"text\":\"text response\"}".

So I am clearly not setting up the array/object correctly in my php code to be recognized as an "array" in DialogFlow.  So how do I send the parameter "text" as an object array? What do I need to change in my PHP.

This reference page shows the correct setup for this option in dialogflow.
https://dialogflow.com/docs/reference/api-v2/rest/Shared.Types/Message#Text

Thanks in advance for the assistance.
0
Hello, I have a website hosted at InMotion hosting an I'm having trouble making the .htaccess rules work properly. I need rules for:

1. Force https on every page
2. Force www. when not entered
3. Hide index.php, so a page looks like this https://www.gastronegocios.com/contacto instead of https://www.gastronegocios.com/index.php/contacto

I currently have this rules, but their not working properly:

RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$

RewriteEngine On

RewriteBase /
RewriteCond %{HTTPS} off

RewriteCond %{HTTP_HOST} ^gastronegocios.com [NC]
RewriteRule (.*) https://www.gastronegocios.com/$1 [R=301,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php?/$0 [PT,L]

Open in new window

0
I have this code

<?php
	error_reporting(E_ERROR);
	ini_set('session.cache_limiter','public');
	session_cache_limiter(false);
	session_start();
	include "db_connect_nb.php";
	$qry = "SELECT * from selections";
	$res = mysqli_query($link, $qry);
	$nr = mysqli_num_rows($res);
	echo " nr = " . $nr . "<br>";
	$nx = 0;
	for ($i = 0; $i < $nr; $i++) {
		if ($i == 0){
			echo "entered loop<br>";
		}	
		$s = mysqli_fetch_array($res,MYSQLI_ASSOC);
		$qryo = "select * from proj_opts where pid = " . $s['pid'] . " and ruid = " . $s['ruid'];
		echo "qry from opts " . $qryo . "<br>";
		$reso = mysqli_query($qryo);
		$npo = mysqli_num_rows($reso);
		echo "npo =  ". $npo . "<br>";
		if ($npo != 0) {
			$qryu = "UPDATE sel_opts set selno = " . $s['selno'] . " where pid = " . $s['pid'] . " and ruid = " . $s['ruid'];
			echo "qry for uptade sel_opts = " . $qryu;
			$resu = mysqli_query($link, $qryu);
			$nx++;
		}	
	}
	echo $nx  . " records updated.";
	exit;
		
?>	

Open in new window


Part of the output (of the echos) is in the attached file.

I cannot see why the other echos in the same loop underneath the ones that show do not show.

Any ideas?
prod_objs_update.JPG
1
I need to display and image on the single product page of Woo Commerce.  However, when I use this function nothing is displaying it seems my problem is how I am referencing the image.  The image is in the media library.

add_action ('woocommerce_after_add_to_cart_button', 'display_calif', 10);

function display_calif() {

if ( has_term( 'california', 'california_temp' ) ) {
echo '<img src="/wp-content/uploads/2019/01/california.gif" />';
        }
}

Open in new window


Please tell me how to reference this image.
0
A CSS question:

Let's take the <td> tag as an example

Is it possible to make a custom css tag and use that to dictate the styling of any <td> tags inside it
ie
css page:
customtag > td
{
some condition
}
php page:
<customtag><td> text </td></customtag>

The reason for this is that I want to add a specific condition to a set of <td> tag's which already have defined css conditions defined for that particular tag in the css page in the rest of the php page
0
Trying to call to yahoo weather api which is still using oauth 1

here is the code i have

https://trycf.com/gist/819eb1b6690c890a753d2c75e2355e2d/lucee5?theme=monokai

But i am getting unauthorized for this (401)
0
Login Page - My users are registered but I receive an error message when they try to log in.


		$q = "SELECT id, username, pass FROM users WHERE email='$e' AND active = 1 ";
		
		$r = mysqli_query($db, $q) or trigger_error("Query: $q\n<br>MySQL Error: " . mysqli_error($db));
		
if (@mysqli_num_rows($r) == 1) { // A match was made.
			
			
			// Fetch the values:
list($id, $username, $pass) = mysqli_fetch_array($r, MYSQLI_NUM);
			mysqli_free_result($r);
			
			// Check the password:
			if (password_verify($p, $pass)) {
				// Store the info in the session:
				// Store the data in a session:
	
	$_SESSION['id'] = $user_id;
	$_SESSION['username'] = $username;
				
				mysqli_close($db);
				
				// Redirect the user:
				//$url = BASE_URL . 'Login.php'; // Define the URL.
				
				//ob_end_clean(); // Delete the buffer.
				//header("Location: $url");
				
				exit(); // Quit the script.
			} else {
				echo '<p class="error">Either the email address and password entered do not match those on file.</p>';
			}
		} else { // No match was made.
			echo '<p class="error">Either the email address and password entered do not match those on file.</p>';
		}
	} else { // If everything wasn't OK.
		echo '<p class="error">Please try again.</p>';
	}
	mysqli_close($db);

} // End of SUBMIT conditional.

/* PAGE CONTENT STARTS HERE! */
?>

Open in new window

0
CompTIA Security+
LVL 12
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

In a prior program leading up to the problem I have this code.
echo "ckd_sels array = " . implode('; ', $ckd_sels) . "<br>";
	$_SESSION['ckdsels'] = $ckd_sels;

Open in new window


In a subsequent program, to confirm it was working working with $_SESSION as an array.

ckd_sels array = ck2870-867-1; ck2877-867-1; ck2879-867-1

then, later on, I have this code:

$ns = sizeof($chkd);
	//echo "ckd_sels array = " . implode('; ', $chkd) . "<br>";
	for ($i = 0; $i < $ns; $i++) {
		// old sel & pid
		$keys = explode($chkd[$i] , "-");
		$qryu = "SELECT * from selections where pid =  " . $keys[0] . "  and ruid = " . $keys[1];
		$resu = mysqli_query($link, $qryu);
		$qryp = "Update selections set pid = " . $npid . " where pid =  " . $keys[0] . "  and ruid = " . $keys[1];
		echo "keys = " . $keys[0] . ", keys1 = " . $keys[1] . "<br>";
		$resp = mysqli_query($link, $qryp);
	}

Open in new window


which produces this:


Warning: explode(): Empty delimiter in /home/lakoshva/public_html/devdev/new_proj_wsels.php on line 26
keys = , keys1 =

Warning: explode(): Empty delimiter in /home/lakoshva/public_html/devdev/new_proj_wsels.php on line 26
keys = , keys1 =

Warning: explode(): Empty delimiter in /home/lakoshva/public_html/devdev/new_proj_wsels.php on line 26
keys = , keys1 =

This tells me I cannot use a for loop as I have.

How can I extract the individual elements from the array. Should I replace the array with "," instead of ";"?

Thanks
0
I have this code:
$ckd_sels = array();
	$nc = 0;
	for ($i = 0; $i < $ns; $i++) {
		$s = mysqli_fetch_array($ress,MYSQLI_ASSOC);
		$cbnam = $s['pid'] . "-" . $s['ruid'] . "-" . $s['selno'];
		$ck = "ck" . $cbnam;
		echo "ck + cbnam = " . $ck . "<br>";
		echo  "checked = " . $_POST[$ck] . "<br>";
		if ($_POST[$ck] == "on") {
			echo "post-ck = " . $_POST[$ck] . "<br>";
			$ckd_sels[$i] = $ck;
			echo "ckdcells = " . $ckd_sels[$i] . "<br>";
			$nc++;
		}
	}
	echo "ckd_sels array = " . $ckd_sels . "<br>";
	$_SESSION['ckdsels'] = $ckd_sels;

Open in new window


The last part of the output looks like the attached. Something is wrong with my array definition (I think)

Any help?
Array.JPG
0
I have this line of php code
$qryn = "INSERT into projects (ruid, pid, project_name, date) VALUES ($_SESSION['ruid'] . ", " . $npid . ", '" . $pname . "', '" . date('Y-m-d') . ")'";

Open in new window


The attached file says there are syntax errors. From php code checker.

What is wrong?
php_checker.JPG
0
Hello,

I need help modifying my WordPress XML feed.   Currently, I am using the WP Job Manager plugin, and have a custom rss feed for a client.

For one of the fields,  they require only the city, but it outputs as city, state, country. see below.

<cityHiring>
<![CDATA[ Wheatland, WY, United States ]]>
</cityHiring>

Changed to this:
<cityHiring>
<![CDATA[ Wheatland ]]>
</cityHiring>

So basically i need everything after and including the first, to be removed.

In the theme code, the field has this PHP
echo $the_job_location;
				?>
		</city>

Open in new window

0
Hello everybody,

I have a bunch of AJAX scripts that fetch and give data from and to PHP but the one I'm trying to make, I have no idea how to do it or which is the best way to do it. Here's the scenario:

  1. User selects 1st option form combo box and second combo box gets filled (AJAX)
  2. User selects 2nd option from second combo box and a table with check boxes appears at the bottom (AJAX)
  3. User selects/un-selects options (check boxes), hit SAVE and it supposedly saves the changes into the DB using AJAX and PHP

The problem is that the table rows with its check boxes are generated dynamically. Normally I would iterate through all the check boxes creating variables which would be passed as POST to a PHP function in another page using AJAX but, since in this case the check boxes are created dynamically I can't do that as I don't know the number of variables (check boxes) I will have to deal with or their IDs.

I've made a function in jQuery to fetch all check boxes generated in PHP and sent to the page and got this:

<input type=​"checkbox" data-render=​"switchery" id=​"author-11" name=​"author-11" data-theme=​"default" checked>​
<input type=​"checkbox" data-render=​"switchery" id=​"author-12" name=​"author-12" data-theme=​"default" checked>​
<input type=​"checkbox" data-render=​"switchery" id=​"author-13" name=​"author-13" data-theme=​"default" checked>​
<input type=​"checkbox" data-render=​"switchery" 

Open in new window

0
Dear Experts,
I use below code to select the merchants to display them on the map.

If I select the 15-20 data the result shows up, but if I select more than 20 data the below xml code is not working.

I don't understand why it is not working with more than 20 data?
What do you suggest I should do?

what I need is to show it with XML.
thank you


$mysqli->query("set names utf8mb4");

$sql = "I select here the merchants";

$res = $mysqli->query($sql);

$xml = new XMLWriter();

$xml->openURI("php://output");
$xml->startDocument();
$xml->setIndent(true);

$xml->startElement('markers');

while ($row = mysqli_fetch_assoc($res)) {
  $xml->startElement("marker");

 $xml->writeAttribute('id', $row['uid']);
  $xml->writeAttribute('name', $row['isim']);
 $xml->writeAttribute('address', $row['adres']);
  $xml->writeAttribute('lat', $row['lat']);
  $xml->writeAttribute('lng', $row['longt']);
  $xml->writeAttribute('type', $row['bayituru']);
  //$xml->writeRaw($row['lng']);

  $xml->endElement();
}

$xml->endElement();

header('Content-type: text/xml');
$xml->flush();
0

PHP

120K

Solutions

33K

Contributors

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.