kjmeath Posted May 14, 2007 Share Posted May 14, 2007 heres the links to the files http://hardbassrecords.net/downloadform.php (which is ran on my windows machine with apache 2.2) http://kjm362.aisites.com/downloadform.php (which is running on a unix machine in some far off land) the hardbassrecords form is not caching the items entered in the fields.... whats wrong? both forms are exactly alike!!!!!! line for line, is this an issue with my php.ini file? ??? Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/ Share on other sites More sharing options...
kjmeath Posted May 14, 2007 Author Share Posted May 14, 2007 let me know if you would like to see my source code for the downloadform.php.....but i do not think it is necessary, seeing as how it is working on one server and not the other,the php code is solid, as far as the php.ini file, im new to hosting my own website, and i am not sure if it is working on my machine (windows xp w/ apache 2.2 and php5.2.1) Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/#findComment-252547 Share on other sites More sharing options...
jitesh Posted May 14, 2007 Share Posted May 14, 2007 Linux is case sensitive Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/#findComment-252548 Share on other sites More sharing options...
btherl Posted May 14, 2007 Share Posted May 14, 2007 Please show us the source code. We can't do anything except guess unless we see it. Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/#findComment-252560 Share on other sites More sharing options...
neel_basu Posted May 14, 2007 Share Posted May 14, 2007 I didn't understand whats your problem at all. Is the Smae page showing different output in different Server OS ?? where is the difference the hardbassrecords form is not caching the items entered in the fields.... whats wrong? What does it mean ?? Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/#findComment-252681 Share on other sites More sharing options...
kjmeath Posted May 14, 2007 Author Share Posted May 14, 2007 here is the source code that both websites have, but why is it not working on the hardbassrecords.net site? <?PHP if ( count($_POST) > 0){ if ($first_name == "" ){ $tar1= "<span class=\"a3\"><blink>*</blink></span>"; $message="<span class=\"a3\"><blink>*</blink> PLEASE ENTER YOUR FIRST NAME</span>"; } elseif ($last_name == ""){ $tar2= "<span class=\"a3\"><blink>*</blink></span>"; $message="<span class=\"a3\"><blink>*</blink> PLEASE ENTER YOUR LAST NAME</span>"; } elseif(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email1)) { $tar3= "<span class=\"a3\"><blink>*</blink></span>"; $tar4= "<span class=\"a3\"><blink>*</blink></span>"; $message="<span class=\"a3\"><blink>*</blink> INVALID EMAIL ADDRESS</span>"; } elseif ($email1 != $email2 ) { $tar3= "<span class=\"a3\"><blink>*</blink></span>"; $tar4= "<span class=\"a3\"><blink>*</blink></span>"; $message="<span class=\"a3\"><blink>*</blink> EMAILS DO NOT MATCH</span>"; } elseif ($how != ""){ $name= "$first_name $last_name \n"; $body="Name: $name \n"; $body.="Email: $email1 \n"; $body.="Add to Mailinglist: $mailinglist \n"; $body.="They heard about this download through: $how \n"; $body.="Style of music $name likes:"; if ($dnb != ""){ $body.=", $dnb"; } if ($hardcore != ""){ $body.=", hardcore"; } if ($techno != ""){ $body.=", $techno"; } if ($trance != ""){ $body.=", $trance"; } if ($house != ""){ $body.=", $house"; } if ($nrg != ""){ $body.=", $nrg"; } if ($oem != ""){ $body.=", $oem"; } mail("________@hotmail.com", "$name just filled out the survey to download Far From Home", $body); header("Location: http://hardbassrecords.net/downloadthankyou.html"); mail("$email1", "$first_name 's Hard Bass Records Download Request", "Thanks $first_name, Please click here (http://hardbassrecords.net/kj4et.html)to be redirected to the download page for The Kid Wicked's 'Far From Home' album"); } else { $tar5="<span class=\"a3\"><blink>*</blink></span>"; $message= "<span class=\"a3\"><blink>*</blink> PLEASE SELECT HOW YOU HEARD ABOUT THIS DOWNLOAD</span>"; } } else { $message="<span class=\"a2\"><blink>*</blink></span><span class=\"a1\"> Before you can begin the free download, be sure to fill in the all required fields </span><span class=\"a2\"><blink>*</blink></span>"; $tar1=""; $tar2=""; $tar3=""; $tar4=""; $tar5=""; } ?> Â <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <link rel="stylesheet" href="pagestyles.css" type="text/css" /> <title>Survey</title> </head> <body> <form method="post" action="<?PHP echo $_SERVER['PHP_SELF']; ?>"> <div align="center"> <table width="500px" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center"> <table width="400" cellspacing="0" cellpadding="1"> <tr> <th colspan="2" align="left"> <?PHP echo $message; ?> </th> </tr> <tr> <td colspan="2"> <table bgcolor="#C0C0C0" width="500px"> <tr> <td width="250px"> <div align="left"> <span class="a1">Please Enter Your </span> <span class="a2"> First Name </span> </div> </td> <td> <?PHP echo $tar1; ?> <span class="a1"> <input type="text" name="first_name" value="<?PHP echo $first_name; ?>" /> </span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table width="500px"> <tr> <td width="250px"> <div align="left"> <span class="a1">Please Enter Your </span> <span class="a2"> Last Name </span> </div> </td> <td> <?PHP echo $tar2; ?> <span class="a1"> <input type="text" name="last_name" value="<?PHP echo $last_name; ?>" /> </span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#C0C0C0" width="500px"> <tr> <td width="250px"> <div align="left"> <span class="a1">Please Enter Your </span> <span class="a2"> Email Address </span> </div> </td> <td> <?PHP echo $tar3; ?> <span class="a1"> <input type="text" name="email1" value="<?PHP echo $email1; ?>" /> </span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table width="500px"> <tr> <td width="250px"> <div align="left"> <span class="a1">Please </span> <span class="a2"> Verify </span> <span class="a1"> Your Email Address </span> </div> </td> <td> <?PHP echo $tar4; ?> <span class="a1"> <input type="text" name="email2" value="<?PHP echo $email2; ?>" /> </span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#C0C0C0" width="500px"> <tr> <td width="250px"> <div align="left"> <span class="a1">Would you like to join our mailing list? </span> </div> </td> <td> <input type="radio" value="Yes" name="mailinglist" checked="checked" /> <span class="a2">Yes </span> </td> <td> <input type="radio" value="No" name="mailinglist" /> <span class="a1">No Thanks </span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#FFFFFF" width="500px"> <tr> <td width="250px"> <div align="left"> <span class="a2">How </span> <span class="a1"> did you hear about this download? </span> </div> </td> <td> <div align="left"> <?PHP echo $tar5; ?> <select name="how"> <option value=""<?PHP echo $hear[""]; ?>></option> <option value="Email"<?PHP echo $hear["Email"]; ?>>Email</option> <option value="Myspace"<?PHP echo $hear["Myspace"]; ?>>Myspace</option> <option value="This Site"<?PHP echo $hear["This Site"]; ?>>This Site</option> <option value="Event Flyer"<?PHP echo $hear["Event Flyer"]; ?>>Event Flyer</option> <option value="Other"<?PHP echo $hear["Other"]; ?>>Other</option> </select> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#C0C0C0" width="500px"> <tr> <td width="250px"> <div align="left"> <span class="a1">What styles of electronic music do you like? </span> </div> </td> <td> <div align="left"> <input type="checkbox" name="dnb" value="dnb" <?PHP echo $music["dnb"]; ?> /> <span class="a1">Drum and Bass </span> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#FFFFFF" width="500px"> <tr> <td width="250px"> </td> <td> <div align="left"> <input type="checkbox" name="hardcore" value="hardcore" <?PHP echo $music["hardcore"]; ?> /> <span class="a1">Hardcore </span> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#C0C0C0" width="500px"> <tr> <td width="250px"> </td> <td> <div align="left"> <input type="checkbox" name="techno" value="techno" <?PHP echo $music["techno"]; ?> /> <span class="a1">Techno </span> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#FFFFFF" width="500px"> <tr> <td width="250px"> </td> <td> <div align="left"> <input type="checkbox" name="trance" value="trance" <?PHP echo $music["trance"]; ?> /> <span class="a1">Trance </span> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#C0C0C0" width="500px"> <tr> <td width="250px"> </td> <td> <div align="left"> <input type="checkbox" name="house" value="house" <?PHP echo $music["house"]; ?> /> <span class="a1">House </span> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#FFFFFF" width="500px"> <tr> <td width="250px"> </td> <td> <div align="left"> <input type="checkbox" name="nrg" value="nrg" <?PHP echo $music["nrg"]; ?> /> <span class="a1">NRG </span> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table bgcolor="#C0C0C0" width="500px"> <tr> <td width="250px"> </td> <td> <div align="left"> <input type="checkbox" name="oem" value="oem" <?PHP echo $music["oem"]; ?> /> <span class="a1">OEM </span> </div> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" align="center"> <input name="submit" type="submit" value="Submit" /> <input name="reset" type="reset" value="Reset" /> </td> </tr> </table> </div> </td> </tr> </table> </div> </form> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/#findComment-252887 Share on other sites More sharing options...
kenrbnsn Posted May 14, 2007 Share Posted May 14, 2007 Please edit your post to put the tag before the code and after it. This will make your code much easier to read. Â Ken Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/#findComment-252894 Share on other sites More sharing options...
kjmeath Posted May 14, 2007 Author Share Posted May 14, 2007 here the code <?php if ( count($_POST) > 0){    if ($first_name == "" ){    $tar1= "<span class=\"a3\"><blink>*</blink></span>";    $message="<span class=\"a3\"><blink>*</blink> PLEASE ENTER YOUR FIRST NAME</span>";    }  elseif ($last_name == ""){    $tar2= "<span class=\"a3\"><blink>*</blink></span>";    $message="<span class=\"a3\"><blink>*</blink> PLEASE ENTER YOUR LAST NAME</span>";    }  elseif(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email1)) {    $tar3= "<span class=\"a3\"><blink>*</blink></span>";    $tar4= "<span class=\"a3\"><blink>*</blink></span>";    $message="<span class=\"a3\"><blink>*</blink> INVALID EMAIL ADDRESS</span>";  }  elseif ($email1 != $email2 ) {    $tar3= "<span class=\"a3\"><blink>*</blink></span>";    $tar4= "<span class=\"a3\"><blink>*</blink></span>";    $message="<span class=\"a3\"><blink>*</blink> EMAILS DO NOT MATCH</span>";  }  elseif ($how != ""){  $name= "$first_name $last_name \n";  $body="Name: $name \n";  $body.="Email: $email1 \n";  $body.="Add to Mailinglist: $mailinglist \n";  $body.="They heard about this download through: $how \n";  $body.="Style of music $name likes:";    if ($dnb != ""){  $body.=", $dnb";  }    if ($hardcore != ""){  $body.=", hardcore";  }    if ($techno != ""){  $body.=", $techno";  }    if ($trance != ""){  $body.=", $trance";  }    if ($house != ""){  $body.=", $house";  }    if ($nrg != ""){  $body.=", $nrg";  }    if ($oem != ""){  $body.=", $oem";  }  mail("________@hotmail.com", "$name just filled out the survey to download Far From Home", $body);  header("Location: http://hardbassrecords.net/downloadthankyou.html");  mail("$email1", "$first_name 's Hard Bass Records Download Request", "Thanks $first_name, Please click here (http://hardbassrecords.net/kj4et.html)to be redirected to the download page for The Kid Wicked's 'Far From Home' album");  }  else {  $tar5="<span class=\"a3\"><blink>*</blink></span>";  $message= "<span class=\"a3\"><blink>*</blink> PLEASE SELECT HOW YOU HEARD ABOUT THIS DOWNLOAD</span>";  } } else { $message="<span class=\"a2\"><blink>*</blink></span><span class=\"a1\"> Before you can begin the free download, be sure to fill in the all required fields </span><span class=\"a2\"><blink>*</blink></span>"; $tar1=""; $tar2=""; $tar3=""; $tar4=""; $tar5=""; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <link rel="stylesheet" href="pagestyles.css" type="text/css" /> <title>Survey</title> </head> <body> <form method="post" action="<?PHP echo $_SERVER['PHP_SELF']; ?>"> <div align="center"> <table width="500px" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center">  <table width="400" cellspacing="0" cellpadding="1">    <tr>     <th colspan="2" align="left">        <?PHP echo $message; ?>     </th>    </tr>    <tr>     <td colspan="2">       <table bgcolor="#C0C0C0" width="500px">        <tr>          <td width="250px">           <div align="left">             <span class="a1">Please Enter Your             </span>             <span class="a2"> First Name             </span>           </div>          </td>          <td>           <?PHP echo $tar1; ?>           <span class="a1">             <input type="text" name="first_name" value="<?PHP echo $first_name; ?>" />           </span>          </td>        </tr>       </table>     </td>    </tr>    <tr>     <td colspan="2">       <table width="500px">        <tr>          <td width="250px">           <div align="left">             <span class="a1">Please Enter Your             </span>             <span class="a2"> Last Name             </span>           </div>          </td>          <td>           <?PHP echo $tar2; ?>           <span class="a1">             <input type="text" name="last_name" value="<?PHP echo $last_name; ?>" />           </span>          </td>        </tr>       </table>     </td>    </tr>    <tr>     <td colspan="2">       <table bgcolor="#C0C0C0" width="500px">        <tr>          <td width="250px">           <div align="left">             <span class="a1">Please Enter Your             </span>             <span class="a2"> Email Address             </span>           </div>          </td>          <td>           <?PHP echo $tar3; ?>           <span class="a1">             <input type="text" name="email1" value="<?PHP echo $email1; ?>" />           </span>          </td>        </tr>       </table>     </td>    </tr>     <tr>     <td colspan="2">       <table width="500px">        <tr>          <td width="250px">           <div align="left">             <span class="a1">Please             </span>             <span class="a2"> Verify             </span>             <span class="a1"> Your Email Address             </span>           </div>          </td>          <td>           <?PHP echo $tar4; ?>           <span class="a1">             <input type="text" name="email2" value="<?PHP echo $email2; ?>" />           </span>          </td>        </tr>       </table>     </td>    </tr>    <tr>     <td colspan="2">       <table bgcolor="#C0C0C0" width="500px">        <tr>          <td width="250px">           <div align="left">             <span class="a1">Would you like to join our mailing list?             </span>           </div>          </td>          <td>           <input type="radio" value="Yes" name="mailinglist" checked="checked" />           <span class="a2">Yes           </span>          </td>          <td>           <input type="radio" value="No" name="mailinglist" />           <span class="a1">No Thanks           </span>          </td>        </tr>       </table>     </td>    </tr>     <tr>     <td colspan="2">       <table bgcolor="#FFFFFF" width="500px">        <tr>          <td width="250px">           <div align="left">             <span class="a2">How             </span>             <span class="a1"> did you hear about this download?             </span>           </div>          </td>          <td>           <div align="left">           <?PHP echo $tar5; ?>             <select name="how">              <option value=""<?PHP echo $hear[""]; ?>></option>              <option value="Email"<?PHP echo $hear["Email"]; ?>>Email</option>              <option value="Myspace"<?PHP echo $hear["Myspace"]; ?>>Myspace</option>              <option value="This Site"<?PHP echo $hear["This Site"]; ?>>This Site</option>              <option value="Event Flyer"<?PHP echo $hear["Event Flyer"]; ?>>Event Flyer</option>              <option value="Other"<?PHP echo $hear["Other"]; ?>>Other</option>             </select>           </div>          </td>        </tr>       </table>       </td>     </tr>     <tr>     <td colspan="2">       <table bgcolor="#C0C0C0" width="500px">        <tr>          <td width="250px">           <div align="left">             <span class="a1">What styles of electronic music do you like?             </span>           </div>          </td>          <td>           <div align="left">             <input type="checkbox" name="dnb" value="dnb" <?PHP echo $music["dnb"]; ?> />              <span class="a1">Drum and Bass              </span>              </div>          </td>        </tr>       </table>       </td>     </tr>       <tr>     <td colspan="2">       <table bgcolor="#FFFFFF" width="500px">        <tr>          <td width="250px">          </td>          <td>           <div align="left">             <input type="checkbox" name="hardcore" value="hardcore" <?PHP echo $music["hardcore"]; ?> />              <span class="a1">Hardcore              </span>              </div>          </td>        </tr>       </table>       </td>     </tr>        <tr>     <td colspan="2">       <table bgcolor="#C0C0C0" width="500px">        <tr>          <td width="250px">          </td>          <td>           <div align="left">             <input type="checkbox" name="techno" value="techno" <?PHP echo $music["techno"]; ?> />              <span class="a1">Techno              </span>             </div>          </td>        </tr>       </table>       </td>     </tr>     <tr>     <td colspan="2">       <table bgcolor="#FFFFFF" width="500px">        <tr>          <td width="250px">          </td>          <td>           <div align="left">             <input type="checkbox" name="trance" value="trance" <?PHP echo $music["trance"]; ?> />              <span class="a1">Trance              </span>           </div>          </td>        </tr>       </table>       </td>     </tr>     <tr>     <td colspan="2">       <table bgcolor="#C0C0C0" width="500px">        <tr>          <td width="250px">          </td>          <td>           <div align="left">             <input type="checkbox" name="house" value="house" <?PHP echo $music["house"]; ?> />              <span class="a1">House              </span>           </div>          </td>        </tr>       </table>       </td>     </tr>       <tr>     <td colspan="2">       <table bgcolor="#FFFFFF" width="500px">        <tr>          <td width="250px">          </td>          <td>           <div align="left">             <input type="checkbox" name="nrg" value="nrg" <?PHP echo $music["nrg"]; ?> />              <span class="a1">NRG              </span>           </div>          </td>        </tr>       </table>       </td>     </tr>       <tr>     <td colspan="2">       <table bgcolor="#C0C0C0" width="500px">        <tr>          <td width="250px">          </td>          <td>           <div align="left">             <input type="checkbox" name="oem" value="oem" <?PHP echo $music["oem"]; ?> />              <span class="a1">OEM              </span>           </div>          </td>        </tr>       </table>       </td>     </tr>    <tr>     <td colspan="2" align="center">       <input name="submit" type="submit" value="Submit" />       <input name="reset" type="reset" value="Reset" />     </td>    </tr>  </table> </div> </td> </tr> </table> </div> </form> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/#findComment-252935 Share on other sites More sharing options...
kjmeath Posted May 14, 2007 Author Share Posted May 14, 2007 does anyone know why this is not working? Quote Link to comment https://forums.phpfreaks.com/topic/51267-same-file-on-2-different-servers-1-doesnt-work/#findComment-253116 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.