trafico Posted June 20, 2007 Share Posted June 20, 2007 Hi, I developed my page at home, on a home server, now I am putting it on the web, I am using a normal post, so that the values will be posted onto itself for testing. <form id="form1" name="form1" method="post" action="thispage.php"> Is works find at home, but when I put it on the web it does not! What happens: the page appears good, when I click submit, the page goes blank. What should happen is, it should get redirected to next page or show itself. Somthing is not correct, has anyone meet this before? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted June 20, 2007 Share Posted June 20, 2007 without seeing the code I fear we would all be guessing... Quote Link to comment Share on other sites More sharing options...
trafico Posted June 20, 2007 Author Share Posted June 20, 2007 Thanks <form id="form1" name="form1" method="post" action="test.php"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><table width="745" border="0" cellpadding="5" cellspacing="0"> <tr> <td width="120" class="FieldName">Email Address</td> <td width="375"><input name="Txt1" type="text" class="FieldValue" id="Txt1" value="<?PHP echo $InputFromScreen[1]; ?>" size="50" maxlength="50"/></td> <td width="220" class="FieldNote"> </td> </tr> <tr> <td class="FieldName">Password</td> <td><input name="Txt2" type="password" class="FieldValue" id="Txt2" value="" size="30" maxlength="30"/></td> <td class="FieldNote"> </td> </tr> <tr> <td class="FieldValue"> </td> <td class="PHPRunTime"><?PHP //Checking for Unfilled Fields $TxtBoxesNotFullyFilled=0; for ($i=1; $i<=$NumberOfTxtBoxesMustBeFilled; $i++) { if ($InputFromScreen[$i]=="") { $TxtBoxesNotFullyFilled=1; break; } } if ($TxtBoxesNotFullyFilled==1) { echo "All Fields Should be Filled!"; } else { $_SESSION['ses']=$InputFromScreen[1]; header("location: nextpage.php"); } ?> </td> <td class="FieldNote"> </td> </tr> <tr> <td height="33" class="FieldValue"> </td> <td><input onclick="return count()" name="Submit" type="submit" class="FeildButton" id="Submit" value="Submit" /> </td> <td class="FieldValue"> </td> </tr> </table> </td> </tr> </table> </form> Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted June 20, 2007 Share Posted June 20, 2007 Please post ur test.php code Quote Link to comment Share on other sites More sharing options...
trafico Posted June 20, 2007 Author Share Posted June 20, 2007 Thanks <?php ob_start(); session_start(); $_SESSION['ses']=0; ?> <body> <?PHP $NumberOfTxtBoxes=2; $NumberOfTxtBoxesMustBeFilled=2; if (isset($_POST['Submit'])) { for ($i=1; $i<=$NumberOfTxtBoxes; $i++) { $InputFromScreen[$i]=($_POST["Txt".$i]); } } else { for ($i=1; $i<=$NumberOfTxtBoxes; $i++) { $InputFromScreen[$i]=""; } } ?> <form id="form1" name="form1" method="post" action="test.php"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><table width="745" border="0" cellpadding="5" cellspacing="0"> <tr> <td width="120" class="FieldName">Email Address</td> <td width="375"><input name="Txt1" type="text" class="FieldValue" id="Txt1" value="<?PHP echo $InputFromScreen[1]; ?>" size="50" maxlength="50"/></td> <td width="220" class="FieldNote"> </td> </tr> <tr> <td class="FieldName">Password</td> <td><input name="Txt2" type="password" class="FieldValue" id="Txt2" value="" size="30" maxlength="30"/></td> <td class="FieldNote"> </td> </tr> <tr> <td class="FieldValue"> </td> <td class="PHPRunTime"><?PHP //Checking for Unfilled Fields $TxtBoxesNotFullyFilled=0; for ($i=1; $i<=$NumberOfTxtBoxesMustBeFilled; $i++) { if ($InputFromScreen[$i]=="") { $TxtBoxesNotFullyFilled=1; break; } } if ($TxtBoxesNotFullyFilled==1) { echo "All Fields Should be Filled!"; } else { $_SESSION['ses']=$InputFromScreen[1]; header("location: nextpage.php"); } ?> </td> <td class="FieldNote"> </td> </tr> <tr> <td height="33" class="FieldValue"> </td> <td><input onclick="return count()" name="Submit" type="submit" class="FeildButton" id="Submit" value="Submit" /> </td> <td class="FieldValue"> </td> </tr> </table> </td> </tr> </table> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
mmarif4u Posted June 20, 2007 Share Posted June 20, 2007 try this: <form id="form1" name="form1" method="post" action=""> Quote Link to comment Share on other sites More sharing options...
trafico Posted June 20, 2007 Author Share Posted June 20, 2007 Nope, still not working... Do you really see anything wrong in my code? What can we do? Quote Link to comment Share on other sites More sharing options...
lewis987 Posted June 20, 2007 Share Posted June 20, 2007 what version on PHP is your personal server and what is the version on the web server? Quote Link to comment Share on other sites More sharing options...
trafico Posted June 20, 2007 Author Share Posted June 20, 2007 You mean versions will affect this essential thing. OK seb server uses "version 4.3.11" my home uses "WAMP5 Version 1.7.0" Quote Link to comment Share on other sites More sharing options...
lewis987 Posted June 20, 2007 Share Posted June 20, 2007 your PHP version is 5.2.1 on the personal server, i just checked the wamp website n yes, different versions of PHP can make a difference to the final outcome of the page Quote Link to comment Share on other sites More sharing options...
trafico Posted June 20, 2007 Author Share Posted June 20, 2007 Can you help? I need this to go next step... thanks. Quote Link to comment Share on other sites More sharing options...
lewis987 Posted June 20, 2007 Share Posted June 20, 2007 remove wamp and get xammp, the change the php version to php4. thats the only thing i can suggest Quote Link to comment Share on other sites More sharing options...
trafico Posted June 20, 2007 Author Share Posted June 20, 2007 ok I will can you suggest the wub site for xammp, my home computer is windows. Quote Link to comment Share on other sites More sharing options...
lewis987 Posted June 20, 2007 Share Posted June 20, 2007 Here click on the installer and install it Quote Link to comment Share on other sites More sharing options...
trafico Posted June 20, 2007 Author Share Posted June 20, 2007 Thanks I'll try.. 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.