Jump to content

Problems with php and quotation marks " "


efrainuzco

Recommended Posts

Hi everyone!

 

I am working with PHP, and having the following problem:

 

I have a form and a preview button, when I type anything with  " " and preview it there is no problem, except when I go backwards to the form page, because everything between " " is disapeared including the quotation marks.

 

Could you help me please? Thanks in advace.  ;D

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/37629-problems-with-php-and-quotation-marks/
Share on other sites

this is the code of the form:

 

<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<form action="salida.php" method="post">
<p>Introduce datos: </p>
<p>
<textarea name="txtdatos" cols="80" rows="8" id="txtdatos"><?php echo $txtdatos; ?></textarea>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Enviar" />
</label>
</p>
</form>
<p> </p>
</body>
</html>

 

 

 

This is the code of the preview:

 

<html>
<head>
<title>Untitled Document</title>
</head>
<body>

<?php echo $txtdatos; ?>
<form id="form1" name="form1" method="post" action="entrada.php">
  <label>
  <input type="submit" name="Submit" value="Atrás" />
  </label>
  <input name="txtdatos" type="hidden" id="txtdatos" value="<? echo $txtdatos; ?>" />
</form>
<p> </p>
</body>
</html>

 

The problem is that, when I click back button, everything between " " disapears.

 

Help please!!

When you press the browsers back button it doesnt resubmit data. it just goes back to the page you was last on and depending on the browser you use it will display the page according to the html - other browser may put back what you added into form fields automatically.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.