Variable in URL.. help

Can someone tell me how to write this correctly?

[code]

$department = $_GET[‘dep’];
$category = $_GET[‘cat’];

echo “<a href=“createticket.php?dep=” . $department .”?cat=" . $row[‘category’] . “”>" . $row[‘subcategory’] . “”;[/code]

Right now, I get
Technology Services?cat=Blackbaud

(This is coming from $department which should only contain Technology Services and $category should contain Blackbaud)

Thanks for your help!

Richard

syntax is: url?field1=value1&field2=value2

output should be:
href=“createticket.php?dep=Technology+Services&cat=Blackbaud”

[php]echo ‘’ . $row[‘subcategory’] . ‘’;[/php]

http://php.net/htmlentities
http://php.net/urlencode

Sponsor our Newsletter | Privacy Policy | Terms of Service