Removing backslashes from submitted strings (PHP)?

I have a site that let's my users watch video together, however I have been limited to uploading an embed through the FTP. Since everyone had to rely on me in order to watch a video, I decided to create a page where people can submit the embed and have it posted in the index. With normal text, the script I created works fine, however when I use an embed everything get's messed up. The contents of "video.txt" are riddled with backslashes! How do I remove them?

Here are the submission scripts:

submit.html:
<html>
<head>
<title>Video Posting</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form action="submit.php" method="post">
<input name="embed" type="text" />
</form>
</body>
</html>

submit.php:
<html>
<?php
$stringData = $_POST['embed'];
$video = "video.txt";
$fh = fopen($video, 'w');
fwrite($fh, $stringData);
fclose($fh);
?>
</html>

Contents of video.txt:
<iframe width=\\"550\\" scrolling=\\"no\\" height=\\"412\\" frameborder=\\"0\\" src=\\"http://upload2.com/embed/642fc9a0\\"></iframe>

Any tips?
Problem solved. Thanks!
:D
 
Back
Top