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
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 ???

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.