Jump to content

php mySql wont post what i tell it to


optikalefx

Recommended Posts

i have this form that updates a database.

the feild is called  value  and it has the attribute of longtext

 

in phpmyadmin i can paste a whole 300 words or more and it works fine.

but if i try to past that 300 words into my form, it doesnt do anything

 

but i can do 20 words just fine, and 50. and i change those all i want to

but when i try to paste in large ammounts of text, it just doesnt do it...

 

longtext doenst have a character set ammount so that shouldnt be the problem, so i dont know what is

Link to comment
https://forums.phpfreaks.com/topic/61786-php-mysql-wont-post-what-i-tell-it-to/
Share on other sites

<html>

<FORM METHOD="POST" ACTION="http://www.4tenproductions.com/jrinput.php">

<?php

$con = mysql_connect("xxxx","xxxx","xxxx");

mysql_select_db("update1", $con);

$team = $_POST["teamchoice"];

$table = $_POST["table"];

$sql = mysql_query("SELECT value FROM $table WHERE fname='$team'");

while($row = mysql_fetch_array($sql))

{

$text = $row['value'];

}

echo "<center>";

echo "<table border='0' cellpadding=10><tr><td>";

echo "<TEXTAREA NAME='teampage' ROWS=36 COLS=80>$text</TEXTAREA></td>";

echo "<td valign='middle' align='center'> To start a new paragraph type &#60;p&#62; </td></tr></table>";

echo "<br><center>";

echo "<INPUT TYPE='submit' value='Update'>";

echo "<INPUT type='hidden' name='teamchoice' value='$team'>";

echo "<INPUT type='hidden' name='table' value='$table'>";

?>

</form>

</html>

 

 

now whats odd, is i have this block of text that im trying to paste and post.  the text can be seen here at www.4tenproductions.com/phptext.txt

when i paste that whole block, it doesnt work, but if i paste just up to the word specializes than it does work ???

ha my bad

 

<?php

$con = mysql_connect("xxxx","xxxx","xxxx"); //connect to database

mysql_select_db("update1", $con);  //choose database

$myText = $_POST["teampage"];  //the text you wrote from jrform.php variable

$team = $_POST["teamchoice"]; //which page you selected variable

$table = $_POST["table"]; // which table in the database we are in

$sql = mysql_query("UPDATE $table SET value = '$myText' WHERE fname = '$team'"); // update the current table with the new text entered

echo "<table border='0' width='100%' height='100%'><tr><td valign='middle' align='center'>";  //align the page vertically and horizontally

echo "<form method='post' action='http://www.4tenproductions.com/jrlistpage.php'>"; //action will take you back to the list of pages to select from

echo "<INPUT type='hidden' name='table' value='$table'>"; //keep track of the table we are in so you dont have to log back in

echo "<input type='submit' value='Go back'></form></tr></td></table>"; //submit button and ending html tags

?>

 

those 3 variables that are being brought in, they all work fine, ive tested that.  i also commented the whole thing so you know what each part does.

 

its like it allows for 250 words and then cuts off, but like i said in phpMyAdmin it works fine,  i cant figure out why my textarea and my form wont do it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.