# Php problem with undefined variables?

**URL:** <https://forum.kirupa.com/t/php-problem-with-undefined-variables/54814>\
**Category:** Uncategorized\
**Created:** [June 17, 2004, 7:37pm UTC](https://forum.kirupa.com/t/php-problem-with-undefined-variables/54814 "2004-06-17T19:37:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flashmatazz](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/flashmatazz/32/140_2.png) [@Flashmatazz](https://forum.kirupa.com/u/Flashmatazz)\
**Post date:** [June 17, 2004, 7:37pm UTC](https://forum.kirupa.com/t/php-problem-with-undefined-variables/54814/1 "2004-06-17T19:37:39Z")

</div>

I’m playing around with a PHP script and am running into an odd problem.

I’m trying to adapt the RSSViewer wrtiiten by [Erational](http://www.erational.org/software/rssViewer/info.html)

Flash calls the PHP script with an url query

In the PHP script there’s the following:

```php

$category = $_GET['category'];
$id = $_GET['id'];
$action = $_GET['action'];

```

However, when the PHP script is called like this

```php

rssView.php?action=viewCat

```

then I get errors saying that there’s an  
_undefined index: category_ and  
_undefined index: id_

As I understand it the script tries to assign values to these variables that simply are not there 'cause they haven’t been sent to the script.  
How can I prevent this from happening?

Thanks
