Author Topic: Problems with php and quotation marks " "  (Read 524 times)

0 Members and 1 Guest are viewing this topic.

Offline efrainuzcoTopic starter

  • Irregular
  • Posts: 2
    • View Profile
Problems with php and quotation marks " "
« on: February 08, 2007, 12:36:18 PM »
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



Offline sayedsohail

  • Enthusiast
  • Posts: 468
    • View Profile
Re: Problems with php and quotation marks " "
« Reply #1 on: February 08, 2007, 12:59:41 PM »
please guys add your code, so we can look at it. thanks

Offline efrainuzcoTopic starter

  • Irregular
  • Posts: 2
    • View Profile
Re: Problems with php and quotation marks " "
« Reply #2 on: February 08, 2007, 02:11:44 PM »
this is the code of the form:

Code: [Select]
<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>&nbsp;</p>
</body>
</html>



This is the code of the preview:

Code: [Select]
<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&aacute;s" />
  </label>
  <input name="txtdatos" type="hidden" id="txtdatos" value="<? echo $txtdatos; ?>" />
</form>
<p>&nbsp;</p>
</body>
</html>

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

Help please!!

Offline wildteen88

  • Guru
  • 'Insane!'
  • *
  • Posts: 12,021
  • Gender: Male
    • View Profile
Re: Problems with php and quotation marks " "
« Reply #3 on: February 08, 2007, 02:14:29 PM »
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.