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
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!!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.