I have http://communitychessclub.com/test.php
I have a php function named "getPosts" that I want to send an url to from a form:
<form action="#" method = "post">
<input type="hidden" name="sub" value="1" />
<select name="url" id="url">
<option value="http://www.chess.com/rss/articles">chess.com</option>
<option value="http://chesscafe.com/feed/">Chess Cafe</option>
<option value="http://www.chessdom.com/rss">Chessdom</option>
<option value="http://chess-news.ru/rss-eng">Chess-news</option>
</select>
</form>
For some reason, the php code below doesn't grab the option selected and pass it to the function. Why is that?
<?php
$sub = intval( $_POST["sub"]);
if ($sub == 1){
$url= $_POST["url"];
}
else{
$url = "http://www.theweekinchess.com/twic-rss-feed";
}
getPosts($url); ?>