How to call another site from my html form
Hi,
Im new to PHP and I try to call another site from my html form:
PHP Code:
<form name="form1" method="post" action="code.php">
<table border=0>
<tr>
<td>
<font color="#000000" size="-1" face="Verdana,sans-serif"><B>URL:</B></font>
</td>
<td>
</td>
<td>
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="reset" value="Reset">
</td>
</tr>
</table>
</form>
and the code.php:
PHP Code:
<?php
global $url;
if(isset($_POST['url'])){
$url = $_POST['url'];
$validurl=0;
}
if(checkURL($url)){
$validurl=1;
}else{
}
function checkURL ($url)
{
$url = @parse_url($url);
if (!$url) {
return false;
}
}
echo $url;
?>
Now the problem is, Im getting only the new string on the new page, instead of the page was called.
As I said, Im very new to php, and any help wolud be very appreciated.
Thanks in advance!