dewey_witt Posted August 24, 2008 Share Posted August 24, 2008 About a month ago my HD went BB :-\ I have just set up a new machine everything works great eccept My server (appache2.2) will for some reason not send post data. I dont know whether its in the php.ini or httd.comf for appache. DB connections work perfect I can inset and retreive data fine. Just when i create a form to post to another page the next page receives no post data what so ever. any hints as to what i am doing wrong TELL ME PLZ!!!!!! Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 24, 2008 Share Posted August 24, 2008 Can we see an example form and relevant PHP code? Quote Link to comment Share on other sites More sharing options...
dewey_witt Posted August 24, 2008 Author Share Posted August 24, 2008 OK Below is the form - the html. Its just a basic form. When it gets to the next page where the data is actualy handled.... there is no post data to handle. :-\ i dun get it. Its not just this form. Its ever form i create. <form action="/DATABASE SCRIPTS/mkacct.php" method="post" enctype="multipart/form-data" name="signup" onsubmit="return checkCheckBox(this)"> <input name="user" type="text" size="19" maxlength="19" /> <input name="pass" type="password" size="19" maxlength="19" /> <input name="pass2" type="password" size="19" maxlength="19" /> <input name="char" type="text" size="19" maxlength="19" /> <input name="mail" type="text" size="19" maxlength="19" /> <textarea name="agreement" readonly="readonly" cols="52" rows="10"><? echo "$agreement" ?></textarea> <input type="checkbox" value="0" name="agree"> <input name="submit" type="submit" value="Signup" /> <input name="reset" type="reset" value="Reset" /> </form> Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 24, 2008 Share Posted August 24, 2008 Try removing: enctype="multipart/form-data" From the form tag. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 24, 2008 Share Posted August 24, 2008 Show an example of your form processing code. Quote Link to comment Share on other sites More sharing options...
dewey_witt Posted August 24, 2008 Author Share Posted August 24, 2008 Herer is my handeling. As you can see this code is also good. Im pretty dang sure its not my coding. Im not that much of a newb XD if you find something let me know, but im relativly sure that this is in the php.ini or http.conf file somewhere. PLZ HELP ME!!!!!!! :'( <?php $user = $_POST['user']; $mail = $_POST['mail']; $pass = $_POST['pass']; $char = $_POST['char']; $ip = $_SERVER['REMOTE_ADDR']; define("MYSQL_HOST", "localhost"); define("MYSQL_USER", "root"); define("MYSQL_PASS", ""); define("MYSQL_DB", ""); //make the db conection $conn = mysql_connect("".MYSQL_HOST."", "".MYSQL_USER."", "".MYSQL_PASS."") or die(mysql_error()); mysql_select_db("".members."",$conn) or die(mysql_error()); $sql = "INSERT INTO members (username, email, password, charName, ip) VALUES ('".$user."', '".$mail."', '".$pass."', '".$char."', '".$ip."');"; $result = mysql_query($sql, $conn) or die(mysql_error()); //echo db created and make members table if($result) { header("Thanx.php"); }else { echo"there was a problem with signup. please see your guild leader."; } ?> Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 24, 2008 Share Posted August 24, 2008 but print_r($_POST); at the top to prove post is empty Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 24, 2008 Share Posted August 24, 2008 it your form as php has nothink to do with posting a varable............. saying that always use $_POST[''] statement................. Quote Link to comment Share on other sites More sharing options...
dewey_witt Posted August 24, 2008 Author Share Posted August 24, 2008 ok lololol.... their is post data being passed to the handeling script........ yet the php just isnt picking up what is being laid down. Im not sure why but i cant get any of the post info. This is how i have tried to retrieve and desply it. <? $user = $_POST['user']; echo "$user"; ?> And still nothing......... boggled Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted August 24, 2008 Share Posted August 24, 2008 Check if register_globals are on (same name program/post/get/cookie/session variables "magically" overwriting each other) and if they are turn them off. Quote Link to comment Share on other sites More sharing options...
dewey_witt Posted August 24, 2008 Author Share Posted August 24, 2008 DUDEEEEEEEEEEEEEEEEEE IIIIIIIII LOVEEEEEEEEEE YOUUUUUUUUUU XDXDXDXDXD <? $sql = "SELECT * FROM 'phpfreak' where 'clue' > '0';"; ?> Output: YOUUUUUUUUUUUUUUUUU XD 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.