<?php
include("header.inc");
?>
<form action="process.php" method="POST">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><Font face="arial" size="1">
<textarea name="txt_index" cols="60" rows="10" id="txt_index" style="width: 100%">
<?php
$query = "SELECT * FROM home_info";
$result = mysql_query($query, @mysql_connect(DB_SERVER, DB_USER, DB_PASS)) or die(mysql_error());
$text = mysql_result($result, 0, "home_text");
echo($text);
?>
</textarea>
</font></div></td>
</tr>
<tr>
<td><div align="center"><Font face="arial" size="1">
<input type="hidden" name="subindexpost" value="1">
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</font></div></td>
</tr>
</table>
</form>
<?php
include("footer.inc");
?>
here is my process.php when its submitted
function procSubmitIndex(){
global $session, $form;
$text = $_POST['txt_index'];
$query = "UPDATE home_info SET home_text = $text";
mysql_query($query, @mysql_connect(DB_SERVER, DB_USER, DB_PASS)) or die(mysql_error());
include("header2.inc");
echo("<center><font size='4'><font color='red'>Post has been submitted! Will redirect in 2 seconds</center></font>");
echo("<META HTTP-EQUIV='refresh' CONTENT='2;main.php'>");
//header("location:news.php");
include("footer.inc");
}
};
My Error
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 'Punky Jones Website!!! yay!!' at line 1
Now when i got to just the mysql cmd i type
UPDATE home_info SET home_text = "Hey whats up";
It will update.. So its a syntax problem for sure.. Any Help?


Sign In
Create Account


Back to top









