I have been looking at this code for 20mins and can't work out what I am doing wrong. There is something wrong with my sql statement below is the error and the code. what I am trying to do is to
edit some information that is already in the database
Any help would be great.
Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'active=1 content='dafasdsdfasgbvfgf gasd' at line 3
Code: private function insertq() {
if ( !empty($this->pageName) && !empty($this->position) && !empty($this->content) ) {
echo $this->pageName ." pn
";
echo $this->position ." pos
";
echo $this->content." con
";
echo $this->active." act
";
$query = "UPDATE webContent SET
myOrder =$this->position
active=$this->active
content='$this->content'
WHERE pageName = '$this->pageName'";
if (mysql_query($query)) {
echo("<P>Your update has been added.</P>");
} else {
echo("<P>Error adding submitted update: " .
mysql_error() . "</P>");
}
}
return $returnValue;
}
Registration
ok so i have a site where people can register and login which works now thanks to someone on here that pointed out my error :-)Now my users click my links they can view the content without logging in,
Array disappearing in foreach loop
Okay, I have this problem where an array will become undefined in a foreach loop.Here is the function plus a couple comments:Code: [Select]function mineResources($nation) {global $db;$resources =
MySQL noob question
hi guysI have a simple mysql table set up, along the lines of Col 1 - Col 2 - Date_last_updated--------------------------------Som - Some - 06/11/2009 23:23:23Bob - Bob - 06/11/2009 23:30:30and so
Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag that will disable the html between it for example:<a
Any Good MMORPGs you've played?
I'm about to have ALOT of free time on my hands (finished highschool) and I need something to fill the void. I tried Atlantica Online a while ago and really liked it (Gonna download it again) and I
HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and not an html email. Any ideas what is causing this?Thanks.Code: // Email require_once
I need an iframe that calls up a different page according to the date
hiI don't know any php (only html) and I urgently need to do the following: I need an iframe that calls up a different page according to the date e.g. on the 2th Dec a page called 'special2.php',
PHP Programming error. Please help!
Hi there,Am making a website for a friend and have encountered a problem that i need fixing fast.I get this error when i try to run the code below: QuotePHP Error MessageWarning: Unexpected character
Help with parsing this html
Hi, I've got some html i just need a couple of strings from.. argh, it's freaking me out. I've tried a lot.Here is the html:Code: <div id="Tab01" style="overflow: auto;
IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with the php function getimagesize() and path names.When using these two different sets of code:Code: