Re: error with hosting

From: Date: Tue, 21 Apr 2009 17:20:15 +0000
Subject: Re: error with hosting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-291765@lists.php.net to get a copy of this message
2009/4/21 ®0L¥ <rolygc@gmail.com>: > I have a littli application in PHP that I do with appserv, in my local > server work ok but when I upload de page.php to the hosting server don't > work, the hosting say in your page that support php and the web server is > apache because the directory is httpdocs, and why my page dond;t work in the > hosting and work ok in my local server ?? > > > //before I have a html form > >  <form action="find.php" method="post"> >                  <tr> >                    <td height="24" valign="top" > class="menu" > style="text-align: left"><table width="210" border="0" > cellspacing="0" > cellpadding="0"> >                      <tr> >                        <td width="7" height="23" > class="text_1"></span></td> >                        <td width="105"><span > class="text_1">Your Company > Name:</span></td> >                        <td width="98" > valign="top"><input name="cname" > type="text" size="11" maxlength="20" > align="right"></td> >                      </tr> >                    </table></td> >                  </tr> >                  <tr> >                   <td height="22" valign="top"><table > width="210" > border="0" cellspacing="0" cellpadding="0"> >                      <tr> >                        <td width="7" height="22" > class="text_1"></span></td> >                        <td width="105"><span > class="text_1">Your E-Mail > Address:</span></td> >                        <td width="98" > valign="top"><input name="email" > type="text" size="11" maxlength="40" > align="right"></td> >                      </tr> >                    </table></td> >                  </tr> >                  <tr> >                    <td height="42" valign="top"><table > width="210" > border="0" cellspacing="0" cellpadding="0"> >                      <tr> >                        <td class="text_1" width="124" > height="27"> Find by > Zip Code: </td> >                        <td width="86"><input > name="zip" type="text" > size="9" maxlength="5" align="right"></td> >                        </tr> >                    </table> >                      <table width="210" border="0" > cellspacing="0" > cellpadding="0"> >                        <tr> >                          <td class="text_1" width="90" > height="22"></td> >                          <td width="79"></td> >                          <td width="41" > valign="bottom"><input type="image" > src="images/find.jpg" width="33" height="20"></td> >                        </tr> >                      </table></td> >                  </tr> > </form> > > > // I try with this application in find.php > > > <? >                if (!$cname) >                { >                    echo "<font color=\"maroon\">Enter your > Company > Name.</font>"; >                } >                elseif > (!ereg("^[a-zA-Z0-9_\.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $email)) >                { Do yourself a favour: * remopve that 1337 hax0r name - it makes you look like a dumbass * buy a PHP related book * change your code to work with register_globals OFF * don't rely on regular expressions to validate an email without reading the email RFC nor knowing regular expressions * don't use ereg! preg is what you want instead you can check out filter_input() on http://php.net/manual .. Look out for FILTER_VALIDATE_EMAIL * Have a nice day [optional] >:-) >                    echo "<font color=\"maroon\">Enter a Valid > E-Mail > Address.</font>"; >                } >                elseif (strlen($zip)<5) >                { >                    echo "<font color=\"maroon\">Enter a Valid > Zip > Code.</font>"; >                } >                elseif (ereg("[^0-9]", $zip)) >                { >                    echo "<font color=\"maroon\">Enter a Valid > Zip > Code.</font>"; >                } >                else >                { >                    echo "<font color=\"maroon\">Find an Agent > close to > you.</font>"; >                } >  ?> > > Thanks to all. > > -- > salu2 ®0L¥ >

« previous php.general (#291765) next »