Jump to content

separating html from php (newbie)


samUK

Recommended Posts

Hi ive been racking my brain all day. Im pretty new to this aswell so bear with me.

 

I have created an update page. I am pulling out info from my database and placing it in a table so it can be updated.

 

Now, I have a mixture of images and swfs, so i have inserted in my database entries such as,

 

<img src="images/HME.jpg" />

 

When i pull this out in to a table, and view in my browser window i get this,

 

img.jpg

 

I understand the /> at the end of the image address interferes with the actual html table,

<td>Image 1:</td>

<td><input type="text" name="img1" value="<?php echo $row_Recordset1['img1']; ?>" size="50"></td>

 

I have this bit of code at the top of my file and was wandering if this has anything to do with it,

 

$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

 

 

PLEASE PLEASE SOMEONE HELP!!

   

Link to comment
https://forums.phpfreaks.com/topic/116048-separating-html-from-php-newbie/
Share on other sites

Thank you very much for you reply,

 

Now as i said, im a newb and i do not understand where to use,

 

Use htmlentities($string, ENT_QUOTES);

 

As for adding a field to determine a swf or image, i never knew you could do that, and am a little confused about how id go about doing it?

 

Your help and advice is much appreciated,

 

thanks,

 

Sam

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.