maxudaskin Posted July 27, 2007 Share Posted July 27, 2007 I want to be able to get information from a form into a database using $_POST... but the text will be upto 7000 chars long (using TEXT)... how can I overcome these limitations? Quote Link to comment Share on other sites More sharing options...
tibberous Posted July 27, 2007 Share Posted July 27, 2007 Who told you there was a limit? Quote Link to comment Share on other sites More sharing options...
maxudaskin Posted July 27, 2007 Author Share Posted July 27, 2007 Well... it will not allow me to post this to a database... All usernames for the forums have changed. Effective immediately, forum usernames will be as follows: OOMxxxx First Lastname For example, my username is OOM0102 Michael Bonanno. All existing forum member's usernames have been changed. Pilots who have not yet registered for the forum are asked to do so using the new username format. <?php if(!$logged_in){ echo "<h1>Error!</h1>\n"; echo "You are not currently logged in, logout failed. Go to <a href=\"login.php\">Login.</a>"; } else{ if ($_SESSION['type'] = 1){ if(isset($_POST['addnotam'])){ $title = $_POST['title']; $text = $_POST['text']; $name = $_SESSION['name']; $date = date("d/m/Y"); echo 'Inserting the Following Data into the Database'; echo '<br>'; echo 'Title: '. $title; echo '<br>'; echo 'Text: '. $text; echo '<br>'; echo 'Name: '. $name; echo '<br>'; echo 'Date: '. $date; $con = mysql_connect("removed", "removed", "removed") or die(mysql_error()); mysql_select_db('zoomdb', $con) or die(mysql_error()); if(!$con){ die('Cannot connect to database, REASON: '. mysql_error()); } mysql_query("INSERT INTO notams (title, text, name, date) VALUES ('$title','$text','$name','$date')"); mysql_close($con); } else { ?> <form id="form1" name="form1" method="post" action="<?php $PHP_SELF; ?>"> <p> <input name="title" type="text" id="title" value="Title" size="28" /> <br /> <textarea name="text" cols="25" rows="5" id="text">Notam Text</textarea> <br /> For a new line, put <br><br /> Pressing ENTER will not make a new line in the notam. </p> <p>Links are to be either:<br /> </p> <div class="green2"><url>http://www.someurl.com</url></div> <div class="green2"><url=http://www.someurl.com/>Some Link</url></div> <p> <input name="addnotam" type="submit" class="green" id="addnotam" value="Add Notam" /> </p> </form> <? }} } ?> Quote Link to comment Share on other sites More sharing options...
tibberous Posted July 27, 2007 Share Posted July 27, 2007 I don't think the max size of post is your problem. I posted about 30 pages worth of junk in a single line in a textarea to test, worked fine. Quote Link to comment Share on other sites More sharing options...
rcorlew Posted July 27, 2007 Share Posted July 27, 2007 Re you using the text type sql column? If so the limit is 64megs, that's way more than 7000 characters, maybe the column is tiny text or medium text. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.