Moderator’s note: Moved to General.
I’m just about to take my site live, but have one important security base to cover. I’ve got a form which sends a variable to an independent PHP page, and I want to make sure that I am protected from attacks or other weirdness. I really don’t know very much about PHP at all, so I’d appreciate any support someone knowledgeable of the language can offer.
Here’s an example of the code:
My HTML:
<form action="{site_url}otherpage.php" method="post" target="_blank">
<input name="variable" type="text">
<input type="submit" value="">
</form>otherpage.php:
<?php $variable = $_POST['variable'];?>
<frameset rows="125, *">
<frame src="http://www.mr-frame.com">
<frame src="http://www.some-site.com/search<?php echo "?p=", $variable; ?>">
</frameset>Is this vulnerable to attack? And if so, what can I do to secure the vulnerability?