User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 397,598 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,826 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 437 | Replies: 3 | Solved
Join Date: Feb 2008
Posts: 290
Reputation: kevin wood is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
kevin wood's Avatar
kevin wood kevin wood is offline Offline
Posting Whiz in Training

i need help

  #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

// save content to db
if(isset($_POST["inpContent"])) 
	{
	
	$sContent=stripslashes($_POST['inpContent']); // remove slashes (/)	
	$sContent=ereg_replace("'","''",$sContent); // fix SQL
		
	$sql="UPDATE cms_core SET editorial='$sContent' WHERE id=$id";
	$query = mysql_query($sql);
	}
	
// load content
if(!$_GET["id"]){ $id = 1; }
$sql = "SELECT * FROM cms_core WHERE id=$id";
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
$sContent = $result['editorial'];

?>


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

<?php
		if(!$_GET["id"]){ $id = 1; }
		$sql = "SELECT * FROM cms_core WHERE id=$id";
	        $query = mysql_query($sql);
		$result = mysql_fetch_array($query);
		$sContent = $result['editorial'];

	    ?>

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 11:41 am. Reason: Keep It Organized - please use [code] for multiple lines not [icode]
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Other Threads in the MySQL Forum

All times are GMT -4. The time now is 6:37 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC