i need help

Thread Solved

Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

i need help

 
0
  #1
Mar 20th, 2008
i have once again been asked to fix some code on a website. this time the website is meant to have a content management system but once again the person who made the original website did not complete what he started.

the content management system side of it is using InnovaStudio wysiwyg html editor to edit the text on the pages. it looks good but the support and user guides for this may as well not exist they are that bad.

the code i need help with is as follows

  1. // save content to db
  2. if(isset($_POST["inpContent"]))
  3. {
  4.  
  5. $sContent=stripslashes($_POST['inpContent']); // remove slashes (/)
  6. $sContent=ereg_replace("'","''",$sContent); // fix SQL
  7.  
  8. $sql="UPDATE cms_core SET editorial='$sContent' WHERE id=$id";
  9. $query = mysql_query($sql);
  10. }
  11.  
  12. // load content
  13. if(!$_GET["id"]){ $id = 1; }
  14. $sql = "SELECT * FROM cms_core WHERE id=$id";
  15. $query = mysql_query($sql);
  16. $result = mysql_fetch_array($query);
  17. $sContent = $result['editorial'];
  18.  
  19. ?>

the page this code should be updating does not have any sql or connection to a db on it so i have entered

  1. <?php
  2. if(!$_GET["id"]){ $id = 1; }
  3. $sql = "SELECT * FROM cms_core WHERE id=$id";
  4. $query = mysql_query($sql);
  5. $result = mysql_fetch_array($query);
  6. $sContent = $result['editorial'];
  7.  
  8. ?>

the page is not displaying any of the edited text.

If any one has used innovastudio and could give me some help with using this then that would be great.
Last edited by peter_budo; Mar 22nd, 2008 at 12:41 pm. Reason: Keep It Organized - please use [code] for multiple lines not [icode]
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 176
Reputation: trudge is an unknown quantity at this point 
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: i need help

 
0
  #2
Mar 22nd, 2008
I'm confused. Are you asking for help with MySQL or an HTML editor called InnovaStudio?

We can only help you with MySQL questions here. With that in mind, you say that
does not have any sql or connection to a db on it
So if there is no connection to the database, how do you expect the query to execute? Or am I missing something here? Have you confirmed that you are logged in to the database? Can you access it remotely from the command line using 'mysql'?
Last edited by trudge; Mar 22nd, 2008 at 6:26 pm.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 347
Reputation: kevin wood is an unknown quantity at this point 
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz

Re: i need help

 
0
  #3
Mar 27th, 2008
the problem that i am experiencing is that the html editor is doing the editing side fine but it is then not updating the database with its new saved data so this cannot be recalled on to a different page. when i try to recall the data i have put if stsatement in it and it tells me that there is no data stored in the database. so i need the html editor to store the data into a database so i can recall it on to the new page
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 176
Reputation: trudge is an unknown quantity at this point 
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: i need help

 
0
  #4
Mar 27th, 2008
Originally Posted by kevin wood View Post
... so i need the html editor to store the data into a database so i can recall it on to the new page
Then you should be looking in the documentation for that editor, or posting your query in a forum for the same. There is no MySQL question here that I can see.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the MySQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC