I'm trying to replace all instances of $timestamp = mysqli_real_escape_string($db_conx, $_POST['Timestamp']);
with $timestamp = date("Y-m-d H:i:s");
in all files under /home/user/public_html/
I have tried many variations of the below command but can't seem to get the escaping right!
find /home/user/public_html/ -type f -print0 | xargs -0 sed -i 's/\$timestamp = mysqli_real_escape_string(\$db_conx, \$_POST['\''Timestamp'\'']);/\$timestamp = date(\"Y-m-d H:i:s\");/g'