Jump to content

phpretard

Members
  • Posts

    821
  • Joined

  • Last visited

    Never

Posts posted by phpretard

  1. One county can have 50 zipcodes.  Well if I only have one county in the MEMBERS TABLE i would like to show up for any of the 50 zipcodes when the zipcode is searched.

     

    If you look at SAINT THOMAS as the County it has several zipcodes (I am reffering to the attachment).

     

    Remmber: I am searching the MEMBERS table...it has the counties only and they are comma seperated.

    The ZIPCODE table (attached) has the counties listed multiple times for each zipcode.

     

    Here is my current search:

    $mainSearch=$_POST['mainSearch'];
    
    $result = mysql_query("SELECT * FROM members WHERE (City='$mainSearch' OR State='$mainSearch' OR ZipCode='$mainSearch' AND $service='1') AND PaidID!='' ORDER by id");
    
    $num_rows = mysql_num_rows($result);
    
    if ($num_rows > 0){
    
    while($row = mysql_fetch_array($result))
    { RESULT }

     

     

    Just as an example if I search the MEMBERS table for ZipCode 00801 - 00805 I would like to somehow cross references the ZIPCODE Table for a result.

     

    I really think I need an expert in this one.  I have searched high and low.

     

    [attachment deleted by admin]

  2. Thank you for you hlp on the last one!

     

    I am making these folders and files with the folowing code (which works now thanks to you folks):

     

    $folder=$_POST['folder'];
    
    mkdir("pages/secure/documents/$folder", 0777);
    
    $fp = fopen("pages/secure/documents/$folder/index.php", 'w');
    
    fclose($fp);
    
    $filename = "pages/secure/documents/$folder/index.php";

     

     

    But it makes a pesky little folder later displayed called "vti_cnf"

     

    Can I make a folder without it???

     

    What is it.

     

    I don't want it.

     

    Waaah

  3. I know the folder is being made but you can see the error I keep getting.

     

     

    Warning: fopen(pages/secure/documents/$folder/index.php) [function.fopen]: failed to open stream: No such file or directory

     

     

    $folder=$_POST['folder'];
    
    mkdir("pages/secure/documents/$folder", 0777);
    
    $fp = fopen('pages/secure/documents/$folder/index.php', 'w');
    
    fclose($fp);

     

    It looks like fopen isn't picking up the variable (according to the error)

     

    any Ideas?

  4. I have to field in a database. one is 08-08-2008 and the other is 08-08-2009.  Tommorow their will be so many days left until the to meet. Is their some code that can print a count down?

     

    For Instance: 08-08-2009 minus Tomorrow = 364 day remaining

     

    I am truly clueless on thus one.

     

    Any help?

  5. $areaCode=$POST['areaCode'];

     

    "SELECT * FROM members WHERE PHArea='$areaCode' OR MOArea='$areaCode' OR FXArea='$areaCode' AND PaidID!=' '  "

     

    I am searching the DB for area codes but only the rows that have information in Column "PaidID" (The Paid Subscribers)

     

    The Query above does't work and I cant figure out why?

     

    Any help?

  6. I should mention I have tried:

     

    <? echo $thevariable; ?>  in the place of $thevariable in orderSendEmail2.php.

     

    It shows up blank in the email, but at least it doesn't show $thevariable.

     

    I will keep reading the manual until someone here can help.

     

     

     

  7. submit your login to the index page and (assuming index.php)

     

    at the top of your inex page LINE 1

    <?

    session_start();

     

    if (isset($_POST[l'submit'])){

     

    include 'your_login_file.php';

    }

    ?>

     

    Then the begining of your index page...

  8. submit your login to the index page and (assuming index.php)

     

    at the top of your inex page LINE 1

    <?

    session_start();

     

    if (isset($_POST[l'Submit'])){

     

    include 'your_login_file.php';

    }

    ?>

     

    Then the begining of your index page...

  9. I am trying to use phpMailer and everthing works fine except the variables won't send. It shows $thevariable not the value.

     

    Does anyone know anything about phpMailer?

     

     

    <?php
    session_start();
    
    $mail             = new PHPMailer(); // defaults to using php "mail()"
    
    $body             = $mail->getFile('orderSendEmail2.php');
    $body             = eregi_replace("[\]",'',$body);
    
    $mail->From       = "email@email.com";
    $mail->FromName   = "Me";
    
    $mail->Subject    = "Report";
    
    $mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
    
    $mail->MsgHTML($body);
    
    $mail->AddAddress($_SESSION['email'], "Anthony"); // IT ISN"T PICKIN UP THIS SESSION EITHER
    
    $mail->AddAttachment("images/phpmailer.gif");             // attachment
    
    if(!$mail->Send()) {
      echo "Mailer Error: " . $mail->ErrorInfo;
    } else {
      echo "<pre>". print_r($_SESSION,true) ."</pre>";  //// I ADDED THIS JUST TO SEE IF THE SESSION WERE THERE AND THEY ARE
    }
    
    ?>

     

     

     

    orderSendEmail2.php:

    <?php
    session_start();
    
    include 'orderSessions.php'; /// THIS PAGE TRANSLATES THE SESSIONS INTO VARIABLES AND WORKS FINE
    ?>
    
    <style>
    #orderTitle{
    font-weight:bold;
    font-size:14px;
    color:#006000;
    border-bottom:#000080 solid 2px;
    font-family:verdana;
    }
    
    #orderLable{
    font-size:12px;
    padding:3px;
    font-family:verdana;
    }
    </style>
    <table border=0 width=100%>
    <tr>
    	<td><b><font face=verdana>APPRAISAL ORDER REQUEST FORM</font></b></td>
    	<td id=orderLable align=right></td>
    </tr>
    </table>
    <br><br>
    <div id=orderRequestForm style='width:678px; margin-bottom:10px;'>	
    <table border=0 width=100%>	
    <tr>
    	<td colspan=2><div id=orderTitle>Company / Contact information</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Business:</td>
    	<td width=75% id='orderLable'>$yourBusiness</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Company:</td>
    	<td width=75% id='orderLable'>$companyName</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Person:</td>
    	<td width=75% id='orderLable'>$contactPersonFirst $contactPersonLast</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Phone:</td>
    	<td width=75% id='orderLable'>($phone1) $phone2 $phone3</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Alternate Phone:</td>
    	<td width=75% id='orderLable'>($altphone1) $altphone2-$altphone3</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Fax Number:</td>
    	<td width=75% id='orderLable'>($fax1) $fax2-$fax3</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Email:</td>
    	<td width=75% id='orderLable'>$email</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25% valign=top>Address:</td>
    	<td width=75% id='orderLable'>$contactaddress<br>$contactcity, $contactstate $contactzip</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td colspan=2><div id=orderTitle>Inspection And Property Access Information</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Property Type:</td>
    	<td width=75% id='orderLable'>$service</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Property Address:</td>
    	<td width=75% id='orderLable'>$prop_address<br>$prop_city, $prop_state $prop_zip</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact:</td>
    	<td width=75% id='orderLable'>$contactForInspection</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Name:</td>
    	<td width=75% id='orderLable'>$inspContactPersonFirst $inspContactPersonLast</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Phone Number:</td>
    	<td width=75% id='orderLable'>($inspPhone1) $inspPhone2-$inspPhone3</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td colspan=2><div id=orderTitle>Appraisal Detials</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Purpose:</td>
    	<td width=75% id='orderLable'>$purpose</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Sale Price:</td>
    	<td width=75% id='orderLable'>$salePrice</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Report Type:</td>
    	<td width=75% id='orderLable'>$reportType</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>FHA:</td>
    	<td width=75% id='orderLable'>$fha</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Occupancy:</td>
    	<td width=75% id='orderLable'>$occupancy</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25% valign=top>Comments:</td>
    	<td width=75% id='orderLable'>$explainPurpose</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' colspan=2 align=right>Brought to you by: <img border=0 src='logoSMALL.gif' border=0></td>
    </tr>
    </table>
    </div>

     

     

    The email is formatted perfectly everything looks great but instead of mailing the values of the $vars it mails "$vars"

     

    Please help if you can.

  10. I have a message because this is what comes to my inbox once submitted:

     

     

     

    Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Nonspam: None
    
    
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <style>
    #orderTitle{
    font-weight:bold;
    font-size:14px;
    color:#006000;
    border-bottom:#000080 solid 2px;
    font-family:verdana;
    }
    
    #orderLable{
    font-size:12px;
    padding:3px;
    font-family:verdana;
    }
    </style>
    <head>
    <body>
    <table border=0 width=100%>
    <tr>
    	<td><b><font face=verdana>APPRAISAL ORDER REQUEST FORM</font></b></td>
    	<td id=orderLable align=right><input type=checkbox name='SendCopy' value='".$_SESSION['email']."'> Send Me A Copy</td>
    </tr>
    </table>
    <div id=orderRequestForm style='width:678px; height:296px; overflow:auto; margin-bottom:10px;'>	
    <table border=0 width=100%>	
    <tr>
    	<td colspan=2><div id=orderTitle>Company / Contact information</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Business:</td>
    	<td width=75% id='orderLable'>".$_SESSION['yourBusiness']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Company:</td>
    	<td width=75% id='orderLable'>".$_SESSION['companyName']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Person:</td>
    	<td width=75% id='orderLable'>".$_SESSION['contactPersonFirst']." ".$_SESSION['contactPersonLast']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Phone:</td>
    	<td width=75% id='orderLable'>(".$_SESSION['phone1'].") ".$_SESSION['phone2']."-".$_SESSION['phone3']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Alternate Phone:</td>
    	<td width=75% id='orderLable'>(".$_SESSION['altphone1'].") ".$_SESSION['altphone2']."-".$_SESSION['altphone3']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Fax Number:</td>
    	<td width=75% id='orderLable'>(".$_SESSION['fax1'].") ".$_SESSION['fax2']."-".$_SESSION['fax3']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Email:</td>
    	<td width=75% id='orderLable'>".$_SESSION['email']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25% valign=top>Address:</td>
    	<td width=75% id='orderLable'>".$_SESSION['contactaddress']."<br>".$_SESSION['contactcity'].", ".$_SESSION['contactstate']." ".$_SESSION['contactzip']."</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td colspan=2><div id=orderTitle>Inspection And Property Access Information</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Property Type:</td>
    	<td width=75% id='orderLable'>".$_SESSION['service']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Property Address:</td>
    	<td width=75% id='orderLable'>".$_SESSION['prop_address']."<br>".$_SESSION['prop_city'].", ".$_SESSION['prop_state']." ".$_SESSION['prop_zip']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact:</td>
    	<td width=75% id='orderLable'>".$_SESSION['contactForInspection']." </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Name:</td>
    	<td width=75% id='orderLable'>".$_SESSION['inspContactPersonFirst']." ".$_SESSION['inspContactPersonLast']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Phone Number:</td>
    	<td width=75% id='orderLable'>(".$_SESSION['inspPhone1'].") ".$_SESSION['inspPhone2']."-".$_SESSION['inspPhone3']."</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td colspan=2><div id=orderTitle>Appraisal Detials</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Purpose:</td>
    	<td width=75% id='orderLable'>".$_SESSION['purpose']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Sale Price:</td>
    	<td width=75% id='orderLable'>".$_SESSION['salePrice']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Report Type:</td>
    	<td width=75% id='orderLable'>".$_SESSION['reportType']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>FHA:</td>
    	<td width=75% id='orderLable'>".$_SESSION['fha']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Occupancy:</td>
    	<td width=75% id='orderLable'>".$_SESSION['occupancy']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25% valign=top>Comments:</td>
    	<td width=75% id='orderLable'>".$_SESSION['explainPurpose']."</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' colspan=2 align=right>Brought to you by: <img border=0 src='logoSMALL.gif' border=0></td>
    </tr>
    </table>
    </div>
    <table border=0 width='100%'>
    <tr>
    	<td align=left><a href='contact.php'><img src='orderEdit.gif' border=0></a></td>
    	<td align=right><input type=image name='SendOrder' src='orderSend.gif'></td>
    </tr>
    </table>
    <body>
    </html>

     

    Except where you see ".$_SESSION['whatever']." the actual value is there.

  11. Message as requested.

     

    <?
    session_start();
    
    echo"
    <html>
    <head>
    <style>
    #orderTitle{
    font-weight:bold;
    font-size:14px;
    color:#006000;
    border-bottom:#000080 solid 2px;
    font-family:verdana;
    }
    
    #orderLable{
    font-size:12px;
    padding:3px;
    font-family:verdana;
    }
    </style>
    <head>
    <body>
    <table border=0 width=100%>
    <form action='orderSubmitEmail.php' method=post>
    <tr>
    	<td><b><font face=verdana>APPRAISAL ORDER REQUEST FORM</font></b></td>
    	<td id=orderLable align=right><input type=checkbox name='SendCopy' value='".$_SESSION['email']."'> Send Me A Copy</td>
    </tr>
    </table>
    <div id=orderRequestForm style='width:678px; height:296px; overflow:auto; margin-bottom:10px;'>	
    <table border=0 width=100%>	
    <tr>
    	<td colspan=2><div id=orderTitle>Company / Contact information</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Business:</td>
    	<td width=75% id='orderLable'>".$_SESSION['yourBusiness']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Company:</td>
    	<td width=75% id='orderLable'>".$_SESSION['companyName']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Person:</td>
    	<td width=75% id='orderLable'>".$_SESSION['contactPersonFirst']." ".$_SESSION['contactPersonLast']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Phone:</td>
    	<td width=75% id='orderLable'>(".$_SESSION['phone1'].") ".$_SESSION['phone2']."-".$_SESSION['phone3']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Alternate Phone:</td>
    	<td width=75% id='orderLable'>(".$_SESSION['altphone1'].") ".$_SESSION['altphone2']."-".$_SESSION['altphone3']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Fax Number:</td>
    	<td width=75% id='orderLable'>(".$_SESSION['fax1'].") ".$_SESSION['fax2']."-".$_SESSION['fax3']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Email:</td>
    	<td width=75% id='orderLable'>".$_SESSION['email']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25% valign=top>Address:</td>
    	<td width=75% id='orderLable'>".$_SESSION['contactaddress']."<br>".$_SESSION['contactcity'].", ".$_SESSION['contactstate']." ".$_SESSION['contactzip']."</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td colspan=2><div id=orderTitle>Inspection And Property Access Information</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Property Type:</td>
    	<td width=75% id='orderLable'>".$_SESSION['service']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Property Address:</td>
    	<td width=75% id='orderLable'>".$_SESSION['prop_address']."<br>".$_SESSION['prop_city'].", ".$_SESSION['prop_state']." ".$_SESSION['prop_zip']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact:</td>
    	<td width=75% id='orderLable'>".$_SESSION['contactForInspection']." </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Name:</td>
    	<td width=75% id='orderLable'>".$_SESSION['inspContactPersonFirst']." ".$_SESSION['inspContactPersonLast']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Contact Phone Number:</td>
    	<td width=75% id='orderLable'>(".$_SESSION['inspPhone1'].") ".$_SESSION['inspPhone2']."-".$_SESSION['inspPhone3']."</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td colspan=2><div id=orderTitle>Appraisal Detials</div></td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Purpose:</td>
    	<td width=75% id='orderLable'>".$_SESSION['purpose']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Sale Price:</td>
    	<td width=75% id='orderLable'>".$_SESSION['salePrice']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Report Type:</td>
    	<td width=75% id='orderLable'>".$_SESSION['reportType']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>FHA:</td>
    	<td width=75% id='orderLable'>".$_SESSION['fha']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25%>Occupancy:</td>
    	<td width=75% id='orderLable'>".$_SESSION['occupancy']."</td>
    </tr>
    <tr>
    	<td id='orderLable' width=25% valign=top>Comments:</td>
    	<td width=75% id='orderLable'>".$_SESSION['explainPurpose']."</td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td width=25%> </td>
    	<td width=75%> </td>
    </tr>
    <tr>
    	<td id='orderLable' colspan=2 align=right>Brought to you by: <img border=0 src='logoSMALL.gif' border=0></td>
    </tr>
    </table>
    </div>
    <table border=0 width='100%'>
    <tr>
    	<td align=left><a href='contact.php'><img src='orderEdit.gif' border=0></a></td>
    	<td align=right><input type=image name='SendOrder' src='orderSend.gif'></td>
    </tr>
    </form>
    </table>
    <body>
    </html>
    ";
    
    ?>

     

    Thank you for your help in this.

×
×
  • 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.