Jump to content


Photo

$_POST limitations????


  • Please log in to reply
3 replies to this topic

#1 jowchie

jowchie
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • Locationhawaii

Posted 13 August 2003 - 02:04 AM

i have a project duenext week and i am stuck with a problem with mysql query that im trying to run.

i have a very long query string posted from a different html form page. then this string is fed to my intrams.php page and all the keys and values are saved in a certain variable though $_POST, but when i run the query to add these new items to different table they don\'t seem to the first table, but the rest are just fine... and when i check to see if my tables have the data. all of the rest of the tables have the data, except for the first one, which is kinda weird.

here is a snippet of the code:

<?php$first = $_POST[\'first\']; $last = $_POST[\'last\'];$id = $_POST[\'id\'];$tel = $_POST[\'tel\'];$email = $_POST[\'email\'];$gender = $_POST[\'gender\'];$basket = $_POST[\'basket\'];$volleyball = $_POST[\'volleyball\'];$badminton = $_POST[\'badminton\'];$football = $_POST[\'football\'];$bowling = $_POST[\'bowling\'];$golf = $_POST[\'golf\'];$pingpong = $_POST[\'pingpong\'];$racquet = $_POST[\'racquet\'];$leagues = $_POST[\'leagues\'];$setup = $_POST[\'setup\'];$teach = $_POST[\'teach\'];$beach = $_POST[\'beach\'];$bonfire = $_POST[\'bonfire\'];$tail = $_POST[\'tail\'];$pep = $_POST[\'pep\'];$tva = $_POST[\'tva\'];$water = $_POST[\'water\'];$web = $_POST[\'web\'];$connect = mysql_connect("h", "u", "p") or die("could not connect to jowchie\'s database"); mysql_select_db("db", $connect) or die("i cant seem to get in jowchie\'s database, please contact him");$tae = "INSERT INTO intram_contacts VALUES (\'$first\',\'$last\',\'$id\',\'$tel\',\'$email\',\'$gender\',\'$leagues\',$setup\',\'$teach\',\'$beach\',\'$bonfire\',\'$tail\',\'$pep\', \'$tva\', \'$water\',\'$web\')";$sql2 = "INSERT INTO basket VALUES (\'$first\',\'$last\',\'$email\',\'$gender\',\'$basket\',\'$leagues\')";$sql3 = "INSERT INTO volleyball VALUES (\'$first\',\'$last\',\'$email\',\'$gender\',\'$volleyball\')";$sql4 = "INSERT INTO badminton VALUES (\'$first\',\'$last\',\'$email\',\'$gender\',\'$badminton\')";$sql5 = "INSERT INTO football VALUES (\'$first\',\'$last\',\'$email\',\'$gender\',\'$football\')";$sql6 = "INSERT INTO bowling VALUES (\'$first\',\'$last\',\'$email\',\'$gender\',\'$bowling\')";$sql7 = "INSERT INTO golf VALUES (\'$first\',\'$last\',\'$email\',\'$gender\',\'$golf\')";$sql8 = "INSERT INTO pingpong VALUES (\'$first\',\'$last\',\'$email\',\'$gender\',\'$pingpong\')";$sql9 = "INSERT INTO racquet VALUES (\'$first\',\'$last\',\'$email\',\'$gender\',\'$racquet\')";$result1 = mysql_query($tae);$result2 = mysql_query($sql2);$result3 = mysql_query($sql3);$result4 = mysql_query($sql4);$result5 = mysql_query($sql5);$result6 = mysql_query($sql6);$result7 = mysql_query($sql7);$result8 = mysql_query($sql8);$result9 = mysql_query($sql9);

the $tae variable with the query command doesnt seem to work... please, i need help on this i am a beginner. when i check all the contents of all the tables, they\'re all fine, but when i check to see if the intram_contacts table is ok, there is absolutely nothing but an empty set.

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 13 August 2003 - 06:31 AM

Use a die statement and check if the query is having some issues.

Also ensure that you have supplied all the vlaues.
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#3 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 13 August 2003 - 10:55 AM

also, check the post_max_size line your php.ini to make sure you are allowing enough data to pass.

a code suggestion: clean up the beginning assigns from post to normal by using a foreach loop. if you unsure what i mean, search the forum for: foreach POST
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#4 jowchie

jowchie
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • Locationhawaii

Posted 14 August 2003 - 11:06 PM

i work with my php files through a remote ssh connection, and i do not have root permissions for the php.ini,

and thanks for the for loop suggestion...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users