Jump to content

$_POST limitations????


jowchie

Recommended Posts

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.

Link to comment
Share on other sites

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

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.