Jump to content

brain fart - return data breaking input field


emehrkay

Recommended Posts

I'm really having a brain fart right now on how to fix this.

 

My return data is: (I have nothing to do with how the og person choose to input this)

 

<font color="#800080"><b>CASE</b></font>

 

and I am setting the value of a input text form field equal to that return

 

$input = "<input type=\"text\" name=\"queOpt". $i ."\" value=\"". $this->_queArr[$i] ."\" />";

 

im lost on how to fix this. addslashes doesnt make sense  - maybe it is the double quote thing

Link to comment
Share on other sites

Yea, addslashes is not right.

 

$font = '<font color="#800080">CASE</font>';
$font = str_replace('"', """, $font);
$input      = "<input type=\"text\" name=\"queOpt". $i ."\" value=\"". $font ."\" />";

 

Maybe the quote deal will work, I am not sure if that is the right ascii, but yea.

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.