Jump to content

vwinstead

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

vwinstead's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have found out how to properly get/put raw html code from the MySQL database. I can also display it properly in a browser. The only problem comes when I am trying to send it from the text editor to the database and it contains single quotes ('). Every other special character seems to work (&, "...etc), but when I try to put this single quote back into the database it spits back an error about my MySQL syntax having a problem. What do you have to do in order to put single quotes into the database that's different from all the other characters?
  2. I figured it out! I had to run html_entity_decode on the content that I pull out of MySQL before sending it to the FCKeditor. In fact, any time I pull data out of the database that is formatted as HTML code I need to decode it first with html_entity_decode before displaying on the page. Thanks for the help!
  3. The &gt means "greater than", the &lt means "less than". Now I see what it's doing. There is a break in the chain somewhere along the line. Text is getting properly sent over to the FCKeditor, but the editor automatically shows it as HTML and then when you're done editing it, the edited text gets saved with HTML special characters (like </p>) so it will be formatted properly for the browser. But when I retrieve the text again I'm not displaying it as HTML, I'm displaying it as straight text. Then when I edit it again, this straight text gets the special characters added to it again. It's a viscious cycle The problem is partly that I think the format might be wrong on the MySQL database for this filed. Currently I'm using BLOB and maybe it should be something else like LARGETEXT or whatever. The other problem is that I don't know how to display html on my page using php. The HTML code is stored in the MySQL database -> I'm calling it with echo. This just shows whatever is there as text on the screen. I COULD use htmlspecialchars to get rid of the </p> and all that, but that means the formatting will not exist when displayed in the browser. Isn't there a way to keep all the formatting elements in the database and use php to display the text properly in the browser?
  4. For some reason that displayed the following: <p>This is a test test</p> <br /> Looks really messed up. Does that mean there's some hidden formatting text in there? Here's some more specifics on what I'm doing: 1. regular text stored in a MySQL field is pulled onto a web page using php 2. visitor clicks an 'edit' button and is able to edit the contents on that page. 3. page contents are now shown in a text editor box for editing (using FCKeditor) 4. pressing the 'submit' button sends the altered version of the text back to the database for future display on the web page. I think the FCKeditor is altering all the text so that it shows up with all the special characters.
  5. I'm using just a big block of text. I wanted it in BLOB format to allow for expansion. Can I make a .bin file from something as simple as notepad?
  6. I have stored the following into a database field: <p>this is a test</p> <br /> How do I display this using PHP so that it doesn't show the HTML formatting code, but instead just shows the HTML result as it is supposed to look?
  7. I'm accessing a mySQL database with PHP. I'm using phpMyAdmin to alter my table data. In order to insert a value manually into a field which is of BLOB type it requires me to browse to a BINARY file (Max: 65,536B). What does that mean? How do you make a binary file in the appropriate format for this?
  8. I know this doesn't work because I tried it, but what is the correct format for changing the value of a field for a specific line according to an "id" number: $query = "INSERT INTO contents (body) VALUES ('$postedValue') WHERE id=0"; So far I've only been able to INSERT a whole new line, but I don't want to do that, I want to change the value of the "body" field in the line corresponding to an "id" value of zero.
  9. The content is just standard text format. I just need to figure out how to populate the initial value in the database of the database. Is it best to just use the INSERT command from a php section of code?
  10. I have a site that uses PHP to access the contents from a MySQL database. The visitor is able to edit the contents and the changes replace what is currently in the database. What is the best way to initially populate the database for a new page that has new page contents? What's the best interface to get my data into the database without just using the PHP interface and doing INSERT commands? What tool would I use for interacting with the database in an easy way to initially populate it? I don't think I have command-line support, but my host has phpMyAdmin available for database modification. And I have had good luck using MySQL administrator from my machine to log into the host database.
  11. Newbie question: I have index.html as my main site file. Can I use php within that file? Or do I NEED to run php only within a php file?
  12. Yes - I have a lot to learn, but I'm used to that. And I'm good at it. Thanks for the input!
  13. I was thinking that a good way to accomplish this is with a database (like mySQL). But I've never personally made changes to the mySQL database provided by my hosting site. I've only used the Fantastico scripts supplied by the site to auto-config the database for specific applications. Where would you suggest starting if I want to go down this road of using the database for displaying dynamic content?
  14. On my website I want to make the contents to be editable like they are on wikipedia.org. I imagine there's about a thousand different ways to accomplish this. I am going to use FCKeditor for user editing of the page contents. There will be two parts - 1. the actual page in HTML 2. the page showing the text editor with the HTML page contents in it. The visitor will arrive at the HTML page on my site then press an edit button on the page if they want to change something. FCKeditor will display whatever text I want, so I want to pass in the contents of the html page to the editor. So the problem is this: How do I easily send all my relevant page contents to the PHP page for editing? I was thinking of just assigning all the page contents to a variable and then just sending that variable to the PHP page. But I'm not sure yet if I can do that or if it's the best way to go about it. Any suggestions?
×
×
  • 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.