How do I sanitize a string in PHP that contains "; Echo"? (I have a solid reason)
- by user337878
I turned this case into a simple PHP page that submits to itself. My issue is that I am submitting track meet results and one of the girl's names is Echo...a lovely name.
The problem text I'm submitting is:
Pole vault - Rachel Simons, Tow, 8-6; Echo Wilson, Cit, 8-0; Molly Randall, Tow, 7-0;
So you see a semicolon followed by white space followed by Echo...
After submitting, it says:
POST to /results/test.php not supported
The end goal is to save it to a database along with some other info and have a search page to find it and simply print out the full result on the screen. I stripped out all my database stuff to get it down to this one error. I mean, I can intentionally mis-spell her name, but there's gotta be a way around this, right???
Here's the test PHP file.
<html>
<head>
<title>title</title>
</head>
<body>
<?php
echo "<h3>Edit meet info below</h3>";
echo "<form action=\"test.php\" method=\"post\" id=\"submitForm\">";
echo "Full Results:<br/><textarea NAME=\"results\" id=\"results\" rows=\"20\" cols=\"80\" MAXLENGTH=\"8191\"></textarea><br/><br/>";
echo "<input type=\"submit\" name=\"submitMeet\" value=\"Submit\">";
echo "</form>";
?>
</body>
</html>