script error

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: script error
Groups: php.general 
Request: Send a blank email to php-general+get-192463@lists.php.net to get a copy of this message
i am using this script as a form to enter articles into databas, the variable post_content comes from wysiwyg script but when i execute the script everything goes fine except it doesn't insert any rown in the databse can anyone tell me what is wrong with my code ? <?php ob_start(); $post_title = addslashes($post_title); $post_author = addslashes($post_author); $post_content = addslashes($post_content); $post_date = addslashes($post_date); $db = mysql_connect("localhost", "root"); mysql_select_db("balady", $db); $query = "insert into 'posts' ( post_id , post_title , post_date , post_author , post_content , m_cat_id , s_cat_id , post_pic) values (\'\', \'$post_title, \'$post_title, \'$post_author, \'$post_content, \'\', \'\', \'subject.gif\' )"; mysql_query($query); ?> <html> <head> <title>Add Article</title> </head> <body> <form name="post_article" method="post" action="<?php print ($PHP_SELF); ?>" onSubmit="submit_form()"> <table border="0" width="56%" id="table1"> <tr> <td width="193"><b><span lang="ar-eg"> <font size="3" face="Simplified Arabic">&#1593;&#1606;&#1608;&#1575 &#1606; &#1575;&#1604;&#1605;&#1608;&#1590;&#1608;&#1593 </font></span></b></td> <td width="341"><input type="text" name="post_title" size="40" dir="rtl ></td> <td>&nbsp;</td> </tr> <tr> <td width="193"><b><span lang="ar-eg"> <font size="3" face="Simplified Arabic">&#1575;&#1587;&#1605; &#1575 &#1604;&#1603;&#1575;&#1578;&#1576;</font></span></b></td> <td width="341"><input type="text" name="post_author" size="40" dir="rtl ></td> <td>&nbsp;</td> </tr> <tr> <td width="193"><b><font size="3" face="Simplified Arabic"> <span lang="ar-eg">&#1578;&#1575;&#1585;&#1610;&#1582; &#1575;&#1604 &#1605;&#1608;&#1590;&#1608;&#1593;</span></font></b></td> <td width="341"><input type="text" name="post_date" size="40" dir="rtl ></td> <td>&nbsp;</td> </tr> <tr> <td> </td> <td> <?php // include the config file and editor class: include_once ('editor_files/config.php'); include_once ('editor_files/editor_class.php'); // create a new instance of the wysiwygPro class: $editor = new wysiwygPro(); $editor->set_name('post_content'); // print the editor to the browser: $editor->print_editor(700, 400); ?> </td> </tr> <tr> <td width="193">&nbsp;</td> <td width="341"><input type="submit" value="Submit" name="submit"><input type="reset" value="Reset" name="reset"></td> <td>&nbsp;</td> </tr> </TABLE> </form> </body> </html> <?php ob_end_flush(); ?>

« previous php.general (#192463) next »