Jump to content

Recommended Posts

Give us $stepd's contents? Stripslashes only removes the escape character '\' once. This should replace all and be UTF safe..

<?php
  preg_replace(array('/\x5C(?!\x5C)/u', '/\x5C\x5C/u'), array('','\\'), $string);
?>

You can use str_replace() as well alongside without much effort.

 

This is the form

<script src="addInput.js" language="Javascript" type="text/javascript"></script>
<form method="POST" action="inputresult.php">
     <div id="dynamicInput">
          Step 1<br><textarea name="mysteps[]"></textarea>
     </div>
     <input type="button" value="Add another Step" onClick="addInput('dynamicInput');">
 <input type="submit" value="Do It">
</form>

It goes here for them to confirm

<?php
echo "<form method='post' action='except.php'>";
$mysteps = $_POST["mysteps"];
$i=1;
foreach ($mysteps as $eachInput) {
echo "<textarea value='".$eachInput . "' name='step".$i." cols='50'>$eachInput</textarea><br>";
$i++;
}
print "<input type='submit' value='Publish Now'><br></form>";
?>

and I have this page set up to test the output

<?php
include("bdinfo.php");
$stepa=$_POST['stepa'];
$stepb=$_POST['stepb'];
$stepc=$_POST['stepc'];
$stepd=$_POST['stepd'];
$stepe=$_POST['stepe'];
$step6=$_POST['step6'];
$step7=$_POST['step7'];
$step8=$_POST['step8'];
$step9=$_POST['step9'];
$step10=$_POST['step10'];
echo $name."<br>";
echo $password."<br>";
echo $database."<br>";
echo $stepa."<br>";
echo $stepb."<br>";
echo $stepc."<br>";
echo $stepd."<br>";
echo stripslashes($stepe)."<br>";
?>

Thank you

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.