To sanitize, it means that you can't trust what others are putting into the system.
Search up on "SQL Injection" and "XSS" (Cross Site Scripting).
Some examples:
mysql_real_escape_string();
$id = "%".mysql_real_escape_string($_GET["search"])."%";
$sid = mysql_real_escape_string($_GET["search"]);
// Retrieve all the data from the "dampener" table
$result = mysql_query("SELECT * FROM dampener WHERE Press_Model Like '$id'")
or die(mysql_error());
This will help prevent SQL Injection. Any time you are accepting user input, you will want to escape that input by using mysql_real_escape_string();
If you are accepting an integer only (a number) you can also do:
$id = (int)$_GET['id'];
which will force whatever is accepted to be a number, which will turn a string into the number 1.
echo can handle multi-line input such as:
echo '
<tr><td><center>
'.$row['Press_Model'].'
</td><td><center>
'.$row['Roller_Diameter'].'
</td><td><center>
'.$row['Red_1_Size_Form'].'
</td><td><center>
'.$row['Red_1_Ductor'].'
</td><td><center>
'.$row['Red_1_Cut_Form'].'
</td><td><center>
'.$row['Red_1_Cut_Ductor'].'
</td><td><center>
'.$row['Red_1_Set'].'
</td><td><center>
'.$row['Hyton_Press'].'
</td><td><center>
'.$row['Hyton_Cut_Form'].'
</td><td><center>
'.$row['Hyton_Cut_Ductor'].'
</td><td><center>
'.$row['Hyton_Cut_Set'].'
</td><td><center>
'.$row['Red_Runner'].'
</td><td><center>
'.$row['Classic_Loop_Form'].'
</td><td><center>
'.$row['Classic_Loop_Ductor'].'
</center></td></tr>';
OR you can use heredoc style (many lines, accepting variables, etc).
Note: There heredoc syntax means that if you do echo <<<EOL the EOL; must not be indented otherwise it will still be treated as what you wish to echo.
echo <<<EOL
<tr><td><center>
{$row['Press_Model']}
</td><td><center>
{$row['Roller_Diameter']}
</td><td><center>
{$row['Red_1_Size_Form']}
</td><td><center>
{$row['Red_1_Ductor']}
</td><td><center>
{$row['Red_1_Cut_Form']}
</td><td><center>
{$row['Red_1_Cut_Ductor']}
</td><td><center>
{$row['Red_1_Set']}
</td><td><center>
{$row['Hyton_Press']}
</td><td><center>
{$row['Hyton_Cut_Form']}
</td><td><center>
{$row['Hyton_Cut_Ductor']}
</td><td><center>
{$row['Hyton_Cut_Set']}
</td><td><center>
{$row['Red_Runner']}
</td><td><center>
{$row['Classic_Loop_Form']}
</td><td><center>
{$row['Classic_Loop_Ductor']}
</center></td></tr>
EOL;
I personally don't use heredoc myself.
Note, I have encapsulated the $row['whatever'] within braces as it tells PHP that it is an array/string (in short - that isnt exactly accurate, but that's the basis).
In addition - I would trim() your input to prevent someone from just searching for a space character.
$id = "%".mysql_real_escape_string(trim($_GET["search"]))."%";
$sid = mysql_real_escape_string(trim($_GET["search"]));
Hope this helps..