Sure, I have attached both the forms page and the page action page. -Steve
> Hi > > can you post the form/php code > > Peter > > -----Original Message----- > From: Steve Marquez [mailto:[EMAIL PROTECTED] > Sent: 10 June 2003 14:26 > To: MySQL List > Subject: Column or Table issue > > > I am attempting to insert an article into a MySQL table on a remote server, > via a PHP Forms script. > > I am able to insert the article on my server, and PHP MyAdmin works on both > servers, however, when I use my script on the remote server it does not > allow for long articles. (The articles have not more than 5 paragraphs at > the most.) > > Is there anyone that has run into this problem before? Any suggestions? > > I am assuming that because PHP MyAdmin works with the long article that it > is my script that is the issue. > > The table is a "longtext" table. All permissions are correct. The exact same > script works perfectly on my server. > > The funny thing is that every "single line" text field inserts into the DB, > however, the multi line does not. > > If I write a few lines in the field, it will write to the DB, if I write the > full article, it does not. It sounds like a limitation on the column. But I > have no limitations on the column. (The column is long text, besides, I can > manually insert in, or us PHP MyAdmin to place the entire article.) > > This is really strange... Can anyone help? > > -Steve Marquez > [EMAIL PROTECTED] > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > >
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head><title>Updating Article</title> <?php include "../includes/include_ccfs_site.php"; ?> <?php print "<pre>"; // and read it back for printing purposes. $get_table_data = "SELECT * FROM articles WHERE id_num=\"$id_num\""; $response = mysql_query( $get_table_data, $dbh ); // now print it out for the user. if ( $one_line_of_data = mysql_fetch_array( $response ) ) { extract ( $one_line_of_data ); } print "</pre>"; ?> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="../ccfsa.css" rel="stylesheet" type="text/css"> </head> <body> <form enctype="multipart/form-data" action="update.php" method="post"> <p> </p> <table width="500" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#666666"> <tr> <td bgcolor="#666666"><span class="largeheadline"><font color="#FFFFFF">UPDATING:<?PHP echo "$title"; ?></font></span></td> </tr> <tr> <td><table width="572" border="0" align="center" cellpadding="5" cellspacing="0" class="text"> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right"></div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> </td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right">Article Identification Number:</div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"> </font></div></td> <td colspan="3" bgcolor="#FFFFFF"><font color="#000000"> <input type="hidden" name="id_num" value="<?php echo "$id_num"; ?>"> <?php echo "$id_num\n"; ?> </font></td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right"></div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> </td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right">Title:</div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"> </font></div></td> <td colspan="3" bgcolor="#FFFFFF"><font color="#CCCCCC"> <input name="title" type="text" id="title" value="<?php echo "$title"; ?>" size="35"> </font></td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right"></div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> </td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right">Author:</div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"> </font></div></td> <td colspan="3" bgcolor="#FFFFFF"><font color="#CCCCCC"> <input name="author" type="text" id="author" value="<?php echo "$author"; ?>" size="35"> </font></td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right"></div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> </td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right">Article:</div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"> </font></div></td> <td colspan="2" valign="top" bgcolor="#FFFFFF"><font color="#CCCCCC"> <textarea name="article" cols="35" rows="13" id="article"><?php echo "$article_contents"; ?></textarea> </font></td> <td width="142" valign="top" bgcolor="#FFFFFF"> <table width="187" border="1" cellpadding="3" cellspacing="0" class="text"> <tr bgcolor="#666666" class="boldtxt"> <td width="50"><font color="#FFFFFF">HTML tag</font></td> <td width="16"><font color="#FFFFFF"> </font></td> <td width="85"><font color="#FFFFFF">Definition.</font></td> </tr> <tr> <td colspan="3"> <table width="187" border="0" cellpadding="3" cellspacing="0" class="text"> <tr> <td width="50"><p></td> <td width="16"> </td> <td width="85">is a paragraph break</td> </tr> <tr> <td width="50"><br></td> <td width="16"> </td> <td width="85">is a one line break </td> </tr> <tr> <td width="50"><b></td> <td width="16"> </td> <td width="85">is the beggining of a bold line </td> </tr> <tr> <td width="50"></b></td> <td width="16"> </td> <td width="85">will end the bolded line </td> </tr> </table> <div align="center"></div></td> </tr> <tr> <td colspan="3">You may need to use HTML in the "Articles" window. The above tags will aide you, feel free to copy and paste them where necessary.</td> </tr> </table> </td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right"></div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> </td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right">Start Date:</div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"> </font></div></td> <td colspan="3" bgcolor="#FFFFFF"> <input name="start_date" type="text" id="start_date" value="<?php echo "$start_date\n"; ?>" size="35"></td> </tr> <tr> <td width="81" bgcolor="#CCCCCC" class="boldtxt"> <div align="right"></div></td> <td width="1" bgcolor="#CCCCCC"> </td> <td width="1" bgcolor="#FFFFFF"> <div align="left"><font color="#CCCCCC"></font></div></td> <td colspan="3" bgcolor="#FFFFFF"> </td> </tr> <?php if ( $image == NULL ){ print "<tr>"; print "<td width=\"81\" bgcolor=\"#CCCCCC\" class=\"boldtxt\" div align=\"right\"> </td>"; print "<td width=\"1\" bgcolor=\"#CCCCCC\"> </td>"; print "<td width=\"1\" bgcolor=\"#FFFFFF\" div align=\"left\"><font color=\"#CCCCCC\"></font></td>"; print "<td colspan=\"3\" bgcolor=\"#FFFFFF\"><font color=\"#CCCCCC\"><a href=\"update_image_form.php?id_num=$id_num\">if you would like to upload a graphic, click here.</a></font></td>"; print "</tr>"; print "<tr>"; print "<td width=\"81\" bgcolor=\"#CCCCCC\" class=\"boldtxt\"> </td>"; print "<td width=\"1\" bgcolor=\"#CCCCCC\"> </td>"; print "<td width=\"1\" bgcolor=\"#FFFFFF\"> </td>"; print "<td colspan=\"3\" bgcolor=\"#FFFFFF\"> </td>"; print "</tr>"; }else{ print "<tr>"; print "<td width=\"81\" bgcolor=\"#CCCCCC\" class=\"boldtxt\" div align=\"right\"> </td>"; print "<td width=\"1\" bgcolor=\"#CCCCCC\"> </td>"; print "<td width=\"1\" bgcolor=\"#FFFFFF\" div align=\"left\"><font color=\"#CCCCCC\"></font></td>"; print "<td colspan=\"3\" bgcolor=\"#FFFFFF\"><font color=\"#CCCCCC\"><a href=\"update_image_form.php?id_num=$id_num\">if you would like to upload a new graphic, click here.</a></font></td>"; print "</tr>"; print "<tr>"; print "<td width=\"81\" bgcolor=\"#CCCCCC\" class=\"boldtxt\"> </td>"; print "<td width=\"1\" bgcolor=\"#CCCCCC\"> </td>"; print "<td width=\"1\" bgcolor=\"#FFFFFF\"> </td>"; print "<td colspan=\"3\" bgcolor=\"#FFFFFF\"> </td>"; print "</tr>"; print "<tr>"; print "<td width=\"81\" bgcolor=\"#CCCCCC\" class=\"boldtxt\" div align=\"right\">To delete an image, select and erase the code in the box. >>></td>"; print "<td width=\"1\" bgcolor=\"#CCCCCC\"> </td>"; print "<td width=\"1\" bgcolor=\"#FFFFFF\" div align=\"left\"><font color=\"#CCCCCC\"></font></td>"; print "<td colspan=\"3\" bgcolor=\"#FFFFFF\"><input name=\"image\" type=\"text\" id=\"image\" value =\"$image\" size =\"35\"><font color=\"#CCCCCC\"></font></td>"; print "</tr>"; print "<tr>"; print "<td width=\"81\" bgcolor=\"#CCCCCC\" class=\"boldtxt\"> </td>"; print "<td width=\"1\" bgcolor=\"#CCCCCC\"> </td>"; print "<td width=\"1\" bgcolor=\"#FFFFFF\"> </td>"; print "<td colspan=\"3\" bgcolor=\"#FFFFFF\"> </td>"; print "</tr>"; } ?> <tr> <td bgcolor="#CCCCCC" class="boldtxt"> </td> <td bgcolor="#CCCCCC"> </td> <td bgcolor="#FFFFFF"> </td> <td width="115" bgcolor="#FFFFFF"><font color="#CCCCCC"> <input name="submit" type="submit" value="Send File"> </font></td> <td width="172" bgcolor="#FFFFFF"><div align="center"><a href="auth_ccfs3520.php">Return to the Admin page.</a></div></td> <td bgcolor="#FFFFFF"> </td> </tr> <tr> <td bgcolor="#CCCCCC" class="boldtxt"> </td> <td bgcolor="#CCCCCC"> </td> <td bgcolor="#FFFFFF"> </td> <td colspan="3" bgcolor="#FFFFFF"> </td> </tr> </table> </td> </tr> </table><p><CENTER> </CENTER> </form> </body> </html>
<?php include '../includes/include_ccfs_site.php'; $id_num = $_POST["id_num"]; $title = $_POST["title"]; $author = $_POST["author"]; $article_contents = $_POST["article_contents"]; $start_date = $_POST['start_date']; $image = $_POST['image']; ?> <?php /*$insert_data = "UPDATE articles SET start_date = \"$start_date\", title = \"$title\", author = \"$author\", article_contents = \"$article_contents\", image = \"$image\" WHERE id_num=\"$id_num\""; //UPDATE products SET image = "images/about_f2.gif" WHERE prod_id = 0001; $response = mysql_query( $insert_data, $dbh ); // and read it back for printing purposes. $get_table_data = "SELECT * FROM articles"; $response = mysql_query( $get_table_data, $dbh );*/ $insert_data = "UPDATE articles SET title = \"$title\", author = \"$author\", start_date = \"$start_date\", image = \"$image\" WHERE id_num = \"$id_num\""; //UPDATE products SET image = "images/about_f2.gif" WHERE prod_id = 0001; $response = mysql_query( $insert_data, $dbh ); // and read it back for printing purposes. $get_table_data = "SELECT * FROM articles"; $response = mysql_query( $get_table_data, $dbh ); ?> <div align="center"> <p> </p> <p> </p> <p> </p> <p> </p> <p><b>Article has been updated... <a href="auth_ccfs3520.php">Click here return the admin pages.</a></b></p> </div>
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]