# RequestParameter()

Returns the value of a parameter from a form field or landing page URL parameter. This function can also retrieve parameters from an encrypted query string generated by the [CloudPagesURL()](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-cloud-pages-url.md) function.

:::note
This function behaves the same way as the [QueryParameter()](/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-sites/mc-ampscript-reference-sites-query-parameter.md) function. We retain both functions in order to preserve backward compatibility.
:::

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
RequestParameter(queryParameter)
```

The `RequestParameter()` function has one parameter:

- `queryParameter` (string): Required. The parameter to retrieve the value of.

## Usage

To use this function, pass it the name of the query parameter that contains the value you want to retrieve.

For example, an email can contain a link to a landing page that uses the `CloudPagesURL()` function to include parameters, as in this example.

```html
<a href="%%=CloudPagesURL(314, 'firstName', 'Pooja', 'itemName', 'reticulated widget')=%%">
  Purchase confirmation
</a>
```

You can use this information to personalize the landing page. This example shows how to retrieve the values of the `firstName` and `itemName` parameters and use them in a landing page.

```html
<html>
  <head />
  <body>
    <h1>Thanks for your purchase, %%=ProperCase(RequestParameter("firstName"))=%%!</h1>
    <p>Your %%=RequestParameter("itemName")=%% will ship soon. We know you're going to love it!</p>
  </body>
</html>
```

The rendered HTML contains the content of the specified query parameters.

```html
<html>
  <head />
  <body>
    <h1>Thanks for your purchase, Pooja!</h1>
    <p>Your reticulated widget will ship soon. We know you're going to love it!</p>
  </body>
</html>
```
