Jump to content

Escaping A Quotation


Xtremer360

Recommended Posts

I have a field in my database called height and obviously an example would look like 5'6". I am calling that row and it shows up as 5'6 and doesn't include that following quotation mark. I'm supposed to escape it somehow I think but not sure how. Any tips?

Link to comment
Share on other sites

Still doesn't show that following quotation. Am I dong something wrong still?

 

$query = "SELECT s.hometown, s.height, s.weight,

                h.kowtitles, h.kowawards,

                w.nicknames, w.finisher, w.setup, w.music

        FROM `efed_bio_singles`  AS s,

              `efed_bio_history`  AS h,

              `efed_bio_wrestling` AS w

        WHERE s.bio_id = '$defaultcharacterid' AND

          h.bio_id = '$defaultcharacterid' AND

          w.bio_id = '$defaultcharacterid'";

  $result = mysql_query($query);

$row = mysql_fetch_array($result);

$height = mysql_real_escape_string($height); 

 

And then this in the form: <?php echo $row['height']; ?>

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.