how do i insert a variable from a form into a file_get_contents("link+formdata")
the variable being submitted via a form and contains full stops,Numbers,letter
Example: danny.29 would replace HERE in the link below:
file_get_contents("http://userapi.website.com/HERE");
As you can see i'm very new to this, any help would be very much appreciated :)
index.html
<html>
<body>
<form action="add.php" method="post">
ID: <input type="text" name="add">
<input type="submit">
</form>
</body>
</html>
add.php
<html>
<body>
<?php $x=$_POST['add'];?>
<?php
echo file_get_contents("http://userapi.website.com/"echo $x;");
?>
<?php echo $_POST["file_get_contents"]; ?>
</body>
</html>