You'll need to tweek the finer details, and add some sort of validation, but something like this should work;
PHP Code:
<form action="" method="post">
Website: <input type="text" name="website" /><br/>
Category:
<select name="category">
<option value="category1">Category 1</option>
<option value="category2">Category 2</option>
<option value="category3">Category 3</option>
</select><br/>
Width: <input type="text" name="width" /><br/>
Height: <input type="text" name="height" /><br/>
<input type="submit" /><br/>
<textarea rows="10" cols="50">
<iframe src="http://mysite.com/<?php echo $_POST['category'];?>/index.php?cat=<?php echo $_POST['category'];?>&site=<?php echo $_POST['website'];?>" width="<?php echo $_POST['width'];?>" height="<?php echo $_POST['height'];?>" scrolling="no" frameborder="0"></iframe>
</textarea>
</form>
[TIP] - When you need to develop small scripts/apps like this, first try and think about the processes you might need and then think about what existing scripts/apps also use the same processes. Thats usually the most logical thought pattern to help somebody achieve something. This first thing that sprung to mind here for me was a contact form that prints your form input details on a web page after submit - its the same principle for what you want but the input is just echo'd into a textarea. From there you'll be able to search for tutorials and examples and build your own code more easily.
Bookmarks